Bug #10968
closed[BUG] object allocation during garbage collection phase in /opt/rubies/ruby-2.2.1/lib/ruby/2.2.0/openssl/ssl.rb:177
Description
Hello
I'm running a Rails 4.2 app in production with chruby 0.3.9 and Ruby 2.2.1p85 on Ubuntu 14.04TLS.
I have several unicorn and workers processes.
I got this crash on my cron jobs several times
Thu Mar 12 08:30:01 CET 2015 /usr/local/share/chruby/chruby-cron-wrapper.sh instatube:clean_up_assets - started by deployer on /bin/bash
/opt/rubies/ruby-2.2.1/lib/ruby/2.2.0/openssl/ssl.rb:177: [BUG] object allocation during garbage collection phase
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0028 p:---- s:0134 e:000133 CFUNC :peer_cert
c:0027 p:0016 s:0131 e:000129 METHOD /opt/rubies/ruby-2.2.1/lib/ruby/2.2.0/openssl/ssl.rb:177
c:0026 p:0584 s:0126 e:000125 METHOD /opt/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:925
Full stack trace attached.
Many thanks in advance for your help, best regards
Geoffroy
Files
Updated by MartinBosslet (Martin Bosslet) over 9 years ago
- Status changed from Open to Feedback
- Assignee set to ko1 (Koichi Sasada)
This [1] seems to be the section of the code where the error happened.
@ko1 (Koichi Sasada): Could this be a GC issue?
[1] https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L1661
Updated by dmarkow (Dylan Markow) over 9 years ago
This might be a duplicate of https://bugs.ruby-lang.org/issues/10933 which has already been fixed (but not released)?
Updated by ko1 (Koichi Sasada) over 9 years ago
Could you check it on the latest version?
Updated by netronix (Michaël Rigart) over 9 years ago
- File stacktrace.txt stacktrace.txt added
Koichi Sasada wrote:
Could you check it on the latest version?
I'm experiencing the same issue under ruby 2.2.2p95 . Full stack trace attached:
Updated by zzak (zzak _) over 9 years ago
Do you know how to reproduce it?
Rails+Ruby 2.2 isn't enough for me to make a crash.
Updated by netronix (Michaël Rigart) over 9 years ago
- File stacktrace.txt stacktrace.txt added
Zachary Scott wrote:
Do you know how to reproduce it?
Rails+Ruby 2.2 isn't enough for me to make a crash.
I was able to reduce the frequency by updating some gems. Now, instead of happening in different cases, it only seems to happen on routines that fetch data from an external API's ( yammer and Diigo ).
Going to have a look in more detail if I find a common denominator.
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
Can't you compile with debug symbols enabled?
Updated by grey-owl (Steve Torrence) over 9 years ago
- File crash_thin.txt crash_thin.txt added
I have recently experienced two crashes (stack traces attached) that appear similar to Mr. Rigart's. Both appear to involve creation of a new array in methods called indirectly from the block passed to Thread.new.
Both occurred when running cucumber tests in a rails app. Unfortunately I haven't figured out how to reproduce them.
crash_webrick.txt happened under rails 4.1.6 when using webrick as the http server for the tests.
crash_thin.txt happened under rails 4.1.11 when using thin as the http server for the tests.
Updated by grey-owl (Steve Torrence) over 9 years ago
- File crash_webrick.txt crash_webrick.txt added
Upload failed for one of the stack traces I mentioned in the preceding comment. Here is that file.
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
crash_thin.txt
seems related to EventMachine.
Maybe it didn't acquire GVL properly.
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
- Description updated (diff)
Updated by mkechinov (Michael Kechinov) over 9 years ago
Same problem for Ruby 2.2.2
Rails 4.2.3
Ruby 2.2.2 (using RVM)
Debian 7.
Stack trace: https://gist.github.com/noff/4c61cd980c098bba1041
Every cron task dies with such error, but everytime it happens in different files (ssl, new_relic, dependencies, etc).
Updated by mkechinov (Michael Kechinov) over 9 years ago
Problem still happens.
Any news with it?
It happens only on one machine on Debian 7.
Does not reproduce on same machine with same OS.
Updated by bmishkin1 (Ben Mishkin) over 9 years ago
possibly related
Rails version 4.2.3
Ruby version 2.2.2-p95 (x86_64-linux)
RubyGems version 2.4.6
Rack version 1.6.4
Ubuntu 12.04
trace: https://gist.github.com/bmishkin/2766109621a6744a3311
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
Updated by ko1 (Koichi Sasada) over 9 years ago
- Status changed from Feedback to Closed
Please reopen if you got same error on 2.2.3.