gtk2 related xorg crash
xorg is crashing to logon screen during GTK2 applications usage. This started to happen with upgrade to Xubuntu 21.10. X.Org X Server version is 1.20.13. It seems that it is somehow related to AMD GPU Radeon driver. But I have tried to use older and newer kernel but the problem persists. I have integrated Radeon HD 7660D. The crash won't happen with nomodeset kernel parameter.
[ 30349.020] (EE)
[ 30349.020] (EE) Backtrace:
[ 30349.020] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x55dfaadb3cf9]
[ 30349.022] (EE) 1: /lib/x86_64-linux-gnu/libc.so.6 (__sigaction+0x50) [0x7fd2308ee520]
[ 30349.022] (EE) 2: ? (?+0x0) [0x7fd21723603a]
[ 30349.022] (EE)
[ 30349.022] (EE) Segmentation fault at address 0x7fd225442000
[ 30349.022] (EE)
Fatal server error:
[ 30349.022] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 30349.022] (EE)
[ 30349.022] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 30349.022] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 30349.022] (EE)
[ 30349.023] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 30349.081] (EE) Server terminated with error (1). Closing log file.
There is not much to see from the stack trace. How to get more information for this error?
I found the way how to reliably reproduce this error:
- Install Xubuntu 21.10
- sudo apt install lazarus-ide
- Start Lazarus IDE with a new project
- Put TPopupMenu component on the form
- Double click popup menu icon to edit the menu
- Add and select new menu action
- Change "Caption" property text and hit Enter to confirm the change (once or multiple times) This can cause small freezes and will crash xorg
I was able to catch another backtrace by attaching to running Xorg from gdb (https://wiki.ubuntu.com/X/Backtracing):
#0 0x00007f7e4ad7a0b2 in ()
#1 0x0000000000000004 in ()
#2 0x0000559030dedab0 in ()
#3 0x00007f7e6243b118 in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#4 0x00007f7e6243b8e9 in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#5 0x00007f7e62e82ba7 in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#6 0x00007f7e6205458a in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#7 0x00007f7e590dee30 in ()
at /usr/lib/xorg/modules/libglamoregl.so
#8 0x00007f7e590dfdce in ()
at /usr/lib/xorg/modules/libglamoregl.so
#9 0x000055902fb52c40 in ()
#10 0x000055902fb47793 in ()
#11 0x000055902fa6ca7e in ()
#12 0x000055902fa70ad5 in ()
#13 0x00007f7e64105fd0 in __libc_start_call_main (main=main@entry=
0x55902fa59ef0, argc=argc@entry=8, argv=argv@entry=0x7ffe0ec7d408) at ../sysdeps/nptl/libc_start_call_main.h:58
self = <optimized out>
result = <optimized out>
unwind_buf =
{cancel_jmp_buf = {{jmp_buf = {0, -7693065315617412537, 140729146397704, 94077763034864, 0, 140180829060160, 7692324451577162311, 7764335475726674503}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
#14 0x00007f7e6410607d in __libc_start_main_impl (main=
0x55902fa59ef0, argc=8, argv=0x7ffe0ec7d408, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe0ec7d3f8) at ../csu/libc-start.c:409
#15 0x000055902fa59f25 in _start ()
This at least shows that radeon kernel driver is really involved.
Another backtrace:
#0 0x00007f029f60003a in ()
#1 0x0000000000000001 in fixed_percpu_data ()
#2 0x0000559477cbbee0 in ()
#3 0x00007f02b79cb118 in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#4 0x00007f02b79cb8e9 in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#5 0x00007f02b8412ba7 in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#6 0x00007f02b75e458a in ()
at /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#7 0x00007f02ae674529 in ()
at /usr/lib/xorg/modules/libglamoregl.so
#8 0x0000559475f3021e in ()
#9 0x0000559475f32271 in ()
#10 0x0000559475f3482f in miWideDash ()
#11 0x0000559475f2c333 in miPolySegment ()
#12 0x0000559475ec2fbb in ()
#13 0x0000559475dd6b67 in ()
#14 0x0000559475ddaa7e in ()
#15 0x0000559475ddead5 in ()
#16 0x00007f02b9695fd0 in __libc_start_call_main (main=main@entry=
0x559475dc7ef0, argc=argc@entry=11, argv=argv@entry=0x7fff1226de68) at ../sysdeps/nptl/libc_start_call_main.h:58
self = <optimized out>
result = <optimized out>
unwind_buf =
{cancel_jmp_buf = {{jmp_buf = {0, -4201933710101826382, 140733497925224, 94096120905456, 0, 139649685011520, 4202315574649435314, 4299470204418274482}, mask_was_saved = 0}}, priv = {pad = {0x0 <fixed_percpu_data>, 0x0 <fixed_percpu_data>, 0x0 <fixed_percpu_data>, 0x0 <fixed_percpu_data>}, data = {prev = 0x0 <fixed_percpu_data>, cleanup = 0x0 <fixed_percpu_data>, canceltype = 0}}}
not_first_call = <optimized out>
#17 0x00007f02b969607d in __libc_start_main_impl (main=
0x559475dc7ef0, argc=11, argv=0x7fff1226de68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff1226de58) at ../csu/libc-start.c:409
#18 0x0000559475dc7f25 in _start ()