|Subject:||Re: [Libunwind-devel] UNW_CACHE_PER_THREAD|
|Date:||Wed, 9 Jan 2013 16:40:25 +0000|
Thank you for the quick reply!
Please help us with these follow-up questions:
1. Since we are not calling libunwind from inside the signal handler, why is it an issue that dl_iterate_phdr() is not async-signal-safe?
2. Would you elaborate on the reason(s) why per-thread caching in libunwind (along the lines of IA64) is not sufficient? We would like to fully understand the issues here and the challenges that we are bound to face if we go down that path. Please provide us with some pointers as this will potentially save us weeks of qualification effort.
3. Would you confirm our understanding that on Linux, the PER_THREAD option is implemented as no-thread option?
Thanks and Regards,
From: address@hidden [mailto:address@hidden
On Behalf Of Arun Sharma
On Tue, Jan 8, 2013 at 2:33 PM, Prabhat Verma <address@hidden> wrote:
This is a well known issue. dl_iterate_phdr in glibc is not async signal safe. So it's not safe to call from libunwind. One solution is to patch your glibc to make it async signal safe (trade-off: allocate all the needed memory upfront or using async signal safe APIs and use atomics where possible). It's not trivial, but not impossible either.
Other solutions can mask this problem, but on a large enough dataset, this issue will manifest in other ways.
|[Prev in Thread]||Current Thread||[Next in Thread]|