部分strace(10秒总共两万多行):
10:36:15.070879 read(7, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.070913 write(107, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.070944 epoll_wait(5, {{EPOLLIN, {u32=11036336, u64=11036336}}}, 16, 10000) = 1
10:36:15.071265 accept4(14, {sa_family=AF_INET, sin_port=htons(21080), sin_addr=inet_addr("10.184.33.4")}, [16], SOCK_CLOEXEC|SOCK_NONBLOCK) = 227027
10:36:15.071308 getsockname(227027, {sa_family=AF_INET, sin_port=htons(5003), sin_addr=inet_addr("10.187.211.142")}, [16]) = 0
10:36:15.071350 write(104, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.071416 epoll_wait(5, {{EPOLLIN, {u32=11029184, u64=11029184}}}, 16, 10000) = 1
10:36:15.071705 read(7, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.071736 write(32, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.071856 close(244753) = 0
10:36:15.071893 epoll_wait(5, {{EPOLLIN, {u32=11030496, u64=11030496}}}, 16, 10000) = 1
10:36:15.072406 accept4(10, {sa_family=AF_INET, sin_port=htons(19415), sin_addr=inet_addr("10.184.32.156")}, [16], SOCK_CLOEXEC|SOCK_NONBLOCK) = 235250
10:36:15.072459 getsockname(235250, {sa_family=AF_INET, sin_port=htons(5001), sin_addr=inet_addr("10.187.211.142")}, [16]) = 0
10:36:15.072503 write(68, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.072536 epoll_wait(5, {{EPOLLIN, {u32=11029744, u64=11029744}}}, 16, 10000) = 1
10:36:15.073097 accept4(8, {sa_family=AF_INET, sin_port=htons(17485), sin_addr=inet_addr("10.184.32.87")}, [16], SOCK_CLOEXEC|SOCK_NONBLOCK) = 235302
10:36:15.073137 getsockname(235302, {sa_family=AF_INET, sin_port=htons(5000), sin_addr=inet_addr("10.187.211.142")}, [16]) = 0
10:36:15.073177 write(32, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.073210 epoll_wait(5, {{EPOLLIN, {u32=11029184, u64=11029184}}}, 16, 10000) = 1
10:36:15.075891 read(7, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.075929 write(47, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.075960 epoll_wait(5, {{EPOLLIN, {u32=11036336, u64=11036336}}}, 16, 10000) = 1
10:36:15.076759 accept4(14, {sa_family=AF_INET, sin_port=htons(34802), sin_addr=inet_addr("10.184.33.106")}, [16], SOCK_CLOEXEC|SOCK_NONBLOCK) = 199737
10:36:15.076802 getsockname(199737, {sa_family=AF_INET, sin_port=htons(5003), sin_addr=inet_addr("10.187.211.142")}, [16]) = 0
10:36:15.076845 write(107, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.076877 epoll_wait(5, {{EPOLLIN, {u32=11029184, u64=11029184}}}, 16, 10000) = 1
10:36:15.078235 read(7, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.078273 write(71, "\1\0\0\0\0\0\0\0", 8) = 8
10:36:15.078315 close(11218) = 0
相应的日志:
20170816 10:36:15.070879 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070882 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070883 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070886 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070887 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070890 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070892 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070895 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070896 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070899 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070901 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070904 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070905 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070908 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070910 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070913 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070915 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070918 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
20170816 10:36:15.070919 300316 ERROR TcpConnection::handleError [:10.187.211.142:5001#4388409] - SO_ERROR = 0 Success - TcpConnection.cc:419
20170816 10:36:15.070922 300316 ERROR Resource temporarily unavailable (errno=11) TcpConnection::handleRead - TcpConnection.cc:341
strace和日志好像对不上,strace里面的read没有eagain,而且strace的系统调用次数偏少。