From: Jérémie Galarneau Date: Wed, 16 Oct 2019 22:53:47 +0000 (-0400) Subject: Fix: sessiond: leak of trace chunk on destruction error X-Git-Tag: v2.12.0-rc1~304 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=3156892b9633c1fbee3ace6cc2b013e678343083;hp=3156892b9633c1fbee3ace6cc2b013e678343083 Fix: sessiond: leak of trace chunk on destruction error By design, a trace chunk can be leaked on the consumer daemon's end if the session daemon does not close it. This is because the consumer daemon has no "top-level" session object which could bound the lifetime of a trace chunk. It was reported that errors during a session destruction operation could result in a trace chunk leak being reported by the consumer daemon on shut down. In the case that was reported, the failure to launch an application caused the metadata channel to never be created. When the session was destroyed, the rotation of the metadata channel failed with a "channel does not exist" error. This error caused cmd_rotate_session() to abort before the trace chunk close command was sent to the consumer daemon(s). This ultimately results in the leak described earlier. The fix consists in performing the trace chunk close command on the consumer daemon even if the rotation itself fails. Signed-off-by: Jérémie Galarneau ---