[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] deadlock in get_rs_cache
From: |
Arun Sharma |
Subject: |
Re: [Libunwind-devel] deadlock in get_rs_cache |
Date: |
Thu, 14 Jan 2016 15:54:27 -0800 |
On Tue, Jan 12, 2016 at 10:40 AM, Howard Chu <address@hidden> wrote:
> Howard Chu wrote:
>>
>> Using libunwind 1.1 on SLES with my own malloc tracer, I get a deadlock in
>> various places, e.g.:
>
>
> The same thing happens with gperftools heap checker.
>
The deadlock I know about happens because dl_iterate_phdr(), something
libunwind calls to locate unwind information is not async signal safe
because it calls malloc.
To make libunwind usable in a malloc tracer, people generally
implement their own dl_iterate_phdr() that doesn't call malloc.
libunwind-1.1 is old and I've not been able to devote enough time to
libunwind to make a new release.
You may be able to avoid this particular lock by choosing UNW_CACHE_PER_THREAD.
-Arun