[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] dl_iterate_phdr deadlocks on x86_64
From: |
Lassi Tuura |
Subject: |
Re: [Libunwind-devel] dl_iterate_phdr deadlocks on x86_64 |
Date: |
Thu, 6 May 2010 19:03:15 +0200 |
Hi,
Yes you definitely can get caught for example right in the middle of mutex
operations in dl_iterate_phdr(), making re-entry dangerous. I've seen this
happen relatively rarely, but it does happen.
At the moment my preferred candidate solution is to hook our sampler to
_dl_debug_state(), capture shared library state changes then, and find a way to
feed the information ourselves to libunwind so that it won't call
dl_iterate_phdr() at all. I don't know for sure this will work, in particular
that we would receive the call at appropriate (before any calls to newly loaded
shared library can occur for example).
I would be interested if anyone is able to invent any fully reliable other
solution.
Regards,
Lassi