Bug#564256: xorg-server: config_init() is called too early
Package: xorg-server
Version: 2:1.7.3.902-1
Severity: important
Tags: patch
(reported by Sedat Dilek on IRC)
config_udev_init() calls NIDR, which enables devices, so they can start
sending events. But the event queue is not initialized before
InitInput(), so we crash:
[Thread debugging using libthread_db enabled]
X.Org X Server 1.7.4
Release Date: 2010-01-08
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.33-rc3-iniza-686-kms i686 Debian
Current Operating System: Linux seduxbox 2.6.33-rc3-iniza-686-kms #1 SMP PREEMPT Fri Jan 8 07:41:07 CET 2010 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.33-rc3-iniza-686-kms root=UUID=b1333729-42ce-4a1b-9669-41c14c42bb81 ro nomodeset 3 quiet
Build Date: 08 January 2010 02:15:12PM
xorg-server 2:1.7.4-1~dileX+5 (sedat.dilek@gmail.com)
Current version of pixman: 0.16.4
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: Fri Jan 8 16:24:27 2010
(==) Using config file: "/etc/X11/xorg.conf"
[tcsetpgrp failed in terminal_inferior: Operation not permitted]
(II) [KMS] Kernel modesetting enabled.
SELinux: Disabled on system, not enabling in X server
record: RECORD extension enabled at configure time.
record: This extension is known to be broken, disabling extension now..
record: http://bugs.freedesktop.org/show_bug.cgi?id=20500
debug_get_option: GALLIUM_TRACE = (null)
debug_get_bool_option: GALLIUM_RBUG = FALSE
debug_get_bool_option: RADEON_SOFTPIPE = FALSE
debug_get_bool_option: RADEON_NO_TCL = FALSE
r300: Note: Got unsupported format: PIPE_FORMAT_Z32_UNORM in check_tex_format
r300: Note: Got unsupported format: PIPE_FORMAT_X8Z24_UNORM in check_tex_format
r300: Note: Got unsupported format: PIPE_FORMAT_S8Z24_UNORM in check_tex_format
(EE) PreInit returned NULL for ""Lid Switch""
(EE) PreInit returned NULL for ""HDA Digital PCBeep""
Program received signal SIGSEGV, Segmentation fault.
0x080d4867 in CreateClassesChangedEvent (event=0x0, master=0x8417258, slave=0x8472ea0, type=4) at ../../dix/getevents.c:194
194 dce = (DeviceChangedEvent*)event->event;
#0 0x080d4867 in CreateClassesChangedEvent (event=0x0, master=0x8417258, slave=0x8472ea0, type=4) at ../../dix/getevents.c:194
i = <value optimized out>
dce = <value optimized out>
ms = 855628
#1 0x080d4b55 in updateFromMaster (events=<value optimized out>, dev=0x8472ea0, type=4, num_events=0xbfffea2c) at ../../dix/getevents.c:632
master = 0x8417258
#2 0x080d5689 in GetPointerEvents (events=0x0, pDev=0x8472ea0, type=6, buttons=0, flags=4, first_valuator=0, num_valuators=3, valuators=0xbfffec58)
at ../../dix/getevents.c:1042
num_events = 1
ms = 855628
event = <value optimized out>
raw = <value optimized out>
x = <value optimized out>
y = <value optimized out>
cx = <value optimized out>
cy = <value optimized out>
x_frac = 0
y_frac = 0
cx_frac = <value optimized out>
cy_frac = <value optimized out>
scr = 0x8223540
#3 0x080b2184 in xf86PostMotionEventP (device=0x8472ea0, is_absolute=1, first_valuator=0, num_valuators=3, valuators=0xbfffec58)
at ../../../../hw/xfree86/common/xf86Xinput.c:770
i = <value optimized out>
nevents = <value optimized out>
drag = 1
flags = <value optimized out>
index = 0
dx = -640
dy = -346
__FUNCTION__ = "xf86PostMotionEventP"
#4 0xb77ad7a4 in ?? () from /usr/lib/xorg/modules/input/evdev_drv.so
No symbol table info available.
#5 0xb77adb1c in ?? () from /usr/lib/xorg/modules/input/evdev_drv.so
No symbol table info available.
#6 0x080bad8f in xf86SigioReadInput (fd=23, closure=0x8471c30) at ../../../../hw/xfree86/common/xf86Events.c:305
errno_save = <value optimized out>
#7 0x0814a4f4 in xf86SIGIO (sig=29) at ../../../../../hw/xfree86/os-support/linux/../shared/sigio.c:118
i = 7
ready = {fds_bits = {8388608, 0 <repeats 31 times>}}
to = {tv_sec = 0, tv_usec = 0}
save_errno = 2
r = <value optimized out>
#8 <signal handler called>
No symbol table info available.
#9 0xb7fe1424 in __kernel_vsyscall ()
No symbol table info available.
#10 0xb7fa001c in __close_nocancel () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#11 0xb77abc21 in ?? () from /usr/lib/xorg/modules/input/evdev_drv.so
No symbol table info available.
#12 0x080b2708 in xf86NewInputDevice (idev=0x8474980, pdev=0xbffff518, enable=1 '\001') at ../../../../hw/xfree86/common/xf86Xinput.c:514
drv = <value optimized out>
pInfo = <value optimized out>
dev = <value optimized out>
rval = <value optimized out>
#13 0x080b2b6d in NewInputDeviceRequest (options=0x844d428, pdev=0xbffff518) at ../../../../hw/xfree86/common/xf86Xinput.c:638
idev = <value optimized out>
option = 0x1
rval = 1
is_auto = 1
#14 0x0809e342 in device_added (udev_device=0x0) at ../../config/udev.c:120
path = 0x8452958 "/dev/input/event6"
driver = 0x8474908 "udev:/sys/devices/platform/pcspkr/input/input6/event6"
name = 0x844d730 "\"PC Speaker\""
config_info = <value optimized out>
syspath = 0x81c0565 "x11_options."
key = <value optimized out>
value = <value optimized out>
tmp = <value optimized out>
options = 0x844d428
tmpo = <value optimized out>
dev = 0x0
set = <value optimized out>
entry = 0x0
parent = <value optimized out>
rc = <value optimized out>
#15 0x0809e60e in config_udev_init () at ../../config/udev.c:221
syspath = <value optimized out>
udev_device = 0x8461cf0
udev = 0x8428718
enumerate = 0x8428830
devices = <value optimized out>
device = 0x844cc48
rc = <value optimized out>
#16 0x0809ded7 in config_init () at ../../config/config.c:39
No locals.
#17 0x080668fd in main (argc=1, argv=0xbffff674, envp=0xbffff67c) at ../../dix/main.c:256
i = <value optimized out>
alwaysCheckForInput = {0, 1}
Backtrace:
0: /usr/bin/Xorg (xorg_backtrace+0x3b) [0x80ddc9b]
1: /usr/bin/Xorg (0x8048000+0x62215) [0x80aa215]
2: (vdso) (__kernel_rt_sigreturn+0x0) [0xb7fe140c]
3: /usr/bin/Xorg (0x8048000+0x8cb55) [0x80d4b55]
4: /usr/bin/Xorg (0x8048000+0x8d689) [0x80d5689]
5: /usr/bin/Xorg (xf86PostMotionEventP+0x94) [0x80b2184]
6: /usr/lib/xorg/modules/input/evdev_drv.so (0xb77a9000+0x47a4) [0xb77ad7a4]
7: /usr/lib/xorg/modules/input/evdev_drv.so (0xb77a9000+0x4b1c) [0xb77adb1c]
8: /usr/bin/Xorg (0x8048000+0x72d8f) [0x80bad8f]
9: /usr/bin/Xorg (0x8048000+0x1024f4) [0x814a4f4]
10: (vdso) (__kernel_sigreturn+0x0) [0xb7fe1400]
11: /usr/bin/Xorg (0x8048000+0x6a708) [0x80b2708]
12: /usr/bin/Xorg (NewInputDeviceRequest+0x1fd) [0x80b2b6d]
13: /usr/bin/Xorg (0x8048000+0x56342) [0x809e342]
14: /usr/bin/Xorg (0x8048000+0x5660e) [0x809e60e]
15: /usr/bin/Xorg (config_init+0x17) [0x809ded7]
16: /usr/bin/Xorg (0x8048000+0x1e8fd) [0x80668fd]
17: /lib/i686/cmov/libc.so.6 (__libc_start_main+0xe5) [0xb7cf2b55]
18: /usr/bin/Xorg (0x8048000+0x1e541) [0x8066541]
Segmentation fault at address (nil)
Fatal server error:
Caught signal 11 (Segmentation fault). Server aborting
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
Moving config_init() after InitInput() in dix/main.c:main() should fix
that.
Cheers,
Julien
Reply to: