Xvnc hogs the CPU

Peter Åstrand astrand at cendio.se
Thu Apr 23 06:53:30 PDT 2009


Here's another strange bug, also found during TigerVNC Xvnc testing. On 
Ubuntu 9.04 beta[*], after starting GNOME, Xvnc consumes all CPU it can 
get. An strace indicates:

time(NULL)                              = 1240494241
setitimer(ITIMER_REAL, {it_interval={0, 20000}, it_value={0, 20000}}, NULL) = 0
gettimeofday({1240494241, 713782}, NULL) = 0
gettimeofday({1240494241, 713837}, NULL) = 0
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
gettimeofday({1240494241, 714036}, NULL) = 0
select(256, [0 1 3 4 5 6 7 9 10 11 12 13 14 15 16 18 19 21 25 26], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1240494241, 714176}, NULL) = 0

Since the nfds argument is 256, this is most likely a select() invocation 
with FD_SETSIZE. As far as I can tell, there's no such call in the VNC 
specific parts of Xvnc, so the select call is most likely in generic Xorg 
code.

[*]: Actually, it doesn't matter if Xvnc itself is running on Ubuntu or 
not. The problem also happens when Xvnc is running on some other platform 
and X11 forward is used: The trigger seems to be the Ubuntu version of 
GNOME.

Seen before?

Regards, 
---
Peter Åstrand		ThinLinc Chief Developer
Cendio AB		http://www.cendio.com
Wallenbergs gata 4
583 30 Linköping	Phone: +46-13-21 46 00


More information about the xorg-devel mailing list