[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#214387: libc6: writev() returns -1 with errno == 0



Quoting Daniel Jacobowitz:
:Can we have strace output?

I was lucky, it happened almost immediately....

My stderr gave me:

    Gdk-ERROR **: Fatal IO error 0 (Success) on X server :0.0.

And the corresponding strace output is:

    16:37:22 write(3, "\17\000"..., 368)    = 368
    16:37:22 ioctl(3, FIONREAD, [0])        = 0
    16:37:22 gettimeofday({1065451042, 336232}, NULL) = 0
    16:37:22 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 92
    16:37:22 setsockopt(92, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
    16:37:22 setsockopt(92, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
    16:37:22 fcntl64(92, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
    16:37:22 setsockopt(92, SOL_IP, IP_TOS, [16], 4) = 0
    16:37:22 connect(92, {sa_family=AF_INET, sin_port=htons(2500),
    sin_addr=inet_addr("61.131.193.83")}, 16) = -1 EINPROGRESS (Operation now in
    progress)
    16:37:22 getsockname(92, {sa_family=AF_INET, sin_port=htons(40206),
    sin_addr=inet_addr("192.168.0.3")}, [16]) = 0
    16:37:22 fcntl64(92, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
    16:37:22 write(3, "\f\0\5"..., 2044)    = 2044
    16:37:22 write(3, "J\0\6\0"..., 2048)   = 2048
    16:37:22 write(3, "F\0\5\0"..., 2040)   = 2040
    16:37:22 write(3, "8\0\4\0"..., 2036)   = 2036
    16:37:22 writev(3, [{"F\0\5\0"..., 2048}, {"\0\0\0"..., 4}], 2) = -1 EAGAIN (Resource
    temporarily unavailable)
    16:37:22 write(2, "Gdk-ERROR"..., 59)      = 59

fd #3 was probably X's socket, since I see an ioctl(FIONREAD) -- it's
definitely not a file, and my application does not do such calls.

Note that the last line I extracted here is the fatal error, so the activity
right before is the direct cause of the problem.  The writev() failed with
EAGAIN, but an errno of "0" was probably read afterwards, since the Fatal
IO callback was invoked, and it traces errno as such.

Raphael



Reply to: