Menu

#1197 race: keypress for changing Workspace result in exit/crash xorg-server

future release
open
nobody
None
5
2023-05-06
2023-04-11
Alex Efros
No

I'm using Fluxbox (on Gentoo Linux) for many years, and 1.3.7 since 2015. But in few last months it start crashing xorg-server (I don't use wayland) on keypress which is supposed to change a Workspace.

It looks like a race - this happens once in several days, but unexpected crash on a whole X it really annoying.
It doesn't matter how workspace is changed: sometimes it happens on keypress with :Workspace <number> command, sometimes on :Exec wmctrl -s <number> command.
I've tried to run wmctrl in a loop in command line without keypresses but was unable to reproduce this issue.
I've tried to run :Exec <some other command> but also was unable to reproduce this issue.
Using None Menu :Exec wmctrl -s $(< /tmp/workspace-previous ); mv /tmp/workspace{,.old}; mv /tmp/workspace{-previous,}; mv /tmp/workspace{.old,-previous} (these two files should contain numbers like 0 and 1) and keeping Menu key pressed with auto-repeat rate 30/s it usually takes about 1-30 minutes to reproduce this issue.
I've also reproduced this issue on latest master from github repo.

When this issue happens there are nothing interesting in logs - neither kernel or syslog, nor fluxbox ones - just a normal Xorg exit flow triggered by unknown reason, e.g.:

...
[  3219.885] (II) No input driver specified, ignoring this device.
[  3219.885] (II) This device may have been added with another device file.
[  3924.431] (II) event16 - Logitech G502 HERO Gaming Mouse: device removed
[  3924.472] (II) evdev: Logitech G502 HERO Gaming Mouse Keyboard: Close
[  3924.472] (II) UnloadModule: "evdev"
[  3924.473] (II) UnloadModule: "libinput"
[  3924.473] (II) evdev: Microsoft Natural® Ergonomic Keyboard 4000: Close
[  3924.473] (II) UnloadModule: "evdev"
[  3924.473] (II) evdev: Microsoft Natural® Ergonomic Keyboard 4000: Close
[  3924.473] (II) UnloadModule: "evdev"
[  3924.473] (II) evdev: Power Button: Close
[  3924.473] (II) UnloadModule: "evdev"
[  3924.473] (II) evdev: Power Button: Close
[  3924.473] (II) UnloadModule: "evdev"
[  3924.736] (II) NVIDIA(GPU-0): Deleting GPU-0
[  3924.738] (II) Server terminated successfully (0). Closing log file.

As fluxbox itself won't change I suspect some incompatible environment changes, and in last few months main changes on my Gentoo were:

  • Upgrade gcc from 11.3.1 to 12.2.1 (whole system was recompiled using new gcc, including fluxbox).
  • Upgrade xorg-server from 21.1.4 to 21.1.6, then 21.1.7, then 21.1.8.
  • Upgrade Linux kernel from 5.15.80 to 5.15.88, then 6.1.12, then 6.1.19.

I run out of ideas how to continue debugging this issue and probably will have to replace fluxbox with some other WM - what makes me really sad. :(

Discussion

  • crpb

    crpb - 2023-04-11

    Hey Alex,
    have you tried to build it with --enable-debug and starting fluxbox with e.g. fluxbox -log "$HOME/.fluxbox/log"? And maybe something is logged in ~/.xsession-errors.

    Can you reproduce the same problem with None Menu :PrevWorkspace 0? I think this is what your "wm-file-shuffle" does right?

     

    Last edit: crpb 2023-04-11
    • Alex Efros

      Alex Efros - 2023-04-11

      Thanks for the --enable-debug hint.
      No, :PrevWorkspace 0 isn't the same as my command, at least in case of more than 2 workspaces used - I've 24 workspaces and my command switch to previous used one, e.g. from current workspace 7 to previous workspace 20 (and then workspace 7 became "previous").
      Anyway, I did what you asked for - recompiled with --enable-debug, set key config to yours and keep Menu key pressed until X exits (18 minutes this time, huh).

      Contents of ~/.fluxbox-errors (file where fluxbox stdout & stderr were redirected) is same as usual. When X exits I always get something like this in the file:

      X connection to :0.0 broken (explicit kill or server shutdown).
      urxvt: X connection to ':0.0' broken, unable to recover, exiting.
      parcellite: Fatal IO error 11 (Ресурс временно недоступен) on X server :0.0.
      X connection to :0.0 broken (explicit kill or server shutdown).
      The X11 connection broke (error 1). Did the X11 server die?
      X connection to :0.0 broken (explicit kill or server shutdown).
      xscreensaver-systemd: 00:13:16: X connection closed
      

      But ~/.fluxbox-log this time is huge because of lots of debug info (27MB). But nothing interesting there too, at a glance. Here are last 60 lines:

      src/Window.cc(1275): FluxboxWindow::focus transient size = 0
      src/Window.cc(1299): (hide)[0x5609bb8ee210]
      src/FocusControl.cc(581): ------------------
      src/FocusControl.cc(582): Setting Focused window = 0
      src/FocusControl.cc(585): Current Focused window = 0x5609bb8ec270
      src/FocusControl.cc(586): ------------------
      src/Window.cc(1750): FluxboxWindow(log)::setFocusFlag(0)
      src/IconbarTool.cc(529): IconbarTool::addWindow(0x0x5609bb8e8b50 title = powerman@powerman: ~)
      src/Window.cc(1941): PropertyNotify(powerman@powerman: ~), property = WM_STATE
      src/Window.cc(1941): PropertyNotify(conky (powerman)), property = _NET_WM_DESKTOP
      src/FocusControl.cc(581): ------------------
      src/FocusControl.cc(582): Setting Focused window = 0x5609bb8e3ff0
      src/FocusControl.cc(584): title: powerman@powerman: ~
      src/FocusControl.cc(585): Current Focused window = 0
      src/FocusControl.cc(586): ------------------
      src/Window.cc(975): FluxboxWindow::setCurrentClient: labelbutton[client] = 0x5609bb8ea7e0
      src/Window.cc(1750): FluxboxWindow(powerman@powerman: ~)::setFocusFlag(1)
      src/Window.cc(1941): PropertyNotify(log), property = WM_STATE
      src/Window.cc(1542): 0x5609bb874b40 emit workspace signal
      src/Window.cc(1274): FluxboxWindow::focus isModal() = 0
      src/Window.cc(1275): FluxboxWindow::focus transient size = 0
      src/Window.cc(1299): (hide)[0x5609bb8e8b50]
      src/FocusControl.cc(581): ------------------
      src/FocusControl.cc(582): Setting Focused window = 0
      src/FocusControl.cc(585): Current Focused window = 0x5609bb8e3ff0
      src/FocusControl.cc(586): ------------------
      src/Window.cc(1750): FluxboxWindow(powerman@powerman: ~)::setFocusFlag(0)
      src/IconbarTool.cc(529): IconbarTool::addWindow(0x0x5609bb8e0a60 title = powerman@powerman: ~)
      src/Window.cc(1941): PropertyNotify(powerman@powerman: ~), property = WM_STATE
      src/Window.cc(1941): PropertyNotify(conky (powerman)), property = _NET_WM_DESKTOP
      src/FocusControl.cc(581): ------------------
      src/FocusControl.cc(582): Setting Focused window = 0x5609bb8e05b0
      src/FocusControl.cc(584): title: powerman@powerman: ~
      src/FocusControl.cc(585): Current Focused window = 0
      src/FocusControl.cc(586): ------------------
      src/Window.cc(975): FluxboxWindow::setCurrentClient: labelbutton[client] = 0x5609bb8e2580
      src/Window.cc(1750): FluxboxWindow(powerman@powerman: ~)::setFocusFlag(1)
      src/Window.cc(1941): PropertyNotify(powerman@powerman: ~), property = WM_STATE
      src/Window.cc(1542): 0x5609bb874b40 emit workspace signal
      src/Window.cc(1274): FluxboxWindow::focus isModal() = 0
      src/Window.cc(1275): FluxboxWindow::focus transient size = 0
      src/Window.cc(1299): (hide)[0x5609bb8e0a60]
      src/FocusControl.cc(581): ------------------
      src/FocusControl.cc(582): Setting Focused window = 0
      src/FocusControl.cc(585): Current Focused window = 0x5609bb8e05b0
      src/FocusControl.cc(586): ------------------
      src/Window.cc(1750): FluxboxWindow(powerman@powerman: ~)::setFocusFlag(0)
      src/IconbarTool.cc(529): IconbarTool::addWindow(0x0x5609bb8dd010 title = powerman@powerman: ~)
      src/Window.cc(1941): PropertyNotify(powerman@powerman: ~), property = WM_STATE
      src/Window.cc(1941): PropertyNotify(conky (powerman)), property = _NET_WM_DESKTOP
      src/FocusControl.cc(581): ------------------
      src/FocusControl.cc(582): Setting Focused window = 0x5609bb8dcb60
      src/FocusControl.cc(584): title: powerman@powerman: ~
      src/FocusControl.cc(585): Current Focused window = 0
      src/FocusControl.cc(586): ------------------
      src/Window.cc(975): FluxboxWindow::setCurrentClient: labelbutton[client] = 0x5609bb8deb60
      src/Window.cc(1750): FluxboxWindow(powerman@powerman: ~)::setFocusFlag(1)
      src/Window.cc(1941): PropertyNotify(powerman@powerman: ~), property = WM_STATE
      Fluxbox: XIOError: lost connection to display.
      FbTk::EventManager: Warning: unregistered eventhandlers!
      

      Anything else I can do?

       
  • Alex Efros

    Alex Efros - 2023-05-06

    Update: keypress is not related to this issue.

    My setup includes starting a dozen of apps from ~/.fluxbox/startup, some of them has different [Workspace] defined in ~/.fluxbox/apps and take focus (browser and messengers) on start, which result in auto-switching between 2-3 workspaces while starting X. And today I got X exit/crash while executing this startup process and auto-switching workspaces.

     

Log in to post a comment.

MongoDB Logo MongoDB