GNOME Bugzilla – Bug 738469
Running a timer produces high CPU usage
Last modified: 2015-11-10 22:34:01 UTC
Version: 3.14.0 When running a timer in gnome-clocks, I get unreasonably high CPU usage: 27285 root 20 0 207168 38104 22648 S 21,0 0,5 6:20.38 Xorg 19368 michael 20 0 500796 31256 24292 S 19,6 0,4 0:07.65 gnome-clocks 27581 michael 20 0 1897900 337332 58860 S 12,3 4,2 9:33.73 gnome-shell This is on a X220 Lenovo thinkpad with a rather powerful Core i7. Stracing gnome-clocks reveals that it is polling in a tight loop.
recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"A\0\207{\350+\302\1\3\0\202\0\255\0\300\1\0\360\17\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"A\0\216{\352+\302\1\3\0\202\0\255\0\300\1\0\364\17\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 0) = 0 (Timeout) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"\241 \227{\n\0\300\1\200\1\0\0\356I\0\0\0\0\0\0\3622\0\0)A\0\0\320\7\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"\241 \227{\n\0\300\1\177\1\0\0\360I\0\0\0\0\0\0\v(\341\207\3\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 0) = 0 (Timeout) recvmsg(8, 0x7fff8c63c690, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c63c690, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c63c690, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c63c690, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c63c690, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c63c690, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=8, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=8, revents=POLLOUT}]) writev(8, [{"\206\3\4\0\r\0\300\1\0\0\0\0\361I\0\0005 \4\0\354+\302\1\n\0\300\1\f\1\231\0"..., 1336}, {NULL, 0}, {"", 0}], 3) = 1336 recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"A\0\242{\357+\302\1\3\0\202\0\255\0\300\1\0\370\17\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"A\0\251{\361+\302\1\3\0\202\0\255\0\300\1\0\350\17\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"A\0\262{\363+\302\1\3\0\202\0\255\0\300\1\0\360\17\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 64 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"A\0\302{\367+\302\1\3\0\202\0\255\0\300\1\0\340\17\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 64 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"\241 \322{\n\0\300\1\200\1\0\0\360I\0\0\0\0\0\0\2342\0\0)A\0\0\320\7\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 4294967295) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"\241 \322{\n\0\300\1\177\1\0\0\362I\0\0\0\0\0\0\360h\341\207\3\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(8, 0x7fff8c640220, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c6400d0, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(8, 0x7fff8c640200, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=13, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=3, events=POLLIN}], 4, 0) = 0 (Timeout) ....
Is this still relevant? I'm running a timer here with GNOME Clocks 3.16 on an old Thinkpad T400, and htop doesn't show a high load. 1% peaks at times, that doesn't seem unreasonable.
*** This bug has been marked as a duplicate of bug 710332 ***
Still ha(In reply to Alexandre Franke from comment #2) > Is this still relevant? I'm running a timer here with GNOME Clocks 3.16 on > an old Thinkpad T400, and htop doesn't show a high load. 1% peaks at times, > that doesn't seem unreasonable. Still happens with 3.18, CPU usage is at 20% when running a timer on a X220 laptop which has a rather fast Core 7