Bug#969739: Segmentation fault on startup
On 2020-09-23 10:38 p.m., Bernhard Übelacker wrote: Dear Maintainer, I could not reproduce the crash, but I could modify the process under gdb to reach a point of execution, which prints a similar backtrace. Therefore I guess the crash described in Christophe's first message is really located in [1], caused by "xf86_platform_devices[i].pdev" containing a null pointer. [1] https://sources.debian.org/src/xorg-server/2:1.20.9-1/hw/xfree86/common/xf86platformBus.c/#L367 https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/508 should help then. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer
Bug#969739: Segmentation fault on startup
Dear Maintainer, I could not reproduce the crash, but I could modify the process under gdb to reach a point of execution, which prints a similar backtrace. Therefore I guess the crash described in Christophe's first message is really located in [1], caused by "xf86_platform_devices[i].pdev" containing a null pointer. [1] https://sources.debian.org/src/xorg-server/2:1.20.9-1/hw/xfree86/common/xf86platformBus.c/#L367 But second and more fundamentally, I guess too that the backtrace generating function in Xorg seems not to be reliable. If I am right the following backtraces should show the same addresses, but for some reason the Xorg output seems to be kind of misleading on some frames. Would that be worth to track in a separate bug? Kind regards, Bernhard With debug symbols: #0 0x5560ae10 in xf86MergeOutputClassOptions () at ../../../../../../hw/xfree86/common/xf86platformBus.c:367 #1 0x555ee197 in xf86CollectOptions () at ../../../../../../hw/xfree86/common/xf86Option.c:83 #2 0x76993d2e in PreInit () at ../../../../../../../hw/xfree86/drivers/modesetting/driver.c:972 #3 0x555f185e in InitOutput () at ../../../../../../hw/xfree86/common/xf86Init.c:522 #4 0x555b331c in dix_main () at ../../../../dix/main.c:193 #5 0x772dbcca in __libc_start_main () at ../csu/libc-start.c:308 #6 0x5559cc9a in _start () Without debug symbols: #0 0x5560ae10 in ?? () #1 0x555ee197 in xf86CollectOptions () #2 0x76993d2e in ?? () from /usr/lib/xorg/modules/drivers/modesetting_drv.so #3 0x555f185e in InitOutput () #4 0x555b331c in ?? () #5 0x772dbcca in __libc_start_main () at ../csu/libc-start.c:308 #6 0x5559cc9a in _start () >From Xorg: (EE) Backtrace: (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x135) [0x55712f35] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) [0x7749018f] (EE) 2: /usr/lib/xorg/Xorg (xf86PlatformMatchDriver+0x5c0) [0x5560b2b0] (EE) 3: /usr/lib/xorg/Xorg (xf86CollectOptions+0x77) [0x555ee197] (EE) unw_get_proc_name failed: no unwind info found [-10] (EE) 4: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x76993940] (EE) 5: /usr/lib/xorg/Xorg (InitOutput+0x9ae) [0x555f185e] (EE) 6: /usr/lib/xorg/Xorg (InitFonts+0x1cc) [0x555b335c] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xea) [0x772dbcca] (EE) 8: /usr/lib/xorg/Xorg (_start+0x2a) [0x5559cc9a] (EE) (EE) Segmentation fault at address 0x124 # Unstable amd64 qemu VM 2020-09-23 apt update apt dist-upgrade apt install systemd-coredump gdb xserver-xorg xterm openbox /usr/bin/Xorg root@debian:~# gdb -q -ex 'set width 0' -ex 'set pagination off' -ex 'display/i $pc' -ex 'b *xf86MergeOutputClassOptions+31' -ex 'run' -ex 'print/x $edx' -ex 'set $edx = 1' -ex 'b *xf86MergeOutputClassOptions+288' -ex 'cont' -ex 'print/x $rdx' -ex 'set $rdx=0' -ex 'generate-core /tmp/xorg-core' -ex 'bt' -ex 'detach' -ex 'quit' --args /usr/lib/xorg/Xorg Reading symbols from /usr/lib/xorg/Xorg... Reading symbols from /usr/lib/debug/.build-id/86/86f2627d86f090b258bc6477b49359b2475a83.debug... 1: x/i $pc Breakpoint 1 at 0xb6d0f: file ../../../../../../hw/xfree86/common/xf86platformBus.c, line 361. Starting program: /usr/lib/xorg/Xorg [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". X.Org X Server 1.20.9 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.19.0-10-amd64 x86_64 Debian Current Operating System: Linux debian 5.8.0-1-amd64 #1 SMP Debian 5.8.7-1 (2020-09-05) x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-1-amd64 root=UUID=c9e90f0f-a043-45af-bda9-4a7fb7b42490 ro quiet Build Date: 31 August 2020 03:49:48PM xorg-server 2:1.20.9-1 (https://www.debian.org/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.0.log", Time: Wed Sep 23 22:02:12 2020 (==) Using system config directory "/usr/share/X11/xorg.conf.d" Breakpoint 1, 0x5560ad0f in xf86MergeOutputClassOptions (entityIndex=0, options=options@entry=0x55800f90) at ../../../../../../hw/xfree86/common/xf86platformBus.c:361 361 ../../../../../../hw/xfree86/common/xf86platformBus.c: Datei oder Verzeichnis nicht gefunden. 1: x/i $pc => 0x5560ad0f : cmp$0x1,%edx $1 = 0x3 Breakpoint 2 at 0x5560ae10: file ../../../../../../hw/xfree86/common/xf86platformBus.c, line 367. Continuing. Breakpoint 2, 0x5560ae10 in
Bug#969739: Segmentation fault on startup
Hi, This isn't a conventional setup, which is why dbus isn't there, there's no input, as I only need the output. The more unconventional part is that I'm running X11 within a docker container. As I said, this works with an older version, specifically, on the same host, a different container with 2:1.20.7-2 works. Not sure what you're looking for in the kernel logs, nothing happens when it fails to start. I'm attaching the boot sequence logs. Let me know what else you need, thanks. On Thu, Sep 17, 2020 at 9:03 AM Julien Cristau wrote: > Control: severity -1 important > Control: tag -1 moreinfo > > On Mon, Sep 07, 2020 at 11:59:34AM -0400, Christophe Kalt wrote: > > Package: xserver-xorg-core > > Version: 2:1.20.9-1 > > Severity: grave > > > > Same setup was working with 2:1.20.7-2, but with 2:1.20.9-1 crashes on > startup > > (xinit). /var/log/Xorg.0.log follows: > > > There's a number of things going wrong here... > > [...] > > [881147.372] (EE) dbus-core: error connecting to system bus: > > org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket > /run/dbus/ > > system_bus_socket: No such file or directory) > > That's not good for input but probably doesn't explain the crash in > InitOutput. > > [...] > > [881147.372] (II) xfree86: Adding drm device (/dev/dri/card0) > > [881147.372] (II) Platform probe for > /sys/devices/pci:00/:00:02.0/drm/ > > card0 > > [881147.377] (--) PCI:*(0@0:2:0) 8086:3ea5:8086:2074 rev 1, Mem @ > 0x604b00/ > > 16777216, 0x40/134217728, I/O @ 0x4000/64, BIOS @ > 0x/131072 > > That's Intel "Iris Plus Graphics 655". > > [...] > > [881147.426] (II) modeset(G0): using drv /dev/dri/card0 > > [881147.427] (II) modeset(0): Creating default Display subsection in > Screen > > section > > "Default Screen Section" for depth/fbbpp 24/32 > > [881147.427] (==) modeset(0): Depth 24, (==) framebuffer bpp 32 > > [881147.427] (EE) > > [881147.427] (EE) Backtrace: > > [881147.428] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x135) > [0x557662d21f35] > > [881147.429] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 > (funlockfile+0x50) > > [0x7f3bb952318f] > > [881147.430] (EE) 2: /usr/lib/xorg/Xorg (xf86PlatformMatchDriver+0x5c0) > > [0x557662c1a2b0] > > [881147.430] (EE) 3: /usr/lib/xorg/Xorg (xf86CollectOptions+0x77) > > [0x557662bfd197] > > [881147.431] (EE) unw_get_proc_name failed: no unwind info found [-10] > > [881147.431] (EE) 4: /usr/lib/xorg/modules/drivers/modesetting_drv.so > (?+0x0) > > [0x7f3bb8a25940] > > [881147.432] (EE) 5: /usr/lib/xorg/Xorg (InitOutput+0x9ae) > [0x557662c0085e] > > [881147.433] (EE) 6: /usr/lib/xorg/Xorg (InitFonts+0x1cc) > [0x557662bc235c] > > [881147.434] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 > (__libc_start_main+0xea) > > [0x7f3bb936ecca] > > [881147.434] (EE) 8: /usr/lib/xorg/Xorg (_start+0x2a) [0x557662babc9a] > > [881147.434] (EE) > > [881147.435] (EE) Segmentation fault at address 0x124 > > [881147.435] (EE) > > Fatal server error: > > [881147.435] (EE) Caught signal 11 (Segmentation fault). Server aborting > > [881147.435] (EE) > > [881147.435] (EE) > > Please consult the The X.Org Foundation support > > at http://wiki.x.org > > for help. > > [881147.435] (EE) Please also check the log file at > "/var/log/Xorg.0.log" for > > additional information. > > [881147.435] (EE) > > [881147.467] (EE) Server terminated with error (1). Closing log file. > > Any details you can provide as to the setup and how you're starting Xorg? > > Please also provide a kernel log. > > Cheers, > Julien > [0.00] Linux version 5.8.0-1-amd64 (debian-ker...@lists.debian.org) (gcc-10 (Debian 10.2.0-6) 10.2.0, GNU ld (GNU Binutils for Debian) 2.35) #1 SMP Debian 5.8.7-1 (2020-09-05) [0.00] Command line: BOOT_IMAGE=/vmlinuz-5.8.0-1-amd64 root=/dev/mapper/vg0-root ro [0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' [0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' [0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' [0.00] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers' [0.00] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR' [0.00] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 [0.00] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64 [0.00] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64 [0.00] x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format. [0.00] BIOS-provided physical RAM map: [0.00] BIOS-e820: [mem 0x-0x0009efff] usable [0.00] BIOS-e820: [mem 0x0009f000-0x000f] reserved [0.00] BIOS-e820: [mem 0x0010-0x7bcdefff] usable [0.00] BIOS-e820: [mem 0x7bcdf000-0x7c149fff] reserved [0.00] BIOS-e820: [mem 0x7c14a000-0x7c1c6fff] ACPI data [0.00] BIOS-e820: [mem
Bug#969739: Segmentation fault on startup
Control: severity -1 important Control: tag -1 moreinfo On Mon, Sep 07, 2020 at 11:59:34AM -0400, Christophe Kalt wrote: > Package: xserver-xorg-core > Version: 2:1.20.9-1 > Severity: grave > > Same setup was working with 2:1.20.7-2, but with 2:1.20.9-1 crashes on startup > (xinit). /var/log/Xorg.0.log follows: > There's a number of things going wrong here... [...] > [881147.372] (EE) dbus-core: error connecting to system bus: > org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket > /run/dbus/ > system_bus_socket: No such file or directory) That's not good for input but probably doesn't explain the crash in InitOutput. [...] > [881147.372] (II) xfree86: Adding drm device (/dev/dri/card0) > [881147.372] (II) Platform probe for /sys/devices/pci:00/:00:02.0/drm/ > card0 > [881147.377] (--) PCI:*(0@0:2:0) 8086:3ea5:8086:2074 rev 1, Mem @ > 0x604b00/ > 16777216, 0x40/134217728, I/O @ 0x4000/64, BIOS @ > 0x/131072 That's Intel "Iris Plus Graphics 655". [...] > [881147.426] (II) modeset(G0): using drv /dev/dri/card0 > [881147.427] (II) modeset(0): Creating default Display subsection in Screen > section > "Default Screen Section" for depth/fbbpp 24/32 > [881147.427] (==) modeset(0): Depth 24, (==) framebuffer bpp 32 > [881147.427] (EE) > [881147.427] (EE) Backtrace: > [881147.428] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x135) [0x557662d21f35] > [881147.429] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) > [0x7f3bb952318f] > [881147.430] (EE) 2: /usr/lib/xorg/Xorg (xf86PlatformMatchDriver+0x5c0) > [0x557662c1a2b0] > [881147.430] (EE) 3: /usr/lib/xorg/Xorg (xf86CollectOptions+0x77) > [0x557662bfd197] > [881147.431] (EE) unw_get_proc_name failed: no unwind info found [-10] > [881147.431] (EE) 4: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) > [0x7f3bb8a25940] > [881147.432] (EE) 5: /usr/lib/xorg/Xorg (InitOutput+0x9ae) [0x557662c0085e] > [881147.433] (EE) 6: /usr/lib/xorg/Xorg (InitFonts+0x1cc) [0x557662bc235c] > [881147.434] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xea) > [0x7f3bb936ecca] > [881147.434] (EE) 8: /usr/lib/xorg/Xorg (_start+0x2a) [0x557662babc9a] > [881147.434] (EE) > [881147.435] (EE) Segmentation fault at address 0x124 > [881147.435] (EE) > Fatal server error: > [881147.435] (EE) Caught signal 11 (Segmentation fault). Server aborting > [881147.435] (EE) > [881147.435] (EE) > Please consult the The X.Org Foundation support > at http://wiki.x.org > for help. > [881147.435] (EE) Please also check the log file at "/var/log/Xorg.0.log" for > additional information. > [881147.435] (EE) > [881147.467] (EE) Server terminated with error (1). Closing log file. Any details you can provide as to the setup and how you're starting Xorg? Please also provide a kernel log. Cheers, Julien
Bug#969739: Segmentation fault on startup
Package: xserver-xorg-core Version: 2:1.20.9-1 Severity: grave Same setup was working with 2:1.20.7-2, but with 2:1.20.9-1 crashes on startup (xinit). /var/log/Xorg.0.log follows: [881147.371] X.Org X Server 1.20.9 X Protocol Version 11, Revision 0 [881147.371] Build Operating System: Linux 4.19.0-10-amd64 x86_64 Debian [881147.371] Current Operating System: Linux 74d490b3be43 5.7.0-3-amd64 #1 SMP Debian 5.7.17-1 (2020-08-23) x86_64 [881147.371] Kernel command line: BOOT_IMAGE=/vmlinuz-5.7.0-3-amd64 root=/dev/mapper/vg0-root ro [881147.371] Build Date: 31 August 2020 03:49:48PM [881147.371] xorg-server 2:1.20.9-1 (https://www.debian.org/support) [881147.371] Current version of pixman: 0.36.0 [881147.371] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [881147.371] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [881147.371] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Sep 7 11:37:50 2020 [881147.371] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [881147.371] (==) No Layout section. Using the first Screen section. [881147.371] (==) No screen section available. Using defaults. [881147.371] (**) |-->Screen "Default Screen Section" (0) [881147.371] (**) | |-->Monitor "" [881147.372] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [881147.372] (==) Automatically adding devices [881147.372] (==) Automatically enabling devices [881147.372] (==) Automatically adding GPU devices [881147.372] (==) Max clients allowed: 256, resource mask: 0x1f [881147.372] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. [881147.372] Entry deleted from font path. [881147.372] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist. [881147.372] Entry deleted from font path. [881147.372] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist. [881147.372] Entry deleted from font path. [881147.372] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist. [881147.372] Entry deleted from font path. [881147.372] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist. [881147.372] Entry deleted from font path. [881147.372] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist. [881147.372] Entry deleted from font path. [881147.372] (==) FontPath set to: /usr/share/fonts/X11/misc, built-ins [881147.372] (==) ModulePath set to "/usr/lib/xorg/modules" [881147.372] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [881147.372] (II) Loader magic: 0x557662daee20 [881147.372] (II) Module ABI versions: [881147.372] X.Org ANSI C Emulation: 0.4 [881147.372] X.Org Video Driver: 24.1 [881147.372] X.Org XInput driver : 24.1 [881147.372] X.Org Server Extension : 10.0 [881147.372] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory) [881147.372] (--) using VT number 2 [881147.372] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration [881147.372] (II) xfree86: Adding drm device (/dev/dri/card0) [881147.372] (II) Platform probe for /sys/devices/pci:00/:00:02.0/drm/card0 [881147.377] (--) PCI:*(0@0:2:0) 8086:3ea5:8086:2074 rev 1, Mem @ 0x604b00/16777216, 0x40/134217728, I/O @ 0x4000/64, BIOS @ 0x/131072 [881147.377] (II) LoadModule: "glx" [881147.378] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [881147.378] (II) Module glx: vendor="X.Org Foundation" [881147.378] compiled for 1.20.9, module version = 1.0.0 [881147.378] ABI class: X.Org Server Extension, version 10.0 [881147.378] (==) Matched modesetting as autoconfigured driver 0 [881147.378] (==) Matched fbdev as autoconfigured driver 1 [881147.378] (==) Matched vesa as autoconfigured driver 2 [881147.378] (==) Assigned the driver to the xf86ConfigLayout [881147.378] (II) LoadModule: "modesetting" [881147.378] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [881147.378] (II) Module modesetting: vendor="X.Org Foundation" [881147.378] compiled for 1.20.9, module version = 1.20.9 [881147.378] Module class: X.Org Video Driver [881147.378] ABI class: X.Org Video Driver, version 24.1 [881147.378] (II) LoadModule: "fbdev" [881147.378] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so [881147.378] (II) Module fbdev: vendor="X.Org Foundation" [881147.378] compiled for 1.20.0, module version = 0.5.0 [881147.379] Module class: X.Org Video Driver [881147.379] ABI class: X.Org Video Driver, version 24.0 [881147.379] (II) LoadModule: "vesa" [881147.379] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so [881147.379] (II) Module vesa: vendor="X.Org