You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Spring enabled, a Ruby command interrupted by a signal exits with a different exit code compared to that same command run with Spring disabled.
This issue was detected in our containerized development environments, which run inside of Docker. Because Docker enforces memory constraints by OOM'ing and SIGKILL'ing offending processes. The differing behavior can be observed in an application (Ruby 2.7.5, Rails 7.0.2.4, Spring 4.0.0) when forcing an OOM error:
Spring enabled:
$ bin/rails runner "arr = []; while true do; arr.push(1); end"
Running via Spring preloader in process 242
$ echo$?
0
It looks like the status.exitstatus returned by Process.wait2 is nil for signaled processes, and the conversion to the corresponding unix/POSIX exit code for that signal is not done implicitly. exitstatus is returned directly by terminated processes here.
Could this conversion of signal to exit code be added?
The text was updated successfully, but these errors were encountered:
With Spring enabled, a Ruby command interrupted by a signal exits with a different exit code compared to that same command run with Spring disabled.
This issue was detected in our containerized development environments, which run inside of Docker. Because Docker enforces memory constraints by OOM'ing and SIGKILL'ing offending processes. The differing behavior can be observed in an application (Ruby 2.7.5, Rails 7.0.2.4, Spring 4.0.0) when forcing an OOM error:
Spring enabled:
Spring disabled:
It looks like the
status.exitstatus
returned byProcess.wait2
isnil
for signaled processes, and the conversion to the corresponding unix/POSIX exit code for that signal is not done implicitly.exitstatus
is returned directly by terminated processes here.Could this conversion of signal to exit code be added?
The text was updated successfully, but these errors were encountered: