From: alex.gaziev@... Date: 2015-12-18T10:09:33+00:00 Subject: [ruby-core:72360] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler Issue #11692 has been updated by Alex Gaziev. File re-enable-GC-if-stack-overflow-was-caught-from.patch added As I see, problem wasn't fixed in Ruby 2.2.4. Patch for it in attachment ---------------------------------------- Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler https://bugs.ruby-lang.org/issues/11692#change-55653 * Author: Alex Gaziev * Status: Closed * Priority: Normal * Assignee: Koichi Sasada * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- We got ruby application running on our production server and noticed that it regularly crashes with out of memory errors. After months of investigation, I narrowed the case to the examples (1/2). After digging ruby sources and running test code, I found out that GC stopped working after recovering from native stack overflow error. Probably the relevant code appeared in 2.2 https://github.com/ruby/ruby/commit/0c391a55d3ed4637e17462d9b9b8aa21e64e2340 where ruby_disable_gc_stress became ruby_disable_gc. Patches for trunk and 2.2 branches below. ---Files-------------------------------- example1.rb (311 Bytes) example2.rb (333 Bytes) re-enable-gc-after-stackoverflow-trunk.patch (985 Bytes) re-enable-gc-after-stackoverflow-ruby-2-2.patch (985 Bytes) gc_threads_issue.rb (1.53 KB) re-enable-GC-if-stack-overflow-was-caught-from.patch (1.5 KB) -- https://bugs.ruby-lang.org/