This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/17463] mutexes owned by a terminated thread are supposed to be owned by an imaginary thread


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]