Project

General

Profile

Actions

Bug #11692

closed

[PATCH] Re-enable GC if stack overflow was caught from signal handler

Added by gazay (Alex Gaziev) over 8 years ago. Updated about 8 years ago.

Status:
Closed
Target version:
-
[ruby-core:71497]

Description

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) example1.rb Example with puts gazay (Alex Gaziev), 11/15/2015 05:21 PM
example2.rb (333 Bytes) example2.rb Example with json gazay (Alex Gaziev), 11/15/2015 05:21 PM
re-enable-gc-after-stackoverflow-trunk.patch (985 Bytes) re-enable-gc-after-stackoverflow-trunk.patch Patch for trunk gazay (Alex Gaziev), 11/15/2015 05:21 PM
re-enable-gc-after-stackoverflow-ruby-2-2.patch (985 Bytes) re-enable-gc-after-stackoverflow-ruby-2-2.patch Patch for ruby_2_2 gazay (Alex Gaziev), 11/15/2015 05:21 PM
gc_threads_issue.rb (1.53 KB) gc_threads_issue.rb ebeigarts (Edgars Beigarts), 11/17/2015 07:53 PM
re-enable-GC-if-stack-overflow-was-caught-from.patch (1.5 KB) re-enable-GC-if-stack-overflow-was-caught-from.patch Patch for ruby 2.2.4 gazay (Alex Gaziev), 12/18/2015 10:08 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0