[lttng-dev] [RFC PATCH lttng-ust] Implement register_done waiting via LD_AUDIT

Alexander Monakov amonakov at ispras.ru
Wed Jul 2 11:02:09 EDT 2014


Thanks Mathieu for such detailed response.  I did not understand the nature of
the deadlock until your explanation.

My suggestion for the immediate problem is: can you restructure the code so
that all preliminary work (connecting to the daemon etc.) is done directly
from the constructor before spawning the secondary thread?  So that you don't
have to suspend after launching the listener thread?  From your explanation it
looks like there's no particular reason to do that work in the listener
thread, except perhaps the convenience of programming (not needing to pass
around the socket, etc).

Admittedly the above is written from general principles, so I do apologize if
I'm not seeing some real LTTng-specific issues there and sound like an
armchair code analyst.

Apropos, and you might already know that: Glibc runs static constructors from
LD_PRELOAD'ed DSOs _after_ the ctors from libs loaded as dependencies.

Alexander



More information about the lttng-dev mailing list