Bug 35391 - unplugging joystick makes the server crash
Summary: unplugging joystick makes the server crash
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/joystick (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Sascha Hlusiak
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 08:04 UTC by Timo Aaltonen
Modified: 2011-04-21 09:59 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Timo Aaltonen 2011-03-17 08:04:10 UTC
With the -joystick driver (git master as of 2010-12-16) installed this happens after unplugging the device (server 1.10rc2). 

(gdb) bt full
#0 0xb76cc658 in main_arena () from /lib/libc.so.6
No symbol table info available.
#1 0x080c4a4b in DeleteInputDeviceRequest (pDev=0xae74e10) at ../../../../hw/xfree86/common/xf86Xinput.c:966
        pInfo = 0xb76cc628
        drv = <value optimised out>
        isMaster = <value optimised out>
#2 0x080c5a2f in xf86DisableDevice (dev=0xae74e10, panic=1) at ../../../../hw/xfree86/common/xf86Xinput.c:1444
No locals.
#3 0xb64aa32a in jstkCoreUnInit (drv=0xae75960, pInfo=0xadae6d0, flags=0) at ../../src/jstk.c:627
        device = 0xae742b8
#4 0x080c4a4b in DeleteInputDeviceRequest (pDev=0xae74e10) at ../../../../hw/xfree86/common/xf86Xinput.c:966
        pInfo = 0xadae6d0
        drv = <value optimised out>
        isMaster = <value optimised out>
#5 0x080cc23f in remove_device (backend=<value optimised out>, dev=0xae74e10) at ../../config/config.c:84
No locals.
#6 0x080cc2f9 in remove_devices (backend=0x81de79d "udev",
    config_info=0xac8b458 "udev:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/input/input9/event7")
    at ../../config/config.c:96
        dev = <value optimised out>
        next = 0xae56f48
#7 0x080cd04a in device_removed (data=0x0, err=1, read_mask=0x820e380) at ../../config/udev.c:233
        value = 0xac8b458 "udev:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/input/input9/event7"
        syspath = <value optimised out>
#8 wakeup_handler (data=0x0, err=1, read_mask=0x820e380) at ../../config/udev.c:257
        udev_fd = <value optimised out>
        udev_device = <value optimised out>
        action = <value optimised out>
#9 0x080746f2 in WakeupHandler (result=1, pReadmask=0x820e380) at ../../dix/dixutils.c:419
        i = 2
        j = <value optimised out>
#10 0x080a201a in WaitForSomething (pClientsReady=0xac4a1c8) at ../../os/WaitFor.c:235
        i = <value optimised out>
        waittime = {tv_sec = 74, tv_usec = 469748}
        wt = 0xbfa91324
        timeout = <value optimised out>
        clientsReadable = {fds_bits = {0 <repeats 32 times>}}
        clientsWritable = {fds_bits = {5, -1079438712, 134693082, -1079438740, 173, 1073741824, -1218218719, 16, 0,
            -1079438632, 136294388, 32, 181785064, -1079438728, 134919486, 44, -1079438632, 1, 178075216, -1079438692,
            136294388, -1079438696, 134929695, 181785064, -1079438632, 1, 134693226, -1079438552, -1216633597, -1079438584,
            134901974, 181785064}}
        selecterr = 19
        nready = 0
        devicesReadable = {fds_bits = {0 <repeats 32 times>}}
        now = <value optimised out>
        someReady = <value optimised out>
#11 0x0807001e in Dispatch () at ../../dix/dispatch.c:367
        clientReady = 0xac4a1c8
        result = <value optimised out>
        client = <value optimised out>
        nready = <value optimised out>
        icheck = 0x820d878
        start_tick = <value optimised out>
#12 0x0806292c in main (argc=8, argv=0xbfa914b4, envp=0xbfa914d8) at ../../dix/main.c:287
        i = <value optimised out>
        alwaysCheckForInput = {0, 1}
Comment 1 Timo Aaltonen 2011-03-17 08:05:22 UTC
another backtrace

#0  DeleteInputDeviceRequest (pDev=0x400f190) at ../../../../hw/xfree86/common/xf86Xinput.c:965
        pInfo = 0x3d259d0
        drv = 0x0
        isMaster = 0
#1  0x00007fc63b2dfaac in jstkCoreUnInit (drv=<value optimized out>, pInfo=0x3f190e0, flags=<value optimized out>) at ../../src/jstk.c:627
        device = 0x3fc61f0
#2  0x000000000047d169 in DeleteInputDeviceRequest (pDev=0x40184e0) at ../../../../hw/xfree86/common/xf86Xinput.c:966
        pInfo = 0x3f190e0
        drv = 0x3f08900
        isMaster = 0
#3  0x000000000042333c in CloseDeviceList (listHead=0x7f4768) at ../../dix/devices.c:981
        freedIds = {0, 0, 1 <repeats 13 times>, 0, 1, 0 <repeats 23 times>}
        dev = <value optimized out>
#4  0x00000000004238b3 in CloseDownDevices () at ../../dix/devices.c:1009
        dev = 0x0
#5  0x000000000046ad67 in SigAbortServer (signo=11) at ../../os/log.c:411
No locals.
#6  0x000000000046b992 in FatalSignal (signo=11) at ../../os/log.c:541
        beenhere = 1
#7  <signal handler called>
No symbol table info available.
#8  0x0000000003f0ba10 in ?? ()
No symbol table info available.
#9  0x000000000047d169 in DeleteInputDeviceRequest (pDev=0x400f190) at ../../../../hw/xfree86/common/xf86Xinput.c:966
        pInfo = 0x7fc64293a618
        drv = 0x7fc64293a668
        isMaster = 0
#10 0x00007fc63b2dfaac in jstkCoreUnInit (drv=<value optimized out>, pInfo=0x3fe88e0, flags=<value optimized out>) at ../../src/jstk.c:627
        device = 0x3fc61f0
#11 0x000000000047d169 in DeleteInputDeviceRequest (pDev=0x400f190) at ../../../../hw/xfree86/common/xf86Xinput.c:966
        pInfo = 0x3fe88e0
        drv = 0x3f08900
        isMaster = 0
Comment 2 Ivan Yurasov 2011-04-02 23:52:14 UTC
I can confirm this problem.
ArchLinux
xorg-server Version: 1.10.0.901-1

Xorg.0.log:
[  2620.020] (II) config/udev: Adding input device Ciponic Technology Mad Catz Andretti Racing Wheel (/dev/input/js2)
[  2620.020] (II) No input driver/identifier specified (ignoring)
[  2623.100] (WW) JOYSTICK: Read failed. Deactivating device.
[  2623.101] (II) config/udev: removing device Ciponic Technology Mad Catz Andretti Racing Wheel (keys)
[  2623.102] 
Backtrace:
[  2623.102] 0: /usr/bin/X (xorg_backtrace+0x26) [0x49f3e6]
[  2623.102] 1: /usr/bin/X (0x400000+0x60b69) [0x460b69]
[  2623.102] 2: /lib/libpthread.so.0 (0x7f837069b000+0xf750) [0x7f83706aa750]
[  2623.102] 3: /lib/libc.so.6 (0x7f836f601000+0x35a358) [0x7f836f95b358]
[  2623.102] Segmentation fault at address 0x7f836f95b358
Comment 3 Sascha Hlusiak 2011-04-20 12:00:30 UTC
This crash should be fixed by commit 4358209e7e4383b4ebdec93cc116bb1c21d373a7, included in upcoming 1.6.0
Comment 4 Ivan Yurasov 2011-04-20 20:52:55 UTC
where I can test it?
Comment 5 Sascha Hlusiak 2011-04-21 03:05:07 UTC
You can download the source code of joystick-1.6.0, which should fix this bug, here:

http://xorg.freedesktop.org/archive/individual/driver/xf86-input-joystick-1.6.0.tar.bz2

Please reopen if the issue still exists.
Comment 6 Ivan Yurasov 2011-04-21 09:59:23 UTC
all ok,
1.6.0 fix this
thank you!


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.