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

i#4075: Fix deadlock on double takeover #4080

Merged
merged 1 commit into from
Feb 3, 2020
Merged

Conversation

derekbruening
Copy link
Contributor

Fixes a double-takeover deadlock by changing
nt_wait_event_with_timeout() to use a raw syscall to keep the PC in
dynamorio.dll for os_take_over_all_unknown_threads() (and synch_with_*
and other routines) to more easily identify a thread in DR code. In
particular this is required to avoid a double takeover on a race
between intercept_new_thread() and os_take_over_all_unknown_threads().

Fixes #4075

Fixes a double-takeover deadlock by changing
nt_wait_event_with_timeout() to use a raw syscall to keep the PC in
dynamorio.dll for os_take_over_all_unknown_threads() (and synch_with_*
and other routines) to more easily identify a thread in DR code.  In
particular this is required to avoid a double takeover on a race
between intercept_new_thread() and os_take_over_all_unknown_threads().

Fixes #4075
@derekbruening
Copy link
Contributor Author

AArch64 is #3980. Appveyor is another for #4058, but all of the test failures by timeout are gone, so this seems to have fixed those as well. nudge_test is passing but with #4077 maybe it shouldn't be de-flaked just yet.

@derekbruening derekbruening merged commit 75c30b2 into master Feb 3, 2020
@derekbruening derekbruening deleted the i4075-deadlock branch February 3, 2020 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEADLOCK when nudge sent: thread_initexit_lock has no owner but lock_requests==4
1 participant