-
Notifications
You must be signed in to change notification settings - Fork 549
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
Ruby 2.2 got rid of rb_thread_blocking_region? #1314
Comments
I just had a look at the main Ruby repo and this might help: https://github.com/ruby/ruby/blob/1c87fee3166c5208e92f1b7779507dd52c3087e1/NEWS A variety of deprecated C APIs have been removed in Ruby 2.2. More info at https://bugs.ruby-lang.org/issues/9502 - a variety of rb_thread_blocking_* things have been replaced by the "rb_thread_call_without_gvl family" whatever that is ;-) I don't know if this also helps but Googling some of the terms involved brought up some code where another project has updated their own C code to fit both the old and new style APIs - just in case it's useful in your own research: https://www.mail-archive.com/[email protected]/msg00022.html |
This is odd. I can't reproduce this with ruby-head 2.2.0dev, 2014-12-12. |
Never mind that last comment. :) |
I was just testing Passenger 4.0.55 and Passenger 4.0.56 with Ruby 2.2.0p0 and have find out the problem still exists:
|
Maybe something went wrong during compilation. Could you run this and tell me what you see?
|
Tried compiling it again, removing it and creating it with the build-native-support. Still failing, but I see the log mentions that symbol:
|
Can confirm I'm also seeing this with 4.0.56 and 5.0p2.
... and 5.x:
The extensions all seem to compile cleanly, though. Tried recompiling without any change. Edit: @edogawaconan quite right, hadn't spotted. Does that want a new issue creating to track? |
looking at the deprecation list, (yeah, I'm also getting the same error as everyone else here) |
No, the committed code is correct. We check for @xenda Is there an mkmf.log in the directory? If so could you attach it? |
I can't reproduce this error. On OS X, rb_thread_call_without_gvl is detected just fine. Which platforms are you all on? |
centos 6 for me |
Debian Wheezy here. |
I can't reproduce it on Ubuntu 14.04 either. @edogawaconan @JamesHarrison and everyone else, can you attach your mkmf.log? |
|
I see the problem now and I also see why I can't reproduce the bug. It's because you guys compiled Ruby 2.2.0 from source, with a static libruby. However, due to what looks like a bug in Ruby's build system, the wrong compiler flags are passed when compiling native extensions, resulting in autodetection failures even though they should have passed. This should be reported to the Ruby authors. As a workaround, you can compile Ruby with dynamic libruby instead of static libruby. |
Same issue on ubuntu 14.04.1.
However everything is ok on 2nd ubuntu box. |
@FooBarWidget oh.. seems like rvm compiles it right but rbenv not. |
I'm currently compiling Ruby with the dynamic library. Will report in a couple of minutes if everything goes right. |
@varyform I've already figured out what the problem is. See my comment above. I'm reporting an issue to the Ruby authors right now. |
The bug report is here: https://bugs.ruby-lang.org/issues/10656 |
After recompiling as suggested, it's working now. @FooBarWidget Thanks a lot for the help figuring this out. Have an awesome weekend! |
Yeah, works fine with |
I'm getting this error on Heroku with Passenger 4.0.56 and the Ruby version in my Gemfile set to "2.2.0":
|
I'm having the same issue on Ubuntu 14.04 using rbenv, ruby 2.2.0 and Passenger 4.0.56. I tried compiling ruby using @varyform's suggestion, but that didn't help. From the log:
Edit: after a clean install I had more luck. Seems to work now, thanks @FooBarWidget and @varyform :) |
just dropping in to say (in quote because it's to work around a bug in ruby) |
+1 I'm getting this error after a Ruby 2.2 upgrade on Heroku (Passenger v4.0.56). Any suggestions on how to address this issue there? Thanks! |
@toncid @gbuesing You guys should contact Heroku and complain to them, referring to https://bugs.ruby-lang.org/issues/10656. Alternatively, you can work around this problem by setting the |
Wait, maybe I spoke too soon. I got some feedback from the Ruby core team, and this issue might be caused by Passenger after all. I'm investigating. |
This appears to be a Passenger bug after all. In mkmf.rb we clear I've pushed an experimental patch to the |
I have a compilation timeout on heroku with fix_static_libruby branch |
You can't use the branch on Heroku yet because compilation doesn't work on Heroku. It'll only work on Heroku after we've released binaries. Can someone who's not on Heroku verify that the fix works? |
@FooBarWidget Can you please explain implications that Also, I believe this ticket should be reopened until it's fixed. |
@toncid It turns off use of the native extension, causing Passenger to fallback to pure-Ruby code. The native extension contains micro-optimized code paths for things like I/O, sockets, etc. Turning it off has a small performance impact, but it's probably unnoticeable outside of hello world benchmarks. |
@FooBarWidget, for what it's worth, I just installed your (I used specific_install to pull in the code from Github, for what it's worth.) |
@decasia Could you provide me with your mkmf.log? |
|
Thanks very much, @FooBarWidget, the revised patch works perfectly on my Ubuntu 12.04/ruby-2.2.0-from-source system. Much appreciated. Any chance of getting a gem release of 4.0.57? |
Yes, it will be released soon, probably on Friday. |
@FooBarWidget Any word on whether or not this will get released today? |
That depends on QA results. If it's not today, probably Monday. |
Awesome! Thanks @FooBarWidget |
I noticed that 4.0.57 was recently pushed to ruby gems and confirm that all is well now on a Heroku Ruby 2.2.0 app. |
Yes, 4.0.57 is released, though I'm still working on the release announcement. |
I just updated to 4.0.59 and for some reason this started showing up on one of my web servers again? Not sure what to make of it. All apps running on 2.2.0 via rbenv, installed with ruby-build. Passenger installed via apt-get on ubuntu 14.04.
|
It is reported that, when running Passenger under Ruby 2.2, the following error occurs:
There have probably been large changes with regard to thread handling. This needs to be investigated.
The text was updated successfully, but these errors were encountered: