Bug 13222 - xserver-1.4 crash when using a USB keyboard with evdev
Summary: xserver-1.4 crash when using a USB keyboard with evdev
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: 7.3 (2007.09)
Hardware: Other All
: medium normal
Assignee: Zephaniah E. Hull
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 13228 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-13 08:36 UTC by Ademar Reis
Modified: 2007-11-14 16:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
server log when starting with two keyboards (26.52 KB, text/x-log)
2007-11-13 08:40 UTC, Ademar Reis
no flags Details
xserver log when starting with only one USB keyboard (SIGSEGV) (51.71 KB, text/x-log)
2007-11-13 08:43 UTC, Ademar Reis
no flags Details

Description Ademar Reis 2007-11-13 08:36:59 UTC
I have a crash when using evdev on Linux and two keyboards. Tested with xserver-1.4 + fixes found on git branch origin/server-1.4-branch (as of today).

To reproduce, just play around with two keyboards (in my setup, one PS2 and other USB, I don't have two USBs to test). It doesn't happen if the evdev driver is not installed.

Here is what I get:

1. When I connect the second keyboard (a USB one), X sometimes crashes and sometimes generates spurious mouse events (middle button click, mouse-move)
2. If the xserver survives, when I remove the USB keyboard it crashes imediately.
3. It doesn't start with the two keyboards connected (SIGSEGV)

Below is the output from the server when in debug mode plus a backtrace of the crash when starting it. I'll also attach the Xorg.0.log file.

FlushingSerial
[config/hal] getting input.x11_driver on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logica
ldev_input returned evdev
 [config/hal] getting input.device on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logicaldev _input returned /dev/input/event10
 [config/hal] getting info.product on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logicaldev _input returned USB-compliant keyboard
 [config/hal] getting input.xkb.rules on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logicaldev_input returned base
 [config/hal] getting input.xkb.model on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logical            dev_input returned evdev
 [config/hal] getting input.xkb.layout on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logicaldev_input returned us
 [config/hal] getting input.xkb.variant on /org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logicaldev_input returned
(EE) USB-compliant keyboard-usb-0000:00:1d.1-2/input1: AbsoluteTouch: 'DIGI_Touch' does not exist.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212393792 (LWP 23015)]
EvdevProc (device=0x0, what=2) at evdev.c:142
142         InputInfoPtr pInfo = device->public.devicePrivate;
(gdb) bt
#0  EvdevProc (device=0x0, what=2) at evdev.c:142
#1  0xb69dd27c in evdevRescanDevices (pInfo=<value optimized out>) at evdev_brain.c:302
#2  0xb69dd98b in evdevNewDriver (driver=0x84509f0) at evdev_brain.c:460
#3  0xb69dc4d8 in EvdevCorePreInit (drv=0x844bc28, dev=0x8450918, flags=0) at evdev.c:449
#4  0x08101436 in NewInputDeviceRequest (options=0x8449930, pdev=0xbff3994c) at xf86Xinput.c:398
#5  0x080b6196 in device_added (hal_ctx=0x844ad70,
    udi=0x8449748 "/org/freedesktop/Hal/devices/usb_device_518_2_noserial_if0_logicaldev_input")
    at hal.c:232
#6  0x080b644d in connect_hook (connection=0x8449418, data=0x824dd40) at hal.c:323
#7  0x080b58c5 in connect_to_bus () at dbus-core.c:169
#8  0x080b5920 in reconnect_timer (timer=0x8272008, time=4568956, arg=0x0) at dbus-core.c:188
#9  0x08212368 in DoTimer (timer=0x8272008, now=4568956, prev=0x826e284) at WaitFor.c:459
#10 0x08211d21 in WaitForSomething (pClientsReady=0xbff39d30) at WaitFor.c:293
#11 0x08085ff1 in Dispatch () at dispatch.c:425
#12 0x0806ed24 in main (argc=1, argv=0xbff3a264, envp=0xbff3a26c) at main.c:452
(gdb)
Comment 1 Ademar Reis 2007-11-13 08:40:03 UTC
Created attachment 12512 [details]
server log when starting with two keyboards
Comment 2 Ademar Reis 2007-11-13 08:42:03 UTC
duh, actually it happens with just one USB keyboard as well, no need to have two: X won't start if I have a USB keyboard connected.
Comment 3 Ademar Reis 2007-11-13 08:43:19 UTC
Created attachment 12513 [details]
xserver log when starting with only one USB keyboard (SIGSEGV)
Comment 4 Bill Nottingham 2007-11-13 13:10:56 UTC
*** Bug 13228 has been marked as a duplicate of this bug. ***
Comment 5 Bill Nottingham 2007-11-13 13:11:58 UTC
I'm seeing this with a simple laptop setup as well (PS/2 keyboard, trackpoint.)
Comment 6 Bill Nottingham 2007-11-13 13:13:25 UTC
evdev appears to be choking on the:

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/class/input/input8
U: Uniq=
H: Handlers=kbd event8 
B: EV=3
B: KEY=3f000b00000000 0 0 0

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/class/input/input9
U: Uniq=
H: Handlers=kbd event9 
B: EV=3
B: KEY=3f000b00000000 0 0 0

devices.
Comment 7 Peter Hutterer 2007-11-13 15:26:43 UTC
(In reply to comment #0)
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1212393792 (LWP 23015)]
> EvdevProc (device=0x0, what=2) at evdev.c:142
> 142         InputInfoPtr pInfo = device->public.devicePrivate;
> (gdb) bt
> #0  EvdevProc (device=0x0, what=2) at evdev.c:142
> #1  0xb69dd27c in evdevRescanDevices (pInfo=<value optimized out>) at
> evdev_brain.c:302

Both the master and the evdev-1.1-branch do not have evdevRescanDevices anymore. 
Before input-hotplug, evdev had it's own hotplugging code inside the driver, now it doesn't need to anymore.
As I understand, no release has been made since the evdev_brain.c was removed (april this year)
Can you please try with the git version of evdev, maybe the evdev-1.1-branch one. If it works, we have to release.
Comment 8 Zephaniah E. Hull 2007-11-13 17:43:27 UTC
Not a bug.  1.1.x xf86-input-evdev is incompatable with 1.4+ xserver.
Comment 9 Ademar Reis 2007-11-14 04:46:35 UTC
Zephaniah: how can you close a bug as invalid if there's no release fixing it yet?

Or am I in such a desperate need of coffee that I don't see the new (> 1.1.x) release anywhere?
Comment 10 Ademar Reis 2007-11-14 05:49:38 UTC
Well, with origin/master it works, with 1-1-branch it still crashes.

I'm reopening the bug and then closing it again as fixed so that we can use it as a reference (maybe add a note on the xserver-1.4.1 release notes about this incompatibility to avoid confusion?).
Comment 11 Ademar Reis 2007-11-14 05:50:30 UTC
marking as fixed (please release a new version with the code on git, since xorg-7.3 is broken)
Comment 12 Peter Hutterer 2007-11-14 16:17:12 UTC
(In reply to comment #11)
> marking as fixed (please release a new version with the code on git, since
> xorg-7.3 is broken)
> 

daniels just did a release. 

http://xorg.freedesktop.org/archive/individual/driver/xf86-input-evdev-1.2.0.tar.bz2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.