The wait_fd in the kernel consumer streams was not closed causing a leak
of FDs in the consumer and never triggering the teardown mechanism in
the kernel tracer. This applies for metadata and data stream.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
PERROR("munmap");
}
}
+
+ if (stream->wait_fd >= 0) {
+ ret = close(stream->wait_fd);
+ if (ret) {
+ PERROR("close");
+ }
+ }
break;
case LTTNG_CONSUMER32_UST:
case LTTNG_CONSUMER64_UST:
PERROR("munmap metadata stream");
}
}
+
+ if (stream->wait_fd >= 0) {
+ ret = close(stream->wait_fd);
+ if (ret < 0) {
+ PERROR("close kernel metadata wait_fd");
+ }
+ }
break;
case LTTNG_CONSUMER32_UST:
case LTTNG_CONSUMER64_UST: