This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/17463] mutexes owned by a terminated thread are supposed to be owned by an imaginary thread
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 05 Nov 2019 14:27:47 +0000
- Subject: [Bug nptl/17463] mutexes owned by a terminated thread are supposed to be owned by an imaginary thread
- Auto-submitted: auto-generated
- References: <bug-17463-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17463
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Rich Felker from comment #2)
> One relatively inexpensive way to resolve conformance here is to have
> threads keep (in the TCB/TLS) a count of the number of recursive or
> error-checking mutexes they currently one which are not robust. Then, at
> thread exit time, if the count is not zero, instead of SYS_exit, the thread
> can zero out its TID, futex_wake it, and go into an infinite SYS_pause loop
> with all signals blocked. This in effect reserves the TID against reuse.
I think this has global, system-wide impact, because TIDs are implemented in
the kernel as task IDs, which are per-PID-namespace, not per process. I expect
this approach, while technically correct, would break quite a few workloads.
--
You are receiving this mail because:
You are on the CC list for the bug.