Bug 24487

Summary: X segfaults on KVM switch
Product: xorg Reporter: Matt Turner <mattst88>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: blocker    
Priority: medium CC: mybg
Version: gitKeywords: regression
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log
none
Xorg.0.log, disconnecting keyboard repeatedly none

Description Matt Turner 2009-10-12 16:57:04 UTC
Created attachment 30309 [details]
Xorg.0.log

When switching between computers with a KVM, my AMD64 desktop will occasionally (1 in 4 times, maybe) will have X either lock up or reset.

Log attached.

Running xserver from git and xf86-input-evdev from git. Both are from 10/05/2009.
Comment 1 Matt Turner 2009-10-12 17:06:40 UTC
Created attachment 30310 [details]
Xorg.0.log, disconnecting keyboard repeatedly

Attached is a log of X crashing when repeatedly disconnecting the keyboard.
Comment 2 Michael Ben-Gershon 2009-12-09 05:00:36 UTC
I also have this problem, with a Fedora system (nvidia driver) which shares a keyboard monitor and mouse with 2 other machines via a KVM switch. Switching to another machine and back to the Fedora system will usually crash Xorg on the Fedora machine. The X display manager may be restarted only by doing a telinit 3, then killing the Xorg process, then doing a telinit 5 from the remote machine.

Fedora bugzilla will not relate to the problem as they saw I am using the nvidia binary supplied driver and not their open source version. However, I am convinced that there is no connection, as Matt Turner's bug report indicates (he is not even using an NVIDIA card at all!)

I am using xorg-x11-server-Xorg-1.7.1-7.fc12

Subjectively it seems more common when the machine is switched back before the
xscreensaver has cut-in, but this is not always the case. I would say that it
happens about 70% of the times the KVM is used. Watching the Xorg.0.log file
from the remote machine via telnet shows that the crash happens when the Fedora
machine is switched back in and not when it is switched out.


Steps to Reproduce:
1. Switch to remote machine with the KVM
2. Switch back to Fedora machine
3. In most cases the whole Xorg system will have crashed.


Two sample log files follow, note that the crash is in a different place in
each log:

First backtrace:
Backtrace:
0: /usr/bin/Xorg (xorg_backtrace+0x3c) [0x80e587c]
1: /usr/bin/Xorg (0x8047000+0x5fb66) [0x80a6b66]
2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
3: /lib/libc.so.6 (0x43020000+0x70ebd) [0x43090ebd]
4: /lib/libc.so.6 (__libc_malloc+0x5e) [0x430921fe]
5: /usr/bin/Xorg (Xalloc+0x2a) [0x80a770a]
6: /usr/bin/Xorg (0x8047000+0xedb06) [0x8134b06]
7: /usr/bin/Xorg (0x8047000+0xee40b) [0x813540b]
8: /usr/bin/Xorg (0x8047000+0x271f7) [0x806e1f7]
9: /usr/bin/Xorg (0x8047000+0x1b8c5) [0x80628c5]
10: /lib/libc.so.6 (__libc_start_main+0xe6) [0x43036bb6]
11: /usr/bin/Xorg (0x8047000+0x1b4b1) [0x80624b1]
Segmentation fault at address 0x4000088

Fatal server error:
Caught signal 11 (Segmentation fault). Server aborting


Please consult the The X.Org Foundation support
at http://bodhi.fedoraproject.org/
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional
information.

[mi] EQ overflowing. The server is probably stuck in an infinite loop.

Backtrace:
0: /usr/bin/Xorg (xorg_backtrace+0x3c) [0x80e587c]
1: /usr/bin/Xorg (mieqEnqueue+0x1b7) [0x80e51a7]
2: /usr/bin/Xorg (xf86PostMotionEventP+0xd4) [0x80bf8a4]
3: /usr/lib/xorg/modules/input/evdev_drv.so (0xb75f8000+0x4602) [0xb75fc602]
4: /usr/lib/xorg/modules/input/evdev_drv.so (0xb75f8000+0x48f6) [0xb75fc8f6]
5: /usr/bin/Xorg (0x8047000+0x6b1f0) [0x80b21f0]
6: /usr/bin/Xorg (0x8047000+0x11ed24) [0x8165d24]
7: (vdso) (__kernel_sigreturn+0x0) [0xffffe400]
8: (vdso) (__kernel_vsyscall+0x10) [0xffffe424]
9: /lib/libc.so.6 (0x43020000+0xe9b83) [0x43109b83]
10: /lib/libc.so.6 (0x43020000+0x740d4) [0x430940d4]
11: /lib/libc.so.6 (0x43020000+0x70787) [0x43090787]
12: /usr/bin/Xorg (Xfree+0x22) [0x80a7452]
13: /usr/bin/Xorg (0x8047000+0x62b2a) [0x80a9b2a]
14: /usr/bin/Xorg (0x8047000+0x62bb2) [0x80a9bb2]
15: /usr/bin/Xorg (CloseWellKnownConnections+0x34) [0x80a3bf4]
16: /usr/bin/Xorg (0x8047000+0x66ce8) [0x80adce8]
17: /usr/bin/Xorg (0x8047000+0x6734e) [0x80ae34e]
18: /usr/bin/Xorg (0x8047000+0x5fbc0) [0x80a6bc0]
19: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
20: /lib/libc.so.6 (0x43020000+0x70ebd) [0x43090ebd]
21: /lib/libc.so.6 (__libc_malloc+0x5e) [0x430921fe]
22: /usr/bin/Xorg (Xalloc+0x2a) [0x80a770a]
23: /usr/bin/Xorg (0x8047000+0xedb06) [0x8134b06]
24: /usr/bin/Xorg (0x8047000+0xee40b) [0x813540b]
25: /usr/bin/Xorg (0x8047000+0x271f7) [0x806e1f7]
26: /usr/bin/Xorg (0x8047000+0x1b8c5) [0x80628c5]
27: /lib/libc.so.6 (__libc_start_main+0xe6) [0x43036bb6]
28: /usr/bin/Xorg (0x8047000+0x1b4b1) [0x80624b1] 

============================================================

Second backtrace:
(II) UnloadModule: "evdev"
(II) config/hal: Adding input device Logitech USB-PS/2 Optical Mouse
(**) Logitech USB-PS/2 Optical Mouse: always reports core events
(**) Logitech USB-PS/2 Optical Mouse: Device: "/dev/input/event3"
(II) Logitech USB-PS/2 Optical Mouse: Found 3 mouse buttons
(II) Logitech USB-PS/2 Optical Mouse: Found scroll wheel(s)
(II) Logitech USB-PS/2 Optical Mouse: Found relative axes
(II) Logitech USB-PS/2 Optical Mouse: Found x and y relative axes
(II) Logitech USB-PS/2 Optical Mouse: Configuring as mouse
(**) Logitech USB-PS/2 Optical Mouse: YAxisMapping: buttons 4 and 5
(**) Logitech USB-PS/2 Optical Mouse: EmulateWheelButton: 4,
EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Logitech USB-PS/2 Optical Mouse"
(type: MOUSE)
(**) Logitech USB-PS/2 Optical Mouse: (accel) keeping acceleration scheme 1
(**) Logitech USB-PS/2 Optical Mouse: (accel) acceleration profile 0
(II) Logitech USB-PS/2 Optical Mouse: initialized for relative axes.
(II) config/hal: Adding input device Cypress PS/2 Keyboard & Mouse
(**) Cypress PS/2 Keyboard & Mouse: always reports core events
(**) Cypress PS/2 Keyboard & Mouse: Device: "/dev/input/event5"
(II) Cypress PS/2 Keyboard & Mouse: Found 3 mouse buttons
(II) Cypress PS/2 Keyboard & Mouse: Found scroll wheel(s)
(II) Cypress PS/2 Keyboard & Mouse: Found relative axes
(II) Cypress PS/2 Keyboard & Mouse: Found x and y relative axes
(II) Cypress PS/2 Keyboard & Mouse: Configuring as mouse
(**) Cypress PS/2 Keyboard & Mouse: YAxisMapping: buttons 4 and 5
(**) Cypress PS/2 Keyboard & Mouse: EmulateWheelButton: 4, EmulateWheelInertia:
10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Cypress PS/2 Keyboard & Mouse"
(type: MOUSE)
(**) Cypress PS/2 Keyboard & Mouse: (accel) keeping acceleration scheme 1
(**) Cypress PS/2 Keyboard & Mouse: (accel) acceleration profile 0
(II) Cypress PS/2 Keyboard & Mouse: initialized for relative axes.
(II) config/hal: Adding input device Cypress PS/2 Keyboard & Mouse
(**) Cypress PS/2 Keyboard & Mouse: always reports core events
(**) Cypress PS/2 Keyboard & Mouse: Device: "/dev/input/event4"
(II) Cypress PS/2 Keyboard & Mouse: Found keys
(II) Cypress PS/2 Keyboard & Mouse: Configuring as keyboard
(II) XINPUT: Adding extended input device "Cypress PS/2 Keyboard & Mouse"
(type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "terminate:ctrl_alt_bksp"

Backtrace:
0: /usr/bin/Xorg (xorg_backtrace+0x3c) [0x80e587c]
1: /usr/bin/Xorg (0x8047000+0x5fb66) [0x80a6b66]
2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
3: /lib/libc.so.6 (0x43020000+0x71511) [0x43091511]
4: /lib/libc.so.6 (0x43020000+0x73019) [0x43093019]
5: /lib/libc.so.6 (realloc+0xe0) [0x430932d0]
6: /usr/bin/Xorg (Xrealloc+0x34) [0x80a75a4]
7: /usr/bin/Xorg (dixAllocatePrivate+0x10d) [0x8088e8d]
8: /usr/bin/Xorg (dixLookupPrivateAddr+0x44) [0x8088fb4]
9: /usr/bin/Xorg (0x8047000+0xd3a38) [0x811aa38]
10: /usr/bin/Xorg (0x8047000+0xd5290) [0x811c290]
11: /usr/bin/Xorg (miCreateAlphaPicture+0xdd) [0x81b6a1d]
12: /usr/bin/Xorg (miTrapezoids+0x17e) [0x81b6c7e]
13: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0xb7161000+0x3713b7)
[0xb74d23b7]
Segmentation fault at address 0x4000088

Fatal server error:
Caught signal 11 (Segmentation fault). Server aborting


Please consult the The X.Org Foundation support
at http://bodhi.fedoraproject.org/
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional
information.

[mi] EQ overflowing. The server is probably stuck in an infinite loop.

Backtrace:
0: /usr/bin/Xorg (xorg_backtrace+0x3c) [0x80e587c]
1: /usr/bin/Xorg (mieqEnqueue+0x1b7) [0x80e51a7]
2: /usr/bin/Xorg (xf86PostMotionEventP+0xd4) [0x80bf8a4]
3: /usr/lib/xorg/modules/input/evdev_drv.so (0xb75a9000+0x4602) [0xb75ad602]
4: /usr/lib/xorg/modules/input/evdev_drv.so (0xb75a9000+0x48f6) [0xb75ad8f6]
5: /usr/bin/Xorg (0x8047000+0x6b1f0) [0x80b21f0]
6: /usr/bin/Xorg (0x8047000+0x11ed24) [0x8165d24]
7: (vdso) (__kernel_sigreturn+0x0) [0xffffe400]
8: (vdso) (__kernel_vsyscall+0x10) [0xffffe424]
9: /lib/libc.so.6 (0x43020000+0xe9b83) [0x43109b83]
10: /lib/libc.so.6 (0x43020000+0x740d4) [0x430940d4]
11: /lib/libc.so.6 (0x43020000+0x70787) [0x43090787]
12: /usr/bin/Xorg (Xfree+0x22) [0x80a7452]
13: /usr/bin/Xorg (0x8047000+0x62b2a) [0x80a9b2a]
14: /usr/bin/Xorg (0x8047000+0x62bb2) [0x80a9bb2]
15: /usr/bin/Xorg (CloseWellKnownConnections+0x34) [0x80a3bf4]
16: /usr/bin/Xorg (0x8047000+0x66ce8) [0x80adce8]
17: /usr/bin/Xorg (0x8047000+0x6734e) [0x80ae34e]
18: /usr/bin/Xorg (0x8047000+0x5fbc0) [0x80a6bc0]
19: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
20: /lib/libc.so.6 (0x43020000+0x71511) [0x43091511]
21: /lib/libc.so.6 (0x43020000+0x73019) [0x43093019]
22: /lib/libc.so.6 (realloc+0xe0) [0x430932d0]
23: /usr/bin/Xorg (Xrealloc+0x34) [0x80a75a4]
24: /usr/bin/Xorg (dixAllocatePrivate+0x10d) [0x8088e8d]
25: /usr/bin/Xorg (dixLookupPrivateAddr+0x44) [0x8088fb4]
26: /usr/bin/Xorg (0x8047000+0xd3a38) [0x811aa38]
27: /usr/bin/Xorg (0x8047000+0xd5290) [0x811c290]
28: /usr/bin/Xorg (miCreateAlphaPicture+0xdd) [0x81b6a1d]
29: /usr/bin/Xorg (miTrapezoids+0x17e) [0x81b6c7e]
30: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0xb7161000+0x3713b7)
[0xb74d23b7]  
Comment 3 Matt Turner 2010-01-04 22:16:04 UTC
This appears to be fixed in commit 13c8bd3fde3b0831921e59f84936022a16379d63. I certainly cannot reproduce it after adding this patch.

3rd party confirmation would be excellent, before closing this bug.
Comment 4 Matt Turner 2010-02-05 12:43:52 UTC
Definitely _not_ fixed.

I just reproduced it without intending to. I'm using xserver from git from 1/27/2010.
Comment 5 Peter Hutterer 2010-02-06 00:46:09 UTC
Can you check if this is a dupe of bug 25640? the trigger sounds similar.
Comment 6 Matt Turner 2010-02-12 13:35:19 UTC
Yes, this appears to be fixed by the patch in bug 25640. Closing as a duplicate.

Thanks Peter!

*** This bug has been marked as a duplicate of bug 25640 ***

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.