From: Julien Desfossez Date: Thu, 30 Nov 2017 20:31:27 +0000 (-0500) Subject: Fix: use a free running channel key between sessiond and kernel consumer X-Git-Tag: v2.11.0-rc1~379 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=e1f3997aa650554880105d787a864653add7c070;hp=e1f3997aa650554880105d787a864653add7c070;p=lttng-tools.git Fix: use a free running channel key between sessiond and kernel consumer We currently use the channel FD number opened by the session daemon to reference a channel in the consumer. This can lead to races where the session daemon destroys a channel and recreates one with the same FD number before the consumer has time to cleanup everything on its side, so all the commands in between that use that FD number has a key may end up working on the wrong objects. This fix introduces a free running counter as the channel key, so this decouples the channel key in the consumer from the channel FD in the session daemon. This fixes the race observed in stress tests. Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau ---