[Xfce-bugs] [XFCE 0000138]: Stops responding and takes CPU on workspace switching

xfce-bugs at xfce.org xfce-bugs at xfce.org
Thu Apr 8 19:20:28 CEST 2004


A BUGNOTE has been added to this bug.
=======================================================================
http://bugs.xfce.org/view_bug_page.php?f_id=0000138
=======================================================================
Reporter:                   bursa
Handler:                    olivier
=======================================================================
Project:                    XFCE
Bug ID:                     0000138
Category:                   xfwm
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     assigned
=======================================================================
Date Submitted:             2004-03-17 18:20 GMT
Last Modified:              2004-04-08 17:20 GMT
=======================================================================
Summary:                    Stops responding and takes CPU on workspace switching
Description: 
Occasionally when I switch workspaces, xfwm4 stops responding. I can still
type in the window with focus, but moving windows, creating new windows
(including menus), and switching workspaces is not possible. top shows
that xfwm4 is taking over 90% of the CPU. killall xfwm4 does not work.
killall -KILL xfwm4 does, but also restarts the X session. This time it
happened I captured a backtrace using gdb.

I'm using the debian package, version 4.0.3.1-2. Please let me know if
there is anything else I can do to help track this down next time it
happens.

Thanks
James
=======================================================================

-----------------------------------------------------------------------
 olivier - 2004-03-17 20:43 GMT 
-----------------------------------------------------------------------
Humm, never heard of any similar problem. The loop seems to occur in gtk,
anything special about your install?

PS: You may update to the latest xfce release.

Cheers,
Olivier.

-----------------------------------------------------------------------
 olivier - 2004-03-17 20:46 GMT 
-----------------------------------------------------------------------
Also, the killall -KILL xfwm4 should not restart your session as xfwm4
doesn't control it (on a "normal" install)

-----------------------------------------------------------------------
 olivier - 2004-03-19 07:15 GMT 
-----------------------------------------------------------------------
Also if you could identify the exact sequence that leads to this, that
would help... What apps are running, what few actions you perform just
before the problem arises, what seettings you hav set (focus mode, auto
raise, etc.)

TIA
Olivier.

-----------------------------------------------------------------------
 bursa - 2004-03-19 11:03 GMT 
-----------------------------------------------------------------------
I can't think of anything special about my install. I'm using the debian
unstable packages.

.xsession contains this:

/usr/bin/xfce-mcs-manager
export TERMCMD=gnome-terminal
/usr/bin/xfwm4 --daemon
xscreensaver &
gdesklets &
exec /usr/bin/xfce4-panel

.xfce4/settings/xfwm4.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mcs-option SYSTEM "mcs-option.dtd">
 
<mcs-option>
        <option name="Xfwm/BoxMove" type="int" value="0"/>
        <option name="Xfwm/BoxResize" type="int" value="0"/>
        <option name="Xfwm/ButtonLayout" type="string" value="O|HMC"/>
        <option name="Xfwm/ClickToFocus" type="int" value="0"/>
        <option name="Xfwm/DblClickAction" type="string" value="shade"/>
        <option name="Xfwm/FocusNewWindow" type="int" value="1"/>
        <option name="Xfwm/FocusRaise" type="int" value="0"/>
        <option name="Xfwm/KeyThemeName" type="string"
value="james.keys"/>
        <option name="Xfwm/RaiseDelay" type="int" value="250"/>
        <option name="Xfwm/RaiseOnClick" type="int" value="0"/>
        <option name="Xfwm/SnapToBorder" type="int" value="1"/>
        <option name="Xfwm/SnapToWindows" type="int" value="1"/>
        <option name="Xfwm/SnapWidth" type="int" value="10"/>
        <option name="Xfwm/ThemeName" type="string" value="ops"/>
        <option name="Xfwm/TitleAlign" type="string" value="left"/>
        <option name="Xfwm/TitleFont" type="string" value="Impact 13"/>
        <option name="Xfwm/WrapResistance" type="int" value="10"/>
        <option name="Xfwm/WrapWindows" type="int" value="1"/>
        <option name="Xfwm/WrapWorkspaces" type="int" value="0"/>
</mcs-option>

I'll see if I can reproduce the crash.

-----------------------------------------------------------------------
 olivier - 2004-03-19 21:50 GMT 
-----------------------------------------------------------------------
Please make sure you try either xfwm-4.0.4 or this preview version:

http://www.xfce.org/archive/test/xfwm4-4.0.5-cvs.tar.gz

TIA
Olivier.

-----------------------------------------------------------------------
 olivier - 2004-03-24 18:13 GMT 
-----------------------------------------------------------------------
Any update on this?

Olivier.

-----------------------------------------------------------------------
 bursa - 2004-03-24 20:05 GMT 
-----------------------------------------------------------------------
It has happened once since I reported the bug (today).

I've just got the latest cvs of xfwm4 and compiled it with debug enabled.
Hopefully this will give us some hint of the problem if it happens again.

James

-----------------------------------------------------------------------
 olivier - 2004-03-24 20:52 GMT 
-----------------------------------------------------------------------
Humm, you mean it happened before or after you upgrade to the latest
version?

Also, debug is *"very* verbose and may slow things too much (not counting
the size of the log)

One more thing, did you install xfwm4-4.0.4 or
http://www.xfce.org/archive/test/xfwm4-4.0.5-cvs.tar.gz ?

-----------------------------------------------------------------------
 Moe - 2004-03-24 20:57 GMT 
-----------------------------------------------------------------------
As a short sidenote: xfwm with debugging turned on was producing a logfile
of 70 MB while just starting up, moving the mouse a bit and shutting down
again. And that was ... almost 1 1/2 year ago ;-)

-----------------------------------------------------------------------
 bursa - 2004-03-24 21:06 GMT 
-----------------------------------------------------------------------
It happened before I upgraded. I've compiled what's in the cvs repository
at cvs.xfce.org (ie. from cvs checkout of xfwm4, libxfce4mcs,
libxfce4util, libxfcegui4, xfce-mcs-manager). I haven't noticed any
performance problems. The log has reached 700K in about an hour, but it's
no problem.

-----------------------------------------------------------------------
 bursa - 2004-03-31 16:18 GMT 
-----------------------------------------------------------------------
OK, it happened again today. Here's my gdb session:

(gdb) attach 32034
Attaching to process 32034
Reading symbols from /usr/local/bin/xfwm4...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
[...]

(gdb) bt
http://bugs.xfce.org/view_bug_page.php?f_id=0  0x404f823a in
XCheckTypedWindowEvent () from /usr/X11R6/lib/libX11.so.6
http://bugs.xfce.org/view_bug_page.php?f_id=1  0x0805c483 in
rootScrollButton (ev=0xbffffb80) at events.c:640
http://bugs.xfce.org/view_bug_page.php?f_id=2  0x0805cba4 in
handleButtonPress (ev=0xbffffb80) at events.c:844
http://bugs.xfce.org/view_bug_page.php?f_id=3  0x0805db55 in handleEvent
(ev=0xbffffb80) at events.c:1662
http://bugs.xfce.org/view_bug_page.php?f_id=4  0x0805dc51 in
xfwm4_event_filter (xevent=0x80b6dd8, data=0x0)
    at events.c:1730
http://bugs.xfce.org/view_bug_page.php?f_id=5  0x4005981f in
gdkXEventFilter (gdk_xevent=0xbffffb80, event=0x80b6f90, 
    data=0x0) at gtktoxevent.c:153
http://bugs.xfce.org/view_bug_page.php?f_id=6  0x40329658 in
gdk_event_get_graphics_expose ()
   from /usr/lib/libgdk-x11-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=7  0x40329f63 in
_gdk_x11_register_event_type ()
   from /usr/lib/libgdk-x11-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=8  0x4032b5ed in
_gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=9  0x4032b7dd in
_gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=10 0x40464086 in
unblock_source () from /usr/lib/libglib-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=11 0x40465029 in
g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=12 0x40465347 in
g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=13 0x404659b0 in
g_main_loop_run () from /usr/lib/libglib-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=14 0x40157d2f in gtk_main ()
from /usr/lib/libgtk-x11-2.0.so.0
http://bugs.xfce.org/view_bug_page.php?f_id=15 0x080ba7d0 in ?? ()
http://bugs.xfce.org/view_bug_page.php?f_id=16 0x00000001 in ?? ()
http://bugs.xfce.org/view_bug_page.php?f_id=17 0x0806d87a in
_IO_stdin_used ()
http://bugs.xfce.org/view_bug_page.php?f_id=18 0xbffffd48 in ?? ()
http://bugs.xfce.org/view_bug_page.php?f_id=19 0x080ba7d0 in ?? ()

(gdb) frame 1
http://bugs.xfce.org/view_bug_page.php?f_id=1  0x0805c483 in
rootScrollButton (ev=0xbffffb80) at events.c:640
640	    while (XCheckTypedWindowEvent (dpy, root, ButtonPress,
&otherEvent))

(gdb) info args
ev = (XButtonEvent *) 0xbffffb80

(gdb) p *ev
$1 = {type = 4, serial = 11951031, send_event = 0, display = 0x8082488, 
  window = 125, root = 125, subwindow = 0, time = 592139030, x = 2, y =
904, 
  x_root = 2, y_root = 904, state = 16, button = 5, same_screen = 1}

(gdb) info locals
lastscroll = 592138986
otherEvent = {type = 4, xany = {type = 4, serial = 11951034, send_event =
0, 
    display = 0x8082488, window = 125}, xkey = {type = 4, serial =
11951034, 
    send_event = 0, display = 0x8082488, window = 125, root = 125, 
    subwindow = 0, time = 592139039, x = 2, y = 904, x_root = 2, y_root =
904, 
    state = 16, keycode = 4, same_screen = 1}, xbutton = {type = 4, 
    serial = 11951034, send_event = 0, display = 0x8082488, window = 125,

    root = 125, subwindow = 0, time = 592139039, x = 2, y = 904, x_root =
2, 
    y_root = 904, state = 16, button = 4, same_screen = 1}, xmotion = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    window = 125, root = 125, subwindow = 0, time = 592139039, x = 2, y =
904, 
    x_root = 2, y_root = 904, state = 16, is_hint = 4 '\004', 
    same_screen = 1}, xcrossing = {type = 4, serial = 11951034, 
    send_event = 0, display = 0x8082488, window = 125, root = 125, 
    subwindow = 0, time = 592139039, x = 2, y = 904, x_root = 2, y_root =
904, 
    mode = 16, detail = 4, same_screen = 1, focus = 16, state = 16},
xfocus = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    window = 125, mode = 125, detail = 0}, xexpose = {type = 4, 
    serial = 11951034, send_event = 0, display = 0x8082488, window = 125,

    x = 125, y = 0, width = 592139039, height = 2, count = 904}, 
  xgraphicsexpose = {type = 4, serial = 11951034, send_event = 0, 
    display = 0x8082488, drawable = 125, x = 125, y = 0, width =
592139039, 
    height = 2, count = 904, major_code = 2, minor_code = 904}, xnoexpose
= {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    drawable = 125, major_code = 125, minor_code = 0}, xvisibility = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    window = 125, state = 125}, xcreatewindow = {type = 4, serial =
11951034, 
    send_event = 0, display = 0x8082488, parent = 125, window = 125, x =
0, 
    y = 592139039, width = 2, height = 904, border_width = 2, 
    override_redirect = 904}, xdestroywindow = {type = 4, serial =
11951034, 
    send_event = 0, display = 0x8082488, event = 125, window = 125},
xunmap = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    event = 125, window = 125, from_configure = 0}, xmap = {type = 4, 
    serial = 11951034, send_event = 0, display = 0x8082488, event = 125, 
    window = 125, override_redirect = 0}, xmaprequest = {type = 4, 
    serial = 11951034, send_event = 0, display = 0x8082488, parent = 125,

    window = 125}, xreparent = {type = 4, serial = 11951034, send_event =
0, 
    display = 0x8082488, event = 125, window = 125, parent = 0, x =
592139039, 
    y = 2, override_redirect = 904}, xconfigure = {type = 4, 
    serial = 11951034, send_event = 0, display = 0x8082488, event = 125, 
    window = 125, x = 0, y = 592139039, width = 2, height = 904, 
    border_width = 2, above = 904, override_redirect = 16}, xgravity = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    event = 125, window = 125, x = 0, y = 592139039}, xresizerequest = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    window = 125, width = 125, height = 0}, xconfigurerequest = {type = 4,

    serial = 11951034, send_event = 0, display = 0x8082488, parent = 125,

    window = 125, x = 0, y = 592139039, width = 2, height = 904, 
    border_width = 2, above = 904, detail = 16, value_mask = 4},
xcirculate = {
    type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
    event = 125, window = 125, place = 0}, xcirculaterequest = {type = 4,

    serial = 11951034, send_event = 0, display = 0x8082488, parent = 125,

    window = 125, place = 0}, xproperty = {type = 4, serial = 11951034, 
    send_event = 0, display = 0x8082488, window = 125, atom = 125, time =
0, 
    state = 592139039}, xselectionclear = {type = 4, serial = 11951034, 
    send_event = 0, display = 0x8082488, window = 125, selection = 125, 
    time = 0}, xselectionrequest = {type = 4, serial = 11951034, 
    send_event = 0, display = 0x8082488, owner = 125, requestor = 125, 
    selection = 0, target = 592139039, property = 2, time = 904}, 
  xselection = {type = 4, serial = 11951034, send_event = 0, 
    display = 0x8082488, requestor = 125, selection = 125, target = 0, 
    property = 592139039, time = 2}, xcolormap = {type = 4, serial =
11951034, 
    send_event = 0, display = 0x8082488, window = 125, colormap = 125, 
    new = 0, state = 592139039}, xclient = {type = 4, serial = 11951034, 
    send_event = 0, display = 0x8082488, window = 125, message_type = 125,

    format = 0, data = {
      b =
"\037SK#\002\000\000\000\210\003\000\000\002\000\000\000\210\003\000", s =
{21279, 9035, 2, 0, 904, 0, 2, 0, 904, 0}, l = {592139039, 2, 904, 2, 
        904}}}, xmapping = {type = 4, serial = 11951034, send_event = 0, 
    display = 0x8082488, window = 125, request = 125, first_keycode = 0, 
    count = 592139039}, xerror = {type = 4, display = 0xb65bba, 
    resourceid = 0, serial = 134751368, error_code = 125 '}', 
    request_code = 0 '\0', minor_code = 0 '\0'}, xkeymap = {type = 4, 
    serial = 11951034, send_event = 0, display = 0x8082488, window = 125,

    key_vector =
"}\000\000\000\000\000\000\000\037SK#\002\000\000\000\210\003\000\000\002\000\000\000\210\003\000\000\020\000\000"},
pad = {4, 11951034, 0, 
    134751368, 125, 125, 0, 592139039, 2, 904, 2, 904, 16, 4, 1, 16, 16, 
    269488144, 4096, 1029, 0, 0, 0, 0}}

(gdb) n
Single stepping until exit from function XCheckTypedWindowEvent, 
which has no line number information.
rootScrollButton (ev=0xbffffb80) at events.c:642
642	        last_timestamp = stashEventTime (last_timestamp,
&otherEvent);
(gdb) 
643	        if (otherEvent.xbutton.button != ev->button)
(gdb) 
645	            XPutBackEvent (dpy, &otherEvent);
(gdb) 
640	    while (XCheckTypedWindowEvent (dpy, root, ButtonPress,
&otherEvent))
(gdb) 
642	        last_timestamp = stashEventTime (last_timestamp,
&otherEvent);
(gdb) 
643	        if (otherEvent.xbutton.button != ev->button)
(gdb) 
645	            XPutBackEvent (dpy, &otherEvent);
(gdb) 
640	    while (XCheckTypedWindowEvent (dpy, root, ButtonPress,
&otherEvent))
(gdb) 
642	        last_timestamp = stashEventTime (last_timestamp,
&otherEvent);
(gdb) 
643	        if (otherEvent.xbutton.button != ev->button)
(gdb) 
645	            XPutBackEvent (dpy, &otherEvent);
(gdb) 
640	    while (XCheckTypedWindowEvent (dpy, root, ButtonPress,
&otherEvent))
(gdb) p otherEvent.xbutton 
$5 = {type = 4, serial = 11951034, send_event = 0, display = 0x8082488, 
  window = 125, root = 125, subwindow = 0, time = 592139039, x = 2, y =
904, 
  x_root = 2, y_root = 904, state = 16, button = 4, same_screen = 1}
(gdb) p ev->button
$6 = 5

-----------------------------------------------------------------------
 olivier - 2004-04-08 17:20 GMT 
-----------------------------------------------------------------------
Ok, I've been able to reproduce and fix the problem thanks to the backtrace
you provided.

An updated archive is available from 
http://www.xfce.org/archive/test/xfwm4-4.0.5-cvs.tar.gz

It happens that the problem only occurs when not running xfdesktop (which
is not the default config, that's why noone else ever reproted the problem
before)

Olivier.



More information about the Xfce-bugs mailing list