[PATCH v12 1/2] malloc: add tcache support for large chunk caching

Florian Weimer fweimer@redhat.com
Tue Jul 8 18:09:17 GMT 2025


* Wilco Dijkstra:

> Hi,
>
>> Thanks for verifying it.
>> Actually I tried the same with 2.41 release ... hang still happens there.
>>
>> Any chance this is an actual race in scanimage or other used library ?
>
> It hangs in malloc code, so it's either corruption of the malloc lock or
> a race condition in malloc code. Eg. reused_arena has several FIXME for
> race conditions...

I also see hangs on dl_load_lock.

The program uses pthread_cancel Maybe we have an unexpected cancellation
point somewhere.  Invoking pthread_cancel for thread that calls dlopen
is a bit ambitious.  If one of the ELF constructors has a cancellation
point, that's going to lead to dl_load_lock hang.

I can't reproduce it under GDB or strace, which makes it kind of hard to
figure out where the cancellation is acted upon.

Thanks,
Florian



More information about the Libc-alpha mailing list