libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] dl_iterate_phdr deadlocks on x86_64


From: Arun Sharma
Subject: Re: [Libunwind-devel] dl_iterate_phdr deadlocks on x86_64
Date: Thu, 6 May 2010 10:04:39 -0700

On Wed, May 5, 2010 at 6:26 PM, Stephen D. Bowline <address@hidden> wrote:
Platform: x86_64, RedHat 5, kernel 2.6.29

 I have a situation in which a callstack sampler is unwinding the stack
while a thread is in the midst of processing an exception.  This leads
to deadlocks because __cxa_throw_ is ultimately calling
dl_iterate_phdr() and so is the libunwind function
dwarf_find_proc_info().


This is a long standing problem in libunwind with no generic solution yet. Couple of possible approaches have been discussed before:

a) Implement your own async signal safe dl_iterate_phdr(). But this depends on a modified libc.

b) Call dl_iterate_phdr() in a separate thread and cache the result in a data structure that is safe to access from other threads without locks.

 -Arun

reply via email to

[Prev in Thread] Current Thread [Next in Thread]