Last active
December 5, 2018 19:38
-
-
Save mbj/e6795ee5e0583c5541ee250e9942279a to your computer and use it in GitHub Desktop.
Crash Ruby 2.5.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system('uname -a') | |
# not relevant just to make sure we terminate early | |
# core dumping is expensive. | |
Thread.abort_on_exception = true | |
MUTEX = Mutex.new | |
# You may have to up this on your platform | |
50.times do | |
Thread.new do | |
pid = Process.fork { MUTEX.synchronize {} } | |
MUTEX.synchronize {} | |
Process.waitpid(pid) | |
end | |
end |
mostlyobvious
commented
Dec 5, 2018
$ ruby -v
ruby 2.6.0preview3 (2018-11-06 trunk 65578) [x86_64-darwin18]
Darwin morbo.lan 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
# did not crash
Linux dev 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
crash.rb:12: [BUG] unexpected THREAD_KILLED
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
Linux dev 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
crash.rb:12: [BUG] unexpected THREAD_KILLED
ruby 2.6.0preview1 (2018-02-24 trunk 62554) [x86_64-linux]
ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin17]
Darwin morbo.lan 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
# did not crash
ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]
Darwin morbo.lan 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
# did not crash
ruby -v
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
Linux dev 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
# did not crash
Linux dev 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
crash.rb:12: [BUG] unexpected THREAD_KILLED
ruby 2.6.0preview3 (2018-11-06 trunk 65578) [x86_64-linux]
no crash:
ruby -v
ruby 2.6.0preview3 (2018-11-06 trunk 65578) [x86_64-linux]
Linux mbj 4.14.85-1-lts #1 SMP Sat Dec 1 13:41:17 CET 2018 x86_64 GNU/Linux
Darwin MacBook-Pro.local 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018; root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64
crash.rb:13: [BUG] unexpected THREAD_KILLED
ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
Note: did not fail the first time I ran it. It crashes ~80% of the time.
Upstream fixed it in: https://bugs.ruby-lang.org/issues/15383
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment