On 30/06/15 13:37, Willy Tarreau wrote:
(...)
12:37:57.056999 sendto(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
(...)
0\0\0\0\0\0\0\0\0\0\0\0",
2967, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 2967
Huh?
We find it here, pretty easily this time thanks to the long series of
zeroes :
Looking at the send() code, it's pretty clear that there's no way the send
pointer can change there upon EAGAIN. Thus I'm heading towards a different
possibility : since we sent another request from the same buffer between
the EAGAIN and the send(0), I'm suspecting that the issue happens during the
realign of the response buffer. It's possible that pending data are improperly
dealt with and result in buf->ptr + buf->o to point to a wrong location in the
buffer, in your case probably the end of the buffer full of zeroes since it
has not been filled yet.
I'm now trying to figure what's happening.
Thanks a lot for your traces, they're extremely helpful!
Willy
I'm glad I was able to reproduce it. Thank you very much for investigating.
Unfortunately, I don't have sufficient skill with C to investigate any
further myself, but I'd be more than happy to test any patch.
Charlie