A bit of follow up on this:
strace on the thread in question shows the following:
13:35:47 poll([{fd=23, events=POLLIN}], 1, 0) = 0 (Timeout) <0.000018> 13:35:47 epoll_wait(42, [{EPOLLIN, {u32=3, u64=3}}], 9, 0) = 1 <0.000018> 13:35:47 recvmsg(417, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable) <0.000018> 13:35:47 poll([{fd=11, events=POLLIN}, {fd=42, events=POLLIN}, {fd=23, events=POLLIN}], 3, 2147483647) = 1 ([{fd=42, revents=POLLIN}]) <0.000019> 13:35:47 getrusage(RUSAGE_THREAD, {ru_utime={tv_sec=490842, tv_usec=749026}, ru_stime={tv_sec=710657, tv_usec=442946}, ...}) = 0 <0.000018> 13:35:47 poll([{fd=23, events=POLLIN}], 1, 0) = 0 (Timeout) <0.000018> 13:35:47 epoll_wait(42, [{EPOLLIN, {u32=3, u64=3}}], 9, 0) = 1 <0.000019> 13:35:47 recvmsg(417, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable) <0.000018> 13:35:47 poll([{fd=11, events=POLLIN}, {fd=42, events=POLLIN}, {fd=23, events=POLLIN}], 3, 2147483647) = 1 ([{fd=42, revents=POLLIN}]) <0.000019> 13:35:47 getrusage(RUSAGE_THREAD, {ru_utime={tv_sec=490842, tv_usec=749108}, ru_stime={tv_sec=710657, tv_usec=442946}, ...}) = 0 <0.000017>
And if I strace with -c to collect a summary, after 4-5 seconds it shows the following:
sudo strace -c -p 1658344 strace: Process 1658344 attached ^Cstrace: Process 1658344 detached % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 0.00 0.000000 0 9 write 0.00 0.000000 0 56397 poll 0.00 0.000000 0 28198 28198 recvmsg 0.00 0.000000 0 28199 getrusage 0.00 0.000000 0 148 56 futex 0.00 0.000000 0 28199 epoll_wait ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 141150 28254 total
A bit of follow up on this:
strace on the thread in question shows the following:
13:35:47 poll([{fd=23, events=POLLIN}], 1, 0) = 0 (Timeout) <0.000018> RUSAGE_ THREAD, {ru_utime= {tv_sec= 490842, {tv_sec= 710657, tv_usec=442946}, ...}) = 0 RUSAGE_ THREAD, {ru_utime= {tv_sec= 490842, {tv_sec= 710657, tv_usec=442946}, ...}) = 0
13:35:47 epoll_wait(42, [{EPOLLIN, {u32=3, u64=3}}], 9, 0) = 1 <0.000018>
13:35:47 recvmsg(417, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN
(Resource temporarily unavailable) <0.000018>
13:35:47 poll([{fd=11, events=POLLIN}, {fd=42, events=POLLIN}, {fd=23,
events=POLLIN}], 3, 2147483647) = 1 ([{fd=42, revents=POLLIN}]) <0.000019>
13:35:47 getrusage(
tv_usec=749026}, ru_stime=
<0.000018>
13:35:47 poll([{fd=23, events=POLLIN}], 1, 0) = 0 (Timeout) <0.000018>
13:35:47 epoll_wait(42, [{EPOLLIN, {u32=3, u64=3}}], 9, 0) = 1 <0.000019>
13:35:47 recvmsg(417, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN
(Resource temporarily unavailable) <0.000018>
13:35:47 poll([{fd=11, events=POLLIN}, {fd=42, events=POLLIN}, {fd=23,
events=POLLIN}], 3, 2147483647) = 1 ([{fd=42, revents=POLLIN}]) <0.000019>
13:35:47 getrusage(
tv_usec=749108}, ru_stime=
<0.000017>
And if I strace with -c to collect a summary, after 4-5 seconds it shows
the following:
sudo strace -c -p 1658344
strace: Process 1658344 attached
^Cstrace: Process 1658344 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
0.00 0.000000 0 9 write
0.00 0.000000 0 56397 poll
0.00 0.000000 0 28198 28198 recvmsg
0.00 0.000000 0 28199 getrusage
0.00 0.000000 0 148 56 futex
0.00 0.000000 0 28199 epoll_wait
------ ----------- ----------- --------- --------- ----------------
100.00 0.000000 141150 28254 total