Julien Muchembled
2014-Jul-02 12:05 UTC
Error while waiting for input: Bad file descriptor
Hello, Thanks to recent fix of 'Failed to decrypt and verify packet' issue by Etienne, I decided to upgrade tinc on a few nodes. I had to go back to 1.1pre9 immediately because tinc on my laptop didn't survive the restart of other nodes. It aborted with the following message: Error while waiting for input: Bad file descriptor I could reproduce the issue. Here is strace output: select(14, [4 5 6 7 8 9 10 12 13], [], NULL, {0, 377947}) = 0 (Timeout) sendto(3, "<30>Jul 2 01:39:52 tinc.jmuchem"..., 107, MSG_NOSIGNAL, NULL, 0) = 107 sendto(3, "<29>Jul 2 01:39:52 tinc.jmuchem"..., 95, MSG_NOSIGNAL, NULL, 0) = 95 sendto(3, "<31>Jul 2 01:39:52 tinc.jmuchem"..., 106, MSG_NOSIGNAL, NULL, 0) = 106 sendto(3, "<31>Jul 2 01:39:52 tinc.jmuchem"..., 100, MSG_NOSIGNAL, NULL, 0) = 100 close(12) = 0 sendto(3, "<30>Jul 2 01:39:52 tinc.jmuchem"..., 90, MSG_NOSIGNAL, NULL, 0) = 90 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 12 fcntl(12, F_GETFL) = 0x2 (flags O_RDWR) fcntl(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0 setsockopt(12, SOL_TCP, TCP_NODELAY, [1], 4) = 0 setsockopt(12, SOL_IP, IP_TOS, [16], 4) = 0 fcntl(12, F_SETFD, FD_CLOEXEC) = 0 connect(12, {sa_family=AF_INET, sin_port=htons(655), sin_addr=inet_addr("192.168.1.1")}, 16) = -1 ENETUNREACH (Network is unreachable) sendto(3, "<27>Jul 2 01:39:52 tinc.jmuchem"..., 114, MSG_NOSIGNAL, NULL, 0) = 114 close(12) = 0 sendto(3, "<27>Jul 2 01:39:52 tinc.jmuchem"..., 84, MSG_NOSIGNAL, NULL, 0) = 84 sendto(3, "<29>Jul 2 01:39:52 tinc.jmuchem"..., 97, MSG_NOSIGNAL, NULL, 0) = 97 wait4(-1, NULL, WNOHANG, NULL) = -1 ECHILD (No child processes) sendto(3, "<31>Jul 2 01:39:52 tinc.jmuchem"..., 87, MSG_NOSIGNAL, NULL, 0) = 87 sendto(3, "<31>Jul 2 01:39:52 tinc.jmuchem"..., 99, MSG_NOSIGNAL, NULL, 0) = 99 select(14, [4 5 6 7 8 9 10 12 13], [], NULL, {1, 683412}) = -1 EBADF (Bad file descriptor) sendto(3, "<27>Jul 2 01:39:52 tinc.jmuchem"..., 92, MSG_NOSIGNAL, NULL, 0) = 92
On 07/02/2014 01:05 PM, Julien Muchembled wrote:> Thanks to recent fix of 'Failed to decrypt and verify packet' issue by Etienne, I decided to upgrade tinc on a few nodes. > I had to go back to 1.1pre9 immediately because tinc on my laptop didn't survive the restart of other nodes. It aborted with the following message: > Error while waiting for input: Bad file descriptorI probably won't have time to investigate this before the week-end, but you might want to indicate the commit you're building from. It would also be helpful to have debug level 4 (-d4) output mixed with the strace output so that we can see what tinc thinks it's doing while this is happening. In addition, more log history would probably be useful. -- Etienne Dechamps
On 02/07/2014 13:05, Julien Muchembled wrote:> Hello, > > Thanks to recent fix of 'Failed to decrypt and verify packet' issue by Etienne, I decided to upgrade tinc on a few nodes. > I had to go back to 1.1pre9 immediately because tinc on my laptop didn't survive the restart of other nodes. It aborted with the following message: > Error while waiting for input: Bad file descriptorNever mind, I managed to reproduce. It seems like this happens every time there is a timeout. For anyone interested: http://pastebin.com/nvbxSzWJ -- Etienne Dechamps