-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot rescue LocalJumpError originated in other thread #4697
Comments
This is fixed by marking all thread procs as escaped, similar to the other fix in #4686. The logic for marking the block escaped worked properly, but the proc duplicated the block and did not preserve its escape state. |
@ivoanjo Can you add a case for this to ruby/spec, either through our spec/ruby dir or https://github.com/ruby/spec? |
Thanks for the awesome fix. PR with test for ruby-spec submitted! My first spec PR, hopefully not the last :) |
This checks that the LocalJumpError is correctly propagated across threads, see jruby/jruby#4697 .
Note that the new spec, now in JRuby seems to not pass:
It looks like the exception is raised on the |
Wow, weird. I could have sworn that at least when I submitted the spec, 9.1.12.0 was failing but trunk was passing it. |
Environment
Provide at least:
jruby 9.1.11.0-SNAPSHOT (2.3.3) 2017-06-29 4bc6c50 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 [linux-x86_64]
(Noticed that latest master still reports 9.1.11.0, but this is defnitely latest master)Linux maruchan 4.11.0-041100-generic #201705041534 SMP Thu May 4 19:36:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 17.04
Expected Behavior
As a followup of #4686, while I was trying to isolate the problem I also wrote the following rather-synthetic example:
On MRI the output is:
Actual Behavior
Under JRuby, this case does not work properly:
This is lower priority for me than #4686 as I that one bit me on a real-world application and this one was an accidental side discovery.
The text was updated successfully, but these errors were encountered: