A collection of LD_AUDIT bugs that are important for tools (with better formatting for this list)

Florian Weimer fweimer@redhat.com
Tue Jun 22 15:36:20 GMT 2021


* John Mellor-Crummey:

>> On Jun 22, 2021, at 3:15 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> You can already see this non-interceptable thread creation behavior
>> today (in glibc 2.33 and earlier) with thrd_create, which does not
>> result in a pthread_create call, either, despite creating a new thread
>> as if by pthread_create.
>
> Having a non-interposable thrd_create is a problem for us too, though 
> we haven’t yet seen it in practice in HPC applications (or maybe it happened
> and we were just unaware!).

I meant that thrd_create needs to be intercepted separately.  This will
still work.

>> Going back to trheading, I find it a bit curious that you intercept
>> pthread_create, but not pthread_join.  How do you detect thread exit?  I
>> assume you are interested in that event, too.  Merely wrapping the
>> thread start routine is insufficient because there are other ways for a
>> thread to exit besides returning from the start routine and calling
>> pthread_exit (e.g., thread cancellation and unwinding).
>
> We use pthread_cleanup_push to add a routine that will be called when a thread
> exits.

Okay, that should work, although some application-supplied TLS
destructors will run later than that.

Thanks,
Florian



More information about the Libc-alpha mailing list