-
Notifications
You must be signed in to change notification settings - Fork 100
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
Segmentation fault on exit #30
Comments
Looking at the loaded features, it appears that RSpec is present. Is this problem occurring only when testing? Does this problem occur in production? Do you have a short Ruby script that reliably reproduces this problem? |
By the way, this is the best bug report ever! Thank you for including all the stack trace information. My suspicion is that the code in the logger class to define the logging methods based on the currently set level should not be called from the finalizer method. Although not strictly prohibited, my gut is telling me that this is causing issues with the interpreter (obviously). The question now is this: is it illegal to undefine methods in a finalizer, or is this a bug in the Ruby interpreter? A question for the ruby-dev / ruby-core mailing lists. |
Hey mate, No worries! Glad there was enough info there :) You know I tried for a while to reproduce this in a sandbox. I happens around 40% of the time within my project since I added the library. Ideally I'd just give you my project but no-can-do there so I thought I'd whip up a smaller test project with the same mechanics - couldn't do it. I got one seg fault and then I changed some things like an idiot and couldn't get it to happen again, argh. Anyway, I came up with a workaround that has so far stopped it happening anymore for me, logging.rb line #491-#493 is the log_internal() method right? I commented out the inside. i.e. 490 # Internal logging method for use by the framework.
491 def log_internal( level = 1, &block )
492 #::Logging::Logger[::Logging].__send__(levelify(LNAMES[level]), &block)
493 end Since that, no more probs. Happy days. Re your question about it happening in prod, my lil project hasn't gone live yet; no prod. |
I've just pushed up some changes that should address this issue. A release (v 1.7.2) should be forthcoming. If you're willing to give it a spin, feedback would be appreciated. |
Yo! I just tried it. |
I'm seeing something very similar with resque-pool. I've reported this here, but maybe it's actually in the wrong place? It just started quite suddenly. We've been using the logging gem and resque / resque-pool for quite some time, and haven't changed much recently as far as I'm aware... Any ideas what might go wrong? Happy to submit full traces etc if it helps. |
Hi.
I'm using this logging gem in a Sinatra Rack app. When the process exits I often get a segmentation fault at logging/logger.rb:100.
My environment details are:
And the stack trace is:
The text was updated successfully, but these errors were encountered: