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

HANG waiting for thread_initexit_lock from self-interp of new managed thread during attach #2688

Closed
derekbruening opened this issue Nov 3, 2017 · 0 comments

Comments

@derekbruening
Copy link
Contributor

Another attach race hit with the test from #2601.

The loop that takes over new threads lets taken-over threads start running, and they can go create child threads. If a managed child has not yet initialized and is waiting for the thread_initexit_lock at the top of dynamo_thread_init, the attach code will send it a takeover signal and we'll interpret our own code.

I'll spare the gory debugging details: it took some time to figure out what was going on, but this happens on a regular basis, at least once every 20 runs of the new test.

@derekbruening derekbruening self-assigned this Nov 3, 2017
derekbruening added a commit that referenced this issue Nov 6, 2017
Adds a check when taking over a new thread during attach to avoid
self-interp when the new thread is the child of a thread that's already
been taken over.

Tested with the api.detach_spawn test from #2601.

Fixes #2688
derekbruening added a commit that referenced this issue Nov 6, 2017
Adds a check when taking over a new thread during attach to avoid
self-interp when the new thread is the child of a thread that's already
been taken over.

Tested with the api.detach_spawn test from #2601.

Fixes #2688
fhahn pushed a commit that referenced this issue Dec 4, 2017
Adds a check when taking over a new thread during attach to avoid
self-interp when the new thread is the child of a thread that's already
been taken over.

Tested with the api.detach_spawn test from #2601.

Fixes #2688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant