There's something excellent in your trace : 09:52:29.759117 sendto(1, "GET /cp/testcheck.php HTTP/1.0\r\n"..., 34, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 34 09:52:29.759357 epoll_ctl(0, EPOLL_CTL_MOD, 1, {EPOLLIN|0x2000, {u32=1, u64=1}}) = 0 09:52:29.759487 gettimeofday({1389635549, 759527}, NULL) = 0 09:52:29.759603 epoll_wait(0, {{EPOLLIN, {u32=1, u64=1}}}, 200, 1000) = 1 09:52:29.768407 gettimeofday({1389635549, 768449}, NULL) = 0 09:52:29.768529 recvfrom(1, "HTTP/1.1 404 Not Found\r\nDate: Mo"..., 16384, 0, NULL, NULL) = 4344 09:52:29.768754 gettimeofday({1389635549, 768796}, NULL) = 0 09:52:29.768873 epoll_wait(0, {{EPOLLIN, {u32=1, u64=1}}}, 200, 1000) = 1 09:52:29.769096 gettimeofday({1389635549, 769137}, NULL) = 0 09:52:29.769309 recvfrom(1, "l .2s ease-in-out}.img-circle{bo"..., 16384, 0, NULL, NULL) = 16384 09:52:29.769597 recvfrom(1, NULL, 2147483647, MSG_TRUNC|MSG_DONTWAIT|MSG_NOSIGNAL, NULL, NULL) = 31400 09:52:29.769751 recvfrom(1, 0, 2147483647, 16480, 0, 0) = -1 EAGAIN (Resource temporarily unavailable) 09:52:29.769933 setsockopt(1, SOL_SOCKET, SO_LINGER, {onoff=1, linger=0}, 8) = 0 09:52:29.770087 close(1) = 0
As you can see, we first read 4kB, then read an extra 16kB on top of it, so for sure we overflow the read buffer. How this is possible is still a mystery but now I'll dig along this track. I suspect we erroneously start to flush the buffer at some point where we should not. Thank you! Willy