Fix: lttng_event_notifier_group_error_counter_cmd does not respect caller convention
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 1 Mar 2021 18:07:27 +0000 (13:07 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Mar 2021 20:05:30 +0000 (15:05 -0500)
commitba5b3d2bf3ecd8614e74efc1db2f5a626c5d9a92
treeea111908800a91824d5f38c8e07b9a198d7b9db8
parentc0c0989ab70574e09b2f7e8b48c2da6af664a849
Fix: lttng_event_notifier_group_error_counter_cmd does not respect caller convention

The callers of lttng_event_notifier_group_error_counter_cmd (via
callback) expects that, on success, the object for which the ownership was
taken be set to -1 or NULL.

In this case, the shm_fd filed was not set to -1. Resulting in the
caller closing the fd and leading to errors on subsequent call.

e.g:
 sample: lttng-ust-fd-tracker.c:300: int lttng_ust_add_fd_to_tracker(int): Assertion `!IS_FD_SET(fd, lttng_fd_set)' failed.
 Error: Error sending counter cpu data to UST tracer: status=APP_DEAD
 Error: Failed to setup event notifier error accounting for app
 ./test.sh: line 5: 2650455 Aborted                 (core dumped) ../lttng-ust/doc/examples/easy-ust/sample
 lttng-sessiond: ustctl.c:192: int ustctl_release_object(int, struct lttng_ust_object_data *): Assertion `0' failed.

Change-Id: I79b242768cf7d27cd9a50c31b56423c8de08abd5
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-abi.c
This page took 0.025576 seconds and 4 git commands to generate.