Subject: xserver-xorg-core 21.1.7-1: I can reliably kill the server after some clicks in the root window.

From: Stefan Schippers <[email-masked]>
Date: Tue, 14 Mar 2023 14:54:38 +0100

Package: xserver-xorg-core

Hi, I am using Devuan testing (Daedalus)
After an update to 21.1.7-1 the xserver crashes at random, i can crash it by some mouse clicks (minimize windows, resize windows).
I think this is somewhat related to [devuan-dev] bug#742.
My  /lib/x86_64-linux-gnu/libsystemd.so.0 points correctly to libelogind.so.0, so the fix in #742 does not apply to me.
Crash does not depend on graphic device, it crashes also with non accelerated fbdev device.
Tried to set backend to logind  with: export LIBSEAT_BACKEND=logind,
no change. I can kill the xorg server after some mouse clicks in the root window.
I am not using a desktop environment, just login to console then startx to run the xserver. I use fvwm as window manager.
this is the console text when the server crahes with seatd:

schippes@asus:~$ export LIBSEAT_BACKEND=seatd
schippes@asus:~$ startx

X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
Current Operating System: Linux asus 6.1.0-6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.15-1 (2023-03-05) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-6-amd64 root=/dev/sda3 ro quiet apparmor=0
xorg-server 2:21.1.7-1devuan2 (https://www.devuan.org/os/community)
Current version of pixman: 0.42.2
          Before reporting problems, check http://wiki.x.org
          to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
          (++) from command line, (!!) notice, (II) informational,
          (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/schippes/.local/share/xorg/Xorg.0.log", Time: Tue Mar 14 13:43:00 2023
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
on to ':0' broken, unable to recover, exiting.(II) Server terminated successfully (0). Closing log file.X connection to ':0' broken, unable to recover, exiting.urxvt: X connection to ':0' broken, unable to recover, exiting.urxvt: X connecti

this is the console text when using logind:

schippes@asus:~$ export LIBSEAT_BACKEND=logind
schippes@asus:~$ startx

X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
Current Operating System: Linux asus 6.1.0-6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.15-1 (2023-03-05) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-6-amd64 root=/dev/sda3 ro quiet apparmor=0
xorg-server 2:21.1.7-1devuan2 (https://www.devuan.org/os/community)
Current version of pixman: 0.42.2
          Before reporting problems, check http://wiki.x.org
          to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
          (++) from command line, (!!) notice, (II) informational,
          (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/schippes/.local/share/xorg/Xorg.0.log", Time: Tue Mar 14 13:43:54 2023
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
ice: Interrupted system call(EE) [libseat/backend/logind.c:199] Could not close device: Interrupted system call(II) Server terminated successfully (0). Closing log file.d not stat fd 48(EE) [libseat/backend/logind.c:199] Could not close dev

Attached the xorg logs in both cases:
I have never had xorg crashes for decades on any system, so I think this is critical.
I have reinstalled all xorg libraries and packages, and various libs. No change.
Can I install the previous xorg version?

Thank you

Stefan

---

From: Stefan Schippers <[email-masked]>
Date: Tue, 14 Mar 2023 15:57:53 +0100

The bug seems not related to xorg but to the fvwm window manager crash. I ran the window manager with gdb and was able to reliably make it crash by some mouse activity.

(gdb) run
Starting program: /usr/bin/fvwm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 4851]
[Detaching after vfork from child process 4864]
Warning: Arg --fvwm-icons is obsolete and ignored
Python module python-xdg not found.fvwm: ../../src/xcb_io.c:626: _XAllocID: Assertion `ret != inval_id' failed.

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff6ca9d2f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007ffff6c5aef2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff6c45472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007ffff6c45395 in __assert_fail_base
     (fmt=0x7ffff6db9a70 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff7b75b2a "ret != inval_id", file=file@entry=0x7ffff7b75a9b "../../src/xcb_io.c", line=line@entry=626, function=function@entry=0x7ffff7b75ef0 "_XAllocID") at ./assert/assert.c:92
#5  0x00007ffff6c53df2 in __GI___assert_fail (assertion=0x7ffff7b75b2a "ret != inval_id", file=0x7ffff7b75a9b "../../src/xcb_io.c", line=626, function=0x7ffff7b75ef0 "_XAllocID") at ./assert/assert.c:101
#6  0x00007ffff7b02443 in  () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#7  0x00007ffff7e56558 in XRenderCreatePicture () at /usr/lib/x86_64-linux-gnu/libXrender.so.1
#8  0x00007ffff7f9e5b6 in  () at /usr/lib/x86_64-linux-gnu/libXft.so.2
#9  0x00007ffff7f9ec95 in XftDrawGlyphs () at /usr/lib/x86_64-linux-gnu/libXft.so.2
#10 0x00007ffff7f9f2ad in XftDrawStringUtf8 () at /usr/lib/x86_64-linux-gnu/libXft.so.2
#11 0x00005555555ff843 in  ()
#12 0x00005555555e6dfb in  ()
#13 0x00005555555a5fff in  ()
#14 0x00005555555a7ba4 in  ()
#15 0x0000555555588dba in  ()
#16 0x000055555558c4eb in  ()
#17 0x000055555558c66c in  ()
#18 0x0000555555600189 in  ()
#19 0x000055555560020f in  ()
#20 0x00007ffff7add9da in XCheckIfEvent () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#21 0x0000555555600b62 in  ()
#22 0x0000555555600cb7 in  ()
#23 0x000055555558d58a in  ()
#24 0x00005555555bfb2f in  ()
#25 0x00005555555a92ca in  ()
#26 0x00005555555a9bf4 in  ()
#27 0x00005555555c7f29 in  ()
#28 0x0000555555589d43 in  ()
#29 0x000055555558c4eb in  ()
#30 0x000055555558c5e4 in  ()
#31 0x00005555555674f7 in  ()
#32 0x00007ffff6c4618a in __libc_start_call_main (main=main@entry=0x555555565a90, argc=argc@entry=1, argv=argv@entry=0x7fffffffe4d8) at ../sysdeps/nptl/libc_start_call_main.h:58
#33 0x00007ffff6c46245 in __libc_start_main_impl (main=0x555555565a90, argc=1, argv=0x7fffffffe4d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4c8) at ../csu/libc-start.c:381
#34 0x0000555555568631 in  ()
(gdb)

---

From: Mark Hindley <[email-masked]>
Date: Tue, 14 Mar 2023 17:14:14 +0000

Control: reassign -1 libx11
Control: forcemerge 746 -1 

Stefan,

Thanks for this.

> Python module python-xdg not found.fvwm: ../../src/xcb_io.c:626: _XAllocID: Assertion `ret != inval_id' failed.

Actually, this appears the same as #746[1]. In particular see
https://bugs.devuan.org/cgi/bugreport.cgi?bug=746#101 which is the same error in German.

Klaus reported it to Debian[2]. He also worked around[3] by downgrading
libx11-6, libx11-data and libx11-xcb1.

Mark

[1]  http://bugs.devuan.org/746

[2] https://bugs.debian.org/1032379 

[3]  https://bugs.devuan.org/cgi/bugreport.cgi?bug=746#121

---

From: Stefan Schippers <[email-masked]>
Date: Tue, 14 Mar 2023 23:16:01 +0100

Hi, Mark

Thank you for the info.

I confirm that downgrading the following packages to 1.8.3-3:

libx11-6
libx11-data
libx11-dev
libx11-xcb-dev
libx11-xcb1

fixes completely my (fvwm) window manager crashes.

I have marked on 'hold' the above packages to prevent upgrades until it gets fixed.

A huge number of packages depend on this library, so I hope the regression will be addressed.

Stefan

---

From: Mark Hindley <[email-masked]>
Date: Wed, 15 Mar 2023 07:18:14 +0000

Stefan,

> fixes completely my (fvwm) window manager crashes.

Good to know, thanks

> A huge number of packages depend on this library, so I hope the regression will be addressed.

Yes, I am slightly surprised there isn't more noise about it in Debian. But
src:libx11 isn't forked in Devuan so there isn't much else we can do about it
directly.

I suggest you add your gdb trace and workaround to the Debian bug in order to
move this forward.

Thanks

Mark

---

From: Klaus Ethgen <[email-masked]>
Date: Wed, 15 Mar 2023 09:56:13 +0100

Hi,

I made a libx11 build with the version 2:1.8.4-3~really1.8.3~3 which is
really version 1.8.3-3, so reverting ALL in the new package.

That will solve the dependency stuff and will be overwritten when debian
comes out with a fixed package.

It is available in my repo:
   deb ftp://ftp.ethgen.ch/pub/debian ceres unofficial

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email-masked]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

---

From: Stefan Schippers <[email-masked]>
Date: Thu, 16 Mar 2023 00:06:44 +0100

Thank you.
I have filed the issue upstream.
https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/186
Stefan

---

From: Stefan Schippers <[email-masked]>
Date: Sun, 26 Mar 2023 22:04:40 +0200

I have closed upstream bug:
https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/186
since i got no feedback at all and it seems affecting only the specific
libX11 1.8.4 - fvwm2 combination that very few people use, I think.

The dirty fix for me was to switch from fvwm2 to the developing fvwm3 window manager.

I don't know if the window manager crash is due to a libX11 bug or to library
API misuse by fvwm2. The problem appeared after a recent libX11 update
(1.8.3 -> 1.8.4) while fvwm2 is frozen since long time.

Stefan

---

From: Mark Hindley <[email-masked]>
Date: Thu, 4 May 2023 15:25:42 +0100

Control: reassign -1 fvwm
Control: forwarded -1 https://bugs.debian.org/1034054

This has no been reported against fvwm, with backported fix.

Reasigning and updating forwarded bug.

Mark