-
Notifications
You must be signed in to change notification settings - Fork 128
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
3.3.0-dev: Segfault in rb_profile_frames
with N:M threads enabled
#221
Comments
I tried to use postponed jobs, but it actually crashes even more:
|
Yes, I think postponed jobs are likely to have the same problem. From what I can see M:N threads sets the EC to NULL at least part of the time (though I'd thought postponed jobs had a check for that happening and would delegate to the main thread/ec). I'm looking for solutions in Vernier, though likely a little help is needed upstream. We could fairly easily make rb_profile_frames safe to call when EC is NULL, but I worry that would "work" but give inaccurate results (I'm checking what that looks like). Out of curiosity, is this in CPU mode? I'd have somewhat expected my hack to always sample the same thread StackProf was started from in |
Not 100% sure but I don't think so.
Via ENV so that it's active on the main Ractor. I filed https://bugs.ruby-lang.org/issues/20016 and https://bugs.ruby-lang.org/issues/20017 because if even postponed job can't work, it's definitely a Ruby bug, and something to fix upstream. |
We run our CI against ruby-head, and a portion of it with N:M threads enabled on the main Ractor.
rb_profile_frames
often crashes whenN:M
are enabled.I suspect the assumption that
rb_profile_frames
is async signal safe no longer holds there?cc @ko1 @tenderlove @jhawthorn
The text was updated successfully, but these errors were encountered: