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

Ignore dead threads in coroutine_join. #4620

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Jul 1, 2021

@jeremyevans

I'm preparing a PR and noticed some failing specs in the pthread fiber implementation: https://github.com/jeremyevans/ruby/runs/2965165330#step:15:128. Looks like it also happened before my PR: https://github.com/ruby/ruby/runs/2961125088?check_suite_focus=true#step:15:131. These aren't failing every time, so the failure must be non-deterministic.

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not my area of expertise, but the change does make sense to me.

@ioquatix
Copy link
Member Author

ioquatix commented Jul 1, 2021

This fix may be insufficient, but let's try it.

It may be necessary to explicitly walk all fibers and put them into an invalid state after forking, in the child process. This deviates from the native fiber implementation where fibers will continue to work after fork AFAIK.

@ioquatix ioquatix merged commit 1862d96 into ruby:master Jul 2, 2021
@ioquatix ioquatix deleted the coroutine-pthread-fixes branch July 2, 2021 00:36
@ioquatix
Copy link
Member Author

ioquatix commented Jul 2, 2021

@nobu thanks for mentioning the CI failure, this is a first step to address it.

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