From fcf0f774e2b567e5dcf9190a84973b7a4e06eb7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 13 Jun 2019 14:41:48 -0400 Subject: [PATCH] Fix: don't hide EBADF error subbuffer write MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are _no_ legitimate circumstances where a "EBADF" error should be considered normal in a multi-threaded program. This doesn't fix a known problem, but it hid an error while testing a development branch. It is considered a fix since not logging this error can make debugging more difficult if this was, in fact, hiding a problem. Signed-off-by: Jérémie Galarneau --- src/common/consumer/consumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index 7a7f7954b..efafeddbc 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -1856,7 +1856,7 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap( relayd_hang_up = 1; /* Socket operation failed. We consider the relayd dead */ - if (errno == EPIPE || errno == EINVAL || errno == EBADF) { + if (errno == EPIPE) { /* * This is possible if the fd is closed on the other side * (outfd) or any write problem. It can be verbose a bit for a -- 2.34.1