Fix: clean-up agent app hash table from the main sessiond thread
The agent application hash table, which is allocated by the session
daemon's main thread, is free'd from the agent application registration
thread.
This leads to a number of interesting scenarios under which the agent
app registration thread may encounter an error, thus tearing itself down
and freeing the agent_apps_ht_by_sock hash table. Of course, nothing then
prevents the client processing thread from accessing this invalidated hash
table to list, enable or disable agent events which leads to crashes or
assertions hitting in ht_match_reg_uid().
However, it is not necessary for the agent app registration thread to
encounter an error for this to prove problematic. As shown in bug #893,
the session daemon's teardown will assert on a NULL key in
ht_match_reg_uid() whenever it is performed while a JUL, Log4J or Python
event is still enabled in a session. This happens because the session
daemon's clean-up triggers the destruction of all sessions. The destruction
of those sessions would access the free'd agent_apps_ht_by_sock to disable
the registered agent events.
Fixes #893
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025479 seconds and 4 git commands to generate.