[Top][All Lists]

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

[Libunwind-devel] dl_iterate_phdr deadlock in unw_step

From: Jared Cantwell
Subject: [Libunwind-devel] dl_iterate_phdr deadlock in unw_step
Date: Wed, 17 Feb 2016 16:16:49 -0700

We recently ran into an issue on where a signal handler was calling unw_step() and deadlocked because the thread it interrupted was inside of dl_iterate_phdr (holding its lock) and unw_step ended up calling dl_iterate_phdr too, causing a deadlock.  We found a few threads mentioning this in the past:

We can't tell from those threads whether this was ever resolved or not, because the documentation still clearly states that unw_step is signal safe when that appears to not be the case.

  g++ (4.6.3)
  ubuntu 12.04
  3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:50:54 UTC 2014
  i686 i686 i386 GNU/Linux

Is there any workaround at all that has been used elsewhere?  Perhaps a way to know if the interrupted thread has the lock?  An alternate caching scheme?  Intercept the dl_iterate_phdr call to know if the interrupted thread might have the lock?  Some other hack to workaround this problem?

Any help is appreciated.


reply via email to

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