Xorg Crashes in compScreenUpdate -> dixGetPrivate
This happens after the display has been closed, at the moment it gets reopened Xorg crashes.
This is my debugging session if it can help in some way.
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-143-generic x86_64 Ubuntu
Current Operating System: Linux ubuntu-vmware 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-23-generic root=UUID=c042d779-731f-46b4-8c80-a43d58522ba1 ro find_preseed=/preseed.cfg
auto noprompt priority=critical locale=en_US quiet vga=792
Build Date: 14 March 2019 05:26:56PM
xorg-server 2:1.20.4-1ubuntu2~xrandr-fix3 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.36.0
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: "/var/log/Xorg.2.log", Time: Wed Mar 20 00:12:06 2019
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
[Detaching after fork from child process 42859]
[Detaching after fork from child process 42861]
[New Thread 0x7fffee6ec700 (LWP 42873)]
[Detaching after fork from child process 43044]
[Detaching after fork from child process 43396]
[Detaching after fork from child process 43671]
[Thread 0x7fffee6ec700 (LWP 42873) exited]
warning: Corrupted shared library list: 0x555555d608a0 != 0x555555c09670
[Detaching after fork from child process 47062]
[Detaching after fork from child process 47064]
[New Thread 0x7fffee6ec700 (LWP 47066)]
Thread 1 "Xorg" received signal SIGSEGV, Segmentation fault.
0x0000555555639afb in dixGetPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:122
122 ../../../../include/privates.h: No such file or directory.
(gdb) bt
#0 0x0000555555639afb in dixGetPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:122
#1 0x0000555555639afb in dixLookupPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:166
#2 0x0000555555639afb in compScreenUpdate (pClient=0x5555557d21c0, closure=0x555555846d00) at ../../../../composite/compalloc.c:54
#3 0x00005555555b3701 in ProcessWorkQueue () at ../../../../dix/dixutils.c:523
#4 0x0000555555707002 in WaitForSomething (are_ready=<optimized out>) at ../../../../os/WaitFor.c:192
#5 0x00005555555ae74c in Dispatch () at ../../../../include/list.h:220
#6 0x00005555555b2986 in dix_main (argc=3, argv=0x7fffffffe528, envp=<optimized out>) at ../../../../dix/main.c:276
#7 0x00007ffff6eaeb6b in __libc_start_main (main=
0x55555559c640 <main>, argc=3, argv=0x7fffffffe528, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7
fffffffe518) at ../csu/libc-start.c:308
#8 0x000055555559c67a in _start ()
(gdb) bt
#0 0x0000555555639afb in dixGetPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:122
#1 0x0000555555639afb in dixLookupPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:166
#2 0x0000555555639afb in compScreenUpdate (pClient=0x5555557d21c0, closure=0x555555846d00) at ../../../../composite/compalloc.c:54
#3 0x00005555555b3701 in ProcessWorkQueue () at ../../../../dix/dixutils.c:523
#4 0x0000555555707002 in WaitForSomething (are_ready=<optimized out>) at ../../../../os/WaitFor.c:192
#5 0x00005555555ae74c in Dispatch () at ../../../../include/list.h:220
#6 0x00005555555b2986 in dix_main (argc=3, argv=0x7fffffffe528, envp=<optimized out>) at ../../../../dix/main.c:276
#7 0x00007ffff6eaeb6b in __libc_start_main (main=
0x55555559c640 <main>, argc=3, argv=0x7fffffffe528, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7
fffffffe518) at ../csu/libc-start.c:308
#8 0x000055555559c67a in _start ()
(gdb) f 1
#1 dixLookupPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:166
166 in ../../../../include/privates.h
(gdb) print privates
$1 = (PrivatePtr *) 0x5555558470d0
(gdb) print *privates
$2 = (PrivatePtr) 0x0
(gdb) print key
$3 = <optimized out>
(gdb) f 1
#1 dixLookupPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:166
166 in ../../../../include/privates.h
(gdb) print key
$4 = <optimized out>
(gdb) print privates
$5 = (PrivatePtr *) 0x5555558470d0
(gdb) print *privates
$6 = (PrivatePtr) 0x0
(gdb) bt
#0 0x0000555555639afb in dixGetPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:122
#1 0x0000555555639afb in dixLookupPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:166
#2 0x0000555555639afb in compScreenUpdate (pClient=0x5555557d21c0, closure=0x555555846d00) at ../../../../composite/compalloc.c:54
#3 0x00005555555b3701 in ProcessWorkQueue () at ../../../../dix/dixutils.c:523
#4 0x0000555555707002 in WaitForSomething (are_ready=<optimized out>) at ../../../../os/WaitFor.c:192
#5 0x00005555555ae74c in Dispatch () at ../../../../include/list.h:220
#6 0x00005555555b2986 in dix_main (argc=3, argv=0x7fffffffe528, envp=<optimized out>) at ../../../../dix/main.c:276
#7 0x00007ffff6eaeb6b in __libc_start_main (main=
0x55555559c640 <main>, argc=3, argv=0x7fffffffe528, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7
fffffffe518) at ../csu/libc-start.c:308
#8 0x000055555559c67a in _start ()
(gdb) print CompScreenPrivateKeyRec
$7 = {offset = 320, size = 0, initialized = 1, allocated = 0, type = PRIVATE_SCREEN, next = 0x5555557b82c0 <AnimCurScreenPrivateKeyRec>}
(gdb) f 0
#0 0x0000555555639afb in dixGetPrivate (key=<optimized out>, privates=0x5555558470d0) at ../../../../include/privates.h:122
122 in ../../../../include/privates.h
(gdb) print privates
$8 = (PrivatePtr *) 0x5555558470d0
(gdb) print *privates
$9 = (PrivatePtr) 0x0