[Bug nptl/25942] Deadlock on stack_cache_lock between __nptl_setxid and exiting detached thread
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Jul 31 09:07:48 GMT 2020
https://sourceware.org/bugzilla/show_bug.cgi?id=25942
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
Flags| |security-
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Commit:
commit 4cab20fa49b3ea3e3454fdc4f13bf3828d8efd19
Author: Andreas Schwab <schwab@suse.de>
Date: Thu May 7 15:50:09 2020 +0200
nptl: wait for pending setxid request also in detached thread (bug 25942)
There is a race between __nptl_setxid and exiting detached thread, which
causes a deadlock on stack_cache_lock. The deadlock happens in this
state:
T1: setgroups -> __nptl_setxid (holding stack_cache_lock, waiting on
cmdp->cntr == 0)
T2 (detached, exiting): start_thread -> __deallocate_stack (waiting on
stack_cache_lock)
more threads waiting on stack_cache_lock in pthread_create
For non-detached threads, start_thread waits for its own setxid handler to
finish before exiting. Do this for detached threads as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list