Scrambled output, or double free with backtrace, happening with malformed config files.
When I have a malformed configuration file under /etc/X11/xorg.conf.d/
, the X server refuses to start and tells what is malformed.
However, the telling about what is malformed is scrambled.
Demonstration: I created a /etc/X11/xorg.conf.d/06-malformed.conf
(file is attached), which misses the Section
statement.
When I start Xorg -retro -verbose 6 -logverbose 6 :1
, it correctly fails with the scrambled information "�'�b" is not a valid keyword in this section.
printed to the terminal:
(WW) Failed to open protocol names file lib/xorg/protocol.txt
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
Build Operating System: Linux Artixlinux
Current Operating System: Linux felics-pocket 5.14.0-pf5-longcmdline-custom #1 SMP PREEMPT Wed, 13 Oct 2021 12:59:08 +0000 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux-pf-custom root=/dev/mapper/btrfs_root rootflags=subvol=/subvolumes/root,compress=lzo,ssd,ssd_spread,noautodefrag,discard,relatime,commit=60 ro kdb=off loglevel=9 pcie_aspm=force vt.default_utf8=1 fbcon=rotate:1,font:6x8 intel_iommu=on iommu=pt iommu.passtrough=1 audit=0 noautogroup nmi_watchdog=0 no_console_suspend=1 resume=/dev/mapper/swsusp
Build Date: 04 August 2021 08:47:24AM
Current version of pixman: 0.40.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.1.log", Time: Tue Oct 19 11:26:34 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Parse error on line 1 of section InputClass in file /etc/X11/xorg.conf.d/06-malformed.conf
"� �V" is not a valid keyword in this section.
(EE) Problem parsing the config file
(EE) Error parsing the config file
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
When reporting above error, I have the following config files active (all are attached -- the filename is a link to the file):
04-inputhotplug.conf
05-keyboard.conf
06-malformed.conf
06-pointer.conf
07-wacom.conf
08-tablet-libinput.conf
11-joystick.conf
20-graphicscard.conf
30-monitor.conf
52-egalax-virtual.conf
90-evdev-trackpoint.conf
90-xpra-virtual.conf
And Here: Xorg.1.log
I have attached the Xorg.1.log
from the above-mentioned run of Xorg
.
Actually, the information is not scrambled if I name my malformed configfile /etc/X11/xorg.conf.d/01-malformed.conf
, thereby bringing it at the first position. It then reads correctly "Identifier" is not a valid keyword in this section.
.
If I name it 04a-malformed.conf
, the output still is not scrambled, but I get a free(): double free detected in tcache 2
and a backtrace:
(WW) Failed to open protocol names file lib/xorg/protocol.txt
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
Build Operating System: Linux Artixlinux
Current Operating System: Linux felics-pocket 5.14.0-pf5-longcmdline-custom #1 SMP PREEMPT Wed, 13 Oct 2021 12:59:08 +0000 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux-pf-custom root=/dev/mapper/btrfs_root rootflags=subvol=/subvolumes/root,compress=lzo,ssd,ssd_spread,noautodefrag,discard,relatime,commit=60 ro kdb=off loglevel=9 pcie_aspm=force vt.default_utf8=1 fbcon=rotate:1,font:6x8 intel_iommu=on iommu=pt iommu.passtrough=1 audit=0 noautogroup nmi_watchdog=0 no_console_suspend=1 resume=/dev/mapper/swsusp
Build Date: 04 August 2021 08:47:24AM
Current version of pixman: 0.40.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.1.log", Time: Tue Oct 19 11:32:52 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Parse error on line 1 of section ServerFlags in file /etc/X11/xorg.conf.d/04a-malformed.conf
"Identifier" is not a valid keyword in this section.
free(): double free detected in tcache 2
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/Xorg (xorg_backtrace+0x89) [0x55d9d030b619]
(EE) 1: /usr/lib/Xorg (0x55d9d01c1000+0x155479) [0x55d9d0316479]
(EE) 2: /usr/lib/libc.so.6 (0x7fbc3d998000+0x3cf80) [0x7fbc3d9d4f80]
(EE) 3: /usr/lib/libc.so.6 (gsignal+0x145) [0x7fbc3d9d4ef5]
(EE) 4: /usr/lib/libc.so.6 (abort+0x116) [0x7fbc3d9be862]
(EE) 5: /usr/lib/libc.so.6 (0x7fbc3d998000+0x7ef38) [0x7fbc3da16f38]
(EE) 6: /usr/lib/libc.so.6 (0x7fbc3d998000+0x86bea) [0x7fbc3da1ebea]
(EE) 7: /usr/lib/libc.so.6 (0x7fbc3d998000+0x886c8) [0x7fbc3da206c8]
(EE) 8: /usr/lib/libc.so.6 (cfree+0x68) [0x7fbc3da23ca8]
(EE) 9: /usr/lib/Xorg (xf86optionListFree+0x37) [0x55d9d0363f97]
(EE) 10: /usr/lib/Xorg (0x55d9d01c1000+0x1af621) [0x55d9d0370621]
(EE) 11: /usr/lib/Xorg (0x55d9d01c1000+0x166f9c) [0x55d9d0327f9c]
(EE) 12: /usr/lib/Xorg (InitOutput+0x2094) [0x55d9d03330b4]
(EE) 13: /usr/lib/Xorg (0x55d9d01c1000+0x3aaed) [0x55d9d01fbaed]
(EE) 14: /usr/lib/libc.so.6 (__libc_start_main+0xd5) [0x7fbc3d9bfb25]
(EE) 15: /usr/lib/Xorg (_start+0x2e) [0x55d9d01fcc7e]
(EE)
(EE)
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
Aborted
Here: Xorg.1.log
is the Xorg
log file from this run of Xorg
.
If I name it 05a-malformed.conf
, the scrambled output is there.