Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown fails with Ruby 2.0 #62

Open
mperham opened this issue Dec 30, 2013 · 3 comments
Open

Shutdown fails with Ruby 2.0 #62

mperham opened this issue Dec 30, 2013 · 3 comments

Comments

@mperham
Copy link

mperham commented Dec 30, 2013

You can't take a mutex from a signal handler in Ruby 2.0+. Here's what Sidekiq does to get around this limitation:

https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/cli.rb#L73

log writing failed. can't be called from trap context
/Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/monitor.rb:185:in `lock': can't be called from trap context (ThreadError)
    from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/monitor.rb:185:in `mon_enter'
    from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/monitor.rb:209:in `mon_synchronize'
    from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/redis_failover-1.0.2/lib/redis_failover/node_manager.rb:99:in `shutdown'
    from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/redis_failover-1.0.2/lib/redis_failover/runner.rb:21:in `block (2 levels) in trap_signals'
@ryanlecompte
Copy link
Owner

Honestly I haven't used Ruby 2.0+ at all. I don't work with Ruby on a daily basis any more so all of my testing is stuck on 1.9.x, unfortunately. I'll try to test it on 2.0 at some point, but I really don't have the spare cycles for the next few weeks at least (big release at work). If you have any spare cycles and think it's an easy fix, then please go ahead and submit a PR. Also, note that the master branch has some nice fixes that haven't been pushed out to rubygems yet. I still need to cut a new release, but in the mean meantime you might want to use the master github repo in your gemfile for now.

@mperham
Copy link
Author

mperham commented Dec 30, 2013

Have you considered finding a new maintainer? I know you've been in the scala community for a while. Perhaps someone more active in Ruby could help?

For the record, I'm not interested in expanding my projects or I'd volunteer.

On Dec 30, 2013, at 7:18, Ryan LeCompte [email protected] wrote:

Honestly I haven't used Ruby 2.0+ at all. I don't work with Ruby on a daily basis any more so all of my testing is stuck on 1.9.x, unfortunately. I'll try to test it on 2.0 at some point, but I really don't have the spare cycles for the next few weeks at least (big release at work). If you have any spare cycles and think it's an easy fix, then please go ahead and submit a PR. Also, note that the master branch has some nice fixes that haven't been pushed out to rubygems yet. I still need to cut a new release, but in the mean meantime you might want to use the master github repo in your gemfile for now.


Reply to this email directly or view it on GitHub.

@ryanlecompte
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants