Document application fork/clone vs statedump locking limitations
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Feb 2024 18:28:53 +0000 (13:28 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Feb 2024 18:28:53 +0000 (13:28 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/side/trace.h

index 53d5df87a60301d205cded4ced1ed7eb7d2e0055..647748e95b83279477b9fca94355df2bb55cacfd 100644 (file)
@@ -169,6 +169,12 @@ void side_statedump_call_variadic(const struct side_event_state *state,
  * instrumentation of multi-threaded applications which rely on
  * locking to synchronize their data structures across threads, and
  * for libraries which have no control on application event loops.
+ *
+ * Applications using fork/clone with locks held should not take those
+ * locks (or block on any resource that depend on these locks) within
+ * their statedump callbacks registered with the agent thread. This
+ * could result in deadlocks when pthread_atfork handler waits for
+ * agent thread quiescence.
  */
 enum side_statedump_mode {
        SIDE_STATEDUMP_MODE_POLLING,
This page took 0.023824 seconds and 4 git commands to generate.