keepalive causes SIGPIPE #5

sekimura opened this Issue Feb 27, 2010 · 3 comments


None yet
1 participant

sekimura commented Feb 27, 2010


epoll_ctl(3, EPOLL_CTL_ADD, 12, {EPOLLOUT, {u32=12, u64=12}}) = 0
epoll_wait(3, {{EPOLLERR|EPOLLHUP, {u32=7, u64=7}}, {EPOLLERR|EPOLLHUP, {u32=8, u64=8}}, {EPOLLERR|EPOLLHUP, {u32=9, u64=9}}, {EPOLLERR|EPOLLHUP, {u32=13, u64=13}}, {EPOLLERR|EPOLLHUP, {u32=14, u64=14}}, {EPOLLERR|EPOLLHUP, {u32=15, u64=15}}, {EPOLLERR|EPOLLHUP, {u32=16, u64=16}}, {EPOLLERR|EPOLLHUP, {u32=10, u64=10}}, {EPOLLERR|EPOLLHUP, {u32=11, u64=11}}, {EPOLLERR|EPOLLHUP, {u32=12, u64=12}}}, 1023, 50000) = 10
clock_gettime(CLOCK_MONOTONIC, {60883, 94923857}) = 0
epoll_ctl(3, EPOLL_CTL_DEL, 7, {EPOLLOUT, {u32=7, u64=7}}) = 0
write(7, "HTTP/1.1 400 Bad Request\r\nConten"..., 264) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
+++ killed by SIGPIPE +++


sekimura commented Feb 28, 2010

Even though a keepalive connection closed by a client, server tries to send a http response via "closed" socket. And then, SIGPIPE error happens.

Actually, this is a bug in the libevent library. I'll contact with the team and will fix it.


sekimura commented Mar 2, 2010

Note: This bug has been fixed in libevent version2


sekimura commented Mar 2, 2010

It has been fixed in 1.4 too but the latest one, 1.4.13-stable doesn't have the fix yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment