[BUG] object allocation during garbage collection phase in /opt/rubies/ruby-2.2.1/lib/ruby/2.2.0/openssl/ssl.rb:177
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
Updated by MartinBosslet (Martin Bosslet) almost 6 years ago
- Status changed from Open to Feedback
- Assignee set to ko1 (Koichi Sasada)
This  seems to be the section of the code where the error happened.
ko1 (Koichi Sasada): Could this be a GC issue?
Updated by netronix (Michaël Rigart) over 5 years ago
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 grey-owl (Steve Torrence) over 5 years ago
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 mkechinov (Michael Kechinov) over 5 years ago
Same problem for Ruby 2.2.2
Ruby 2.2.2 (using RVM)
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 bmishkin1 (Ben Mishkin) over 5 years ago
Rails version 4.2.3
Ruby version 2.2.2-p95 (x86_64-linux)
RubyGems version 2.4.6
Rack version 1.6.4