[Bug 283914] New: xcb uses 100% CPU time after killall -3 xv
https://bugzilla.novell.com/show_bug.cgi?id=283914 Summary: xcb uses 100% CPU time after killall -3 xv Product: openSUSE 10.3 Version: Alpha 5 Platform: i686 OS/Version: Linux Status: NEW Severity: Major Priority: P5 - None Component: X.Org AssignedTo: sndirsch@novell.com ReportedBy: phdm@macqel.be QAContact: sndirsch@novell.com I use xv (John Bradley's interactive image display program for the X Window System) to display changing images as follow : I start xv with the name of the image to display, then when the image has changed (the filename is the same, but the content has changed) I send a signal 3 to the xv process. xv should display the new image. Very often now, xv then starts using 100 % of the CPU time. As this is something I use since at least suse 9.0 and yet with opensuse 10.2 and that used to work perfectly, and as xv itself has not changed, I surmise this is a bug in the new xcb libraries. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mhopf@novell.com, eich@novell.com Status|NEW |NEEDINFO Info Provider| |phdm@macqel.be ------- Comment #1 from sndirsch@novell.com 2007-06-13 12:50 MST ------- Honestly I don't understand what you exactly do. Maybe you can describe in more detail how to reproduce. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 phdm@macqel.be changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|phdm@macqel.be | ------- Comment #2 from phdm@macqel.be 2007-06-14 01:51 MST -------
From the documentation of John Bradley's xv :
"It is occasionally desirable to reload an image file because the contents of the file have changed. For example, [...] you have a program that generates images, and you d like to view these images without any manual intervention. xv provides a way to reload an image via an external signal. If you send the xv process a SIGQUIT signal ( kill -QUIT <pid> , or kill -3 <pid> on most systems), the program will reload the currently selected file." Up to now, this used to work perfectly. In opensuse 10.3, when I do the same (i.e. kill -QUIT <xv-pid>), the `xv' process begins to use 100% cpu time instead of displaying the new image. I surmise the problem arises from the replacment of libX11 by an xcb-ified version of libX11. I even replaced libX11 by opensuse 10.2's libX11 and kill -QUIT xv works perfectly again, so that shows that the problem lies in 10.3's libX11 or in xcb. How to reproduce summary : start xv with an image file to display : xv image.jpg & send the QUIT signal to xv (this should tell xv to reread and redisplay image.jpg): killall -QUIT xv xv now uses 100% CPU time :( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #3 from sndirsch@novell.com 2007-06-14 03:42 MST ------- Thanks a lot for detailed explanation. Now I understand. You don't want to restart xv after changing the image file. I can reproduce this issue on openSUSE 10.3, but it might be a xv issue, since I can't reproduce the issue on openSUSE 10.2 with updated libX11/xcb. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 ------- Comment #4 from sndirsch@novell.com 2007-06-14 03:45 MST ------- Hmm. Downgrading xv to the openSUSE 10.2 version didn't help. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@novell.com Summary|xcb uses 100% CPU time after|libX11/libxcb uses 100% CPU time after killall - |killall -3 xv |3 xv ------- Comment #5 from sndirsch@novell.com 2007-06-14 03:55 MST ------- Indeed. By setting LD_LIBRARY_PATH to use a libX11 from openSUSE 10.2, which is not linked against libxcb, this problem no longer happens. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 ------- Comment #6 from werner@novell.com 2007-06-14 04:05 MST ------- Agree, on 10.2 this does not happen .. what does the libxcb do on SIGQUIT? An "strace -f -p `pidof xv`" shows nothing, but where from the load is enforced? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914
------- Comment #7 from sndirsch@novell.com 2007-06-14 04:14 MST -------
# ltrace xv ...
[...]
XNextEvent(0x8228008, 0xbfeacfe8, 0xbfeacf88, 0, 0
# killall -QUIT -xv
https://bugzilla.novell.com/show_bug.cgi?id=283914 ------- Comment #8 from werner@novell.com 2007-06-14 04:25 MST ------- Beside this a `killall -15 xv' does not help after the SIGQUIT. The xv process is deadlocked. An "strace -f -p `pidof xv`" shows during the "killall -3 xv" the following: 18042 select(4, [3], [], NULL, NULL) = ? ERESTARTNOHAND (To be restarted) 18042 --- SIGQUIT (Quit) @ 0 (0) --- 18042 select(4, [3], [3], NULL, NULL) = 1 (out [3]) 18042 writev(3, [{"\224\10\7\0\0\1\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 28}], 1) = 28 seems that writing on the socket is brocken, that is that the socket is closed without confirmation and further writing will block xv. On 10.2 the socket is not closed and therefore the xv can use write(v) on the socket. Note, that xv uses SIGQUIT to relaod images, but libxcb on STABLE ignores the signal handler used by xv. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 ------- Comment #9 from sndirsch@novell.com 2007-06-14 07:54 MST ------- Werner, I can't find any X library, which registers a signal handler for SIGQUIT. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914 ------- Comment #10 from werner@novell.com 2007-06-14 09:03 MST ------- Nevertheless, the socket is closed by this signal ... which function of the libxcb or libX11 or libX11-xcb can do this within the signal handler of xv? Btw: sometimes I can not reproduce this on 10.3, in other words sometimes SIGQUIT does not close the socket. Do we see a race triggered by the usage of X11 function within a signal handler? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=283914#c11
--- Comment #11 from Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c12
--- Comment #12 from Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c14
Egbert Eich
https://bugzilla.novell.com/show_bug.cgi?id=283914#c16
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c17
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c19
--- Comment #19 from Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c20
--- Comment #20 from Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c21
--- Comment #21 from Stefan Dirsch
Upstream bugreport:
------- Comment #1 From Bart Massey 2007-08-24 17:46:48 PST [reply] ------- I've managed to reproduce the bug, at least, but I really am pretty swamped right now and really don't have time to debug it myself. I note that xv makes a bunch of Xlib API calls from its signal handler. As far as I can recall this is technically illegal in Xlib; furthermore I'm pretty sure it will cause trouble in Xlib/XCB. My guess is that the malloc pool is getting corrupted: Xlib/XCB uses malloc pretty heavily, and Xlib basically doesn't use it, so this may be the difference? ------- Comment #2 From Bart Massey 2007-08-25 16:21:30 PST [reply] ------- I checked with Keith Packard, and he says that he is surprised old Xlib would put up with the calls from an interrupt handler either---this definitely isn't supposed to work. This sure seems likely to be an xv bug to me, triggered by the greater use of malloc in Xlib/XCB. I'm marking it NOTOURBUG until someone convinces me it is, I'm afraid. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=283914#c22
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914#c24
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=283914#c26
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=283914
User mfabian@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=283914#c28
Mike Fabian
https://bugzilla.novell.com/show_bug.cgi?id=283914
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=283914#c29
--- Comment #29 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=283914
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=283914#c30
--- Comment #30 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=283914
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=283914#c31
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=283914
User sndirsch@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=283914#c32
--- Comment #32 from Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=283914
User sndirsch@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=283914#c33
Stefan Dirsch
participants (1)
-
bugzilla_noreply@novell.com