Skip to contentSkip to conversation

Fix: close wait_fd on kernel tracing

PATCH Mathieu Desnoyers 1 participant 1 message Jul 8, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines · * Julien Desfossez ([email protected]) wrote:

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.

Just for traceability on the ML: this patch had indeed been merged into master and stable-2.2 of lttng-tools.

Mathieu

Quoted 29 lines
---
 src/common/consumer.c |    4 ++++
 1 file changed, 4 insertions(+)
src/common/consumer.c +4 -0
index 044a504..84865d3 100644
@@ -463,6 +463,10 @@ void consumer_del_stream(struct lttng_consumer_stream *stream,
 				PERROR("munmap");
 			}
 		}
+		ret = close(stream->wait_fd);
+		if (ret) {
+			PERROR("close");
+		}
 		break;
 	case LTTNG_CONSUMER32_UST:
 	case LTTNG_CONSUMER64_UST:
Signature · 7 lines
1.7.10.4


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com