ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:71497] [Ruby trunk - Bug #11692] [Open] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
@ 2015-11-15 17:24 ` alex.gaziev
  2015-11-16 13:46 ` [ruby-core:71505] [Ruby trunk - Bug #11692] " alex.gaziev
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: alex.gaziev @ 2015-11-15 17:24 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been reported by Alex Gaziev.

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: 
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71505] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
  2015-11-15 17:24 ` [ruby-core:71497] [Ruby trunk - Bug #11692] [Open] [PATCH] Re-enable GC if stack overflow was caught from signal handler alex.gaziev
@ 2015-11-16 13:46 ` alex.gaziev
  2015-11-17 19:52 ` [ruby-core:71525] " edgars.beigarts
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: alex.gaziev @ 2015-11-16 13:46 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Alex Gaziev.


This issue is related: https://bugs.ruby-lang.org/issues/11593

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54878

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: 
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71525] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
  2015-11-15 17:24 ` [ruby-core:71497] [Ruby trunk - Bug #11692] [Open] [PATCH] Re-enable GC if stack overflow was caught from signal handler alex.gaziev
  2015-11-16 13:46 ` [ruby-core:71505] [Ruby trunk - Bug #11692] " alex.gaziev
@ 2015-11-17 19:52 ` edgars.beigarts
  2015-11-17 19:53 ` [ruby-core:71526] " edgars.beigarts
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: edgars.beigarts @ 2015-11-17 19:52 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Edgars Beigarts.


I'm having similia issue when running tests with capybara that starts additional server in a new thread.
If I have some problems in my rails app that raises SystemStackError in the server thread then I am left without a GC and memory just keeps growing and growing, I have tried manually calling GC.start after that, but it doesn't help, GC.stat dislays the same number for major/minor.

I was trying to create a simple example, but I run into other issues too.
Here is the example: https://gist.github.com/ebeigarts/933f1601332609ed33a8



----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54905

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: 
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71526] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-11-17 19:52 ` [ruby-core:71525] " edgars.beigarts
@ 2015-11-17 19:53 ` edgars.beigarts
  2015-11-18  1:52 ` [ruby-core:71537] " alex.gaziev
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: edgars.beigarts @ 2015-11-17 19:53 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Edgars Beigarts.

File gc_threads_issue.rb added

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54906

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: 
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71537] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2015-11-17 19:53 ` [ruby-core:71526] " edgars.beigarts
@ 2015-11-18  1:52 ` alex.gaziev
  2015-11-19  6:55 ` [ruby-core:71571] " ko1
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: alex.gaziev @ 2015-11-18  1:52 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Alex Gaziev.


Edgars Beigarts wrote:
> Do I need to open a new issue for this?

I think it is the same problem. I wrote small explanation what is happening: https://gist.github.com/gazay/54da61919b85eb2e0d42 

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54917

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: 
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71571] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2015-11-18  1:52 ` [ruby-core:71537] " alex.gaziev
@ 2015-11-19  6:55 ` ko1
  2015-11-19  8:55 ` [ruby-core:71579] " edgars.beigarts
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: ko1 @ 2015-11-19  6:55 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Koichi Sasada.

Assignee set to Koichi Sasada

Thank you for your great survey!


----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54953

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71579] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2015-11-19  6:55 ` [ruby-core:71571] " ko1
@ 2015-11-19  8:55 ` edgars.beigarts
  2015-11-19 13:47 ` [ruby-core:71588] " ko1
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: edgars.beigarts @ 2015-11-19  8:55 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Edgars Beigarts.


Tried with ruby head, this solves the GC problems now, but it doesn't solve the other problem that is visible if you run my example -
https://gist.github.com/ebeigarts/44648eb7b2773e102335

In ruby 2.2 it looks like if a stack overflow is raised in a thread 2 times then on the 2nd time thread just dies.

In ruby trunk it looks like if a stack overflow is raised in a thread 2 times then on the 2nd time the whole process just hangs and the only way to stop is kill -9.


----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54960

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71588] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2015-11-19  8:55 ` [ruby-core:71579] " edgars.beigarts
@ 2015-11-19 13:47 ` ko1
  2015-11-20  6:55 ` [ruby-core:71603] " alex.gaziev
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: ko1 @ 2015-11-19 13:47 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Koichi Sasada.


Unfortunately, it is known problem (2nd time machine stack overflow we can not capture correctly).

* 1st machine stack overflow
  * SEGV
  * check machine stack overflow
  * raise an error from signal handler (*1) by longjmp.
* 2nd machine stack overflow
  * SEGV
  * signal status is signaling. So OS can not deliver signal correctly...

The correct way is restoring signal status using sigsetjmp/siglongjmp at (*1).
However, on Linux 2.x, siglongjmp is too slow than longjmp, so that we continue to use longjmp, at least the last time we had discussed this issue. We can't slow down Ruby interpreter for such a corner case.

However, Linux 2.x is older OS. So that we can change.
(BTW, I'm using Linux 2.6 on several machines)


----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54971

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:71603] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2015-11-19 13:47 ` [ruby-core:71588] " ko1
@ 2015-11-20  6:55 ` alex.gaziev
  2015-12-18 10:09 ` [ruby-core:72360] " alex.gaziev
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: alex.gaziev @ 2015-11-20  6:55 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Alex Gaziev.


Koichi, do you plan to do backport to 2.2 version of this patch?

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-54987

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:72360] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (8 preceding siblings ...)
  2015-11-20  6:55 ` [ruby-core:71603] " alex.gaziev
@ 2015-12-18 10:09 ` alex.gaziev
  2015-12-18 10:15 ` [ruby-core:72361] " v.ondruch
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: alex.gaziev @ 2015-12-18 10:09 UTC (permalink / raw)
  To: ruby-core

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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:72361] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (9 preceding siblings ...)
  2015-12-18 10:09 ` [ruby-core:72360] " alex.gaziev
@ 2015-12-18 10:15 ` v.ondruch
  2015-12-18 10:16 ` [ruby-core:72362] " alex.gaziev
  2016-03-28 17:21 ` [ruby-core:74642] [Ruby trunk Bug#11692] " nagachika00
  12 siblings, 0 replies; 13+ messages in thread
From: v.ondruch @ 2015-12-18 10:15 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Vit Ondruch.

Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED

Backport should be probably requested

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-55654

* Author: Alex Gaziev
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:72362] [Ruby trunk - Bug #11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (10 preceding siblings ...)
  2015-12-18 10:15 ` [ruby-core:72361] " v.ondruch
@ 2015-12-18 10:16 ` alex.gaziev
  2016-03-28 17:21 ` [ruby-core:74642] [Ruby trunk Bug#11692] " nagachika00
  12 siblings, 0 replies; 13+ messages in thread
From: alex.gaziev @ 2015-12-18 10:16 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Alex Gaziev.


Thank you, didn't know that

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-55655

* Author: Alex Gaziev
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ruby-core:74642] [Ruby trunk Bug#11692] [PATCH] Re-enable GC if stack overflow was caught from signal handler
       [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
                   ` (11 preceding siblings ...)
  2015-12-18 10:16 ` [ruby-core:72362] " alex.gaziev
@ 2016-03-28 17:21 ` nagachika00
  12 siblings, 0 replies; 13+ messages in thread
From: nagachika00 @ 2016-03-28 17:21 UTC (permalink / raw)
  To: ruby-core

Issue #11692 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE

Backported into `ruby_2_2` branch at r54340.

----------------------------------------
Bug #11692: [PATCH] Re-enable GC if stack overflow was caught from signal handler
https://bugs.ruby-lang.org/issues/11692#change-57769

* Author: Alex Gaziev
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-03-28 16:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11692.20151115172431@ruby-lang.org>
2015-11-15 17:24 ` [ruby-core:71497] [Ruby trunk - Bug #11692] [Open] [PATCH] Re-enable GC if stack overflow was caught from signal handler alex.gaziev
2015-11-16 13:46 ` [ruby-core:71505] [Ruby trunk - Bug #11692] " alex.gaziev
2015-11-17 19:52 ` [ruby-core:71525] " edgars.beigarts
2015-11-17 19:53 ` [ruby-core:71526] " edgars.beigarts
2015-11-18  1:52 ` [ruby-core:71537] " alex.gaziev
2015-11-19  6:55 ` [ruby-core:71571] " ko1
2015-11-19  8:55 ` [ruby-core:71579] " edgars.beigarts
2015-11-19 13:47 ` [ruby-core:71588] " ko1
2015-11-20  6:55 ` [ruby-core:71603] " alex.gaziev
2015-12-18 10:09 ` [ruby-core:72360] " alex.gaziev
2015-12-18 10:15 ` [ruby-core:72361] " v.ondruch
2015-12-18 10:16 ` [ruby-core:72362] " alex.gaziev
2016-03-28 17:21 ` [ruby-core:74642] [Ruby trunk Bug#11692] " nagachika00

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).