Fix: don't hide EBADF error subbuffer write
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 18:41:48 +0000 (14:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 25 Jul 2019 19:51:46 +0000 (15:51 -0400)
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 <jeremie.galarneau@efficios.com>
src/common/consumer/consumer.c

index 7a7f7954be3c843df01bfea1af6d3c815e345773..efafeddbc3543e0d26c5cd2f66f046663c5b8572 100644 (file)
@@ -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
This page took 0.027824 seconds and 4 git commands to generate.