Skip to content
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

ConditionVariable#wait causes thread to wait forever in 9.2.8.0 #5863

Open
asppsa opened this issue Sep 9, 2019 · 1 comment

Comments

@asppsa
Copy link

commented Sep 9, 2019

Environment

  • jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 25.222-b05 on 1.8.0_222-b05 +jit [linux-x86_64]
  • Linux managua 5.2.9-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 16 11:29:43 UTC 2019 x86_64 GNU/Linux
  • This issue appears to affect only 9.2.8.0. From my testing, the issue is not present in 9.2.7.0, or in 9.1.x.
  • It does not involve any gems - just core libraries.

Expected Behaviour

Running this file should result in "ping" and "pong" being printed repeatedly to the screen. This works on MRI and on older versions of JRuby.

Actual Behaviour

"ping" and "pong" are printed some number of times (it varies), and then output stops. Output from Ctrl+\ indicates that both the main thread and Thread-1 are in a waiting state.

Additional info

This issue has been filed on advice from @headius, after a conversation on IRC. He has suggested that bea9ad4 is the source of the issue.

asppsa added a commit to asppsa/jruby that referenced this issue Sep 10, 2019
Test passing control between two threads in the ConditionVariable spec
This tests (J)Ruby's ability to safely switch back and forth between two
threads that both have locks on a single mutex, as identified in jruby#5863.
asppsa added a commit to asppsa/jruby that referenced this issue Sep 10, 2019
Test passing control between two threads in the ConditionVariable spec
This tests (J)Ruby's ability to safely switch back and forth between two
threads that both have locks on a single mutex, as identified in jruby#5863.

@kares kares added this to the JRuby 9.2.9.0 milestone Sep 10, 2019

@headius

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Thank you for filing this one! This definitely should be fixed for 9.2.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.