https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112022-07-07T14:33:39ZRuby Issue Tracking SystemRuby master - Bug #18903: Stack overflow signal handling seems to be triggered once and then not working afterhttps://bugs.ruby-lang.org/issues/18903?journal_id=983042022-07-07T14:33:39Zchrisseaton (Chris Seaton)chris@chrisseaton.com
<ul></ul><p>(Found by Jean Boussier)</p> Ruby master - Bug #18903: Stack overflow signal handling seems to be triggered once and then not working afterhttps://bugs.ruby-lang.org/issues/18903?journal_id=983072022-07-07T20:28:33ZEregon (Benoit Daloze)
<ul></ul><p>In general it is not possible to recover from a stack overflow (be it in C or Ruby), the executing program should be considered hopelessly corrupted because e.g. it might have happened in the middle of a critical section.<br>
So IMHO the right fix would be to make stack overflows not rescue-able and hard exit on such a case.<br>
That's from my experience with stack overflows on the JVM, some details are different on CRuby but the overall problem is the same.</p> Ruby master - Bug #18903: Stack overflow signal handling seems to be triggered once and then not working afterhttps://bugs.ruby-lang.org/issues/18903?journal_id=1049012023-10-13T03:18:33Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>Discussed at the dev meeting. <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> said he would investigate if he could fix it with M2.</p>
<p>Recovering from a stack overflow in C is not portable and complete, but it is a fact that they work almost well in Linux, which is the main production environment. If we make it a fatal error that cannot be rescued normally, it might impact on users of Rails apps, job queues like Sidekiq, etc.</p>