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

Add missing GVL hooks for M:N threads and ractors #9073

Merged

Conversation

jhawthorn
Copy link
Member

Followup: #9050

This fixes GVL instrumentation in three locations it was missing related to M:N threads and Ractors:

  • Suspending when blocking on a Ractor
  • Suspending when doing a coroutine transfer from an M:N thread
  • Resuming after an M:N thread starts

cc @jpcamara @byroot @ko1 @tenderlove

@byroot
Copy link
Member

byroot commented Nov 30, 2023

I think the CI errors may be legit though? Something Ractor related, not super clear, but too consistent to just be a flake

[Bug #20019]

This fixes GVL instrumentation in three locations it was missing:
- Suspending when blocking on a Ractor
- Suspending when doing a coroutine transfer from an M:N thread
- Resuming after an M:N thread starts

Co-authored-by: Matthew Draper <matthew@trebex.net>
@jhawthorn jhawthorn force-pushed the fix-gvl-instrumentation-missing-events branch from d49573a to 6f001b3 Compare December 2, 2023 01:54
@jhawthorn
Copy link
Member Author

The errors were legit, I think I figured it out. I need to do a bit of a dance to do tests using Ractors without breaking later tests.

@byroot
Copy link
Member

byroot commented Dec 2, 2023

The two remaining errors were flakes, they passed on a retry.

:shipit:

@jhawthorn jhawthorn merged commit ad54fbf into ruby:master Dec 2, 2023
98 checks passed
@jhawthorn jhawthorn deleted the fix-gvl-instrumentation-missing-events branch December 2, 2023 18:06
@junaruga
Copy link
Member

junaruga commented Dec 4, 2023

Thanks for reverting this PR's commit on #9108.

I see this PR triggered a random test failure. So, please run CI a few times next time to avoid it.
https://app.travis-ci.com/github/ruby/ruby/jobs/614404479#L2977
https://app.travis-ci.com/github/ruby/ruby/jobs/614388393#L3012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants