Error while waiting for input: Bad file descriptor

Julien Muchembled jm at jmuchemb.eu
Wed Jul 2 14:05:31 CEST 2014


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


More information about the tinc mailing list