Bug 26332 - Xorg SIGSEGV when pressing multimedia key on x86_64
Summary: Xorg SIGSEGV when pressing multimedia key on x86_64
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-30 01:27 UTC by ybby
Modified: 2010-07-20 15:23 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.log (32.42 KB, application/x-trash)
2010-01-30 01:27 UTC, ybby
no flags Details
lshal output (175.26 KB, text/plain)
2010-01-30 01:27 UTC, ybby
no flags Details
kernel info (1.08 KB, text/plain)
2010-01-30 01:28 UTC, ybby
no flags Details
Xorg.log (32.42 KB, text/plain)
2010-01-30 02:17 UTC, ybby
no flags Details
gentoo compilation environment (4.11 KB, text/plain)
2010-01-30 02:25 UTC, ybby
no flags Details

Description ybby 2010-01-30 01:27:14 UTC
Created attachment 32919 [details]
Xorg.log

on a gentoo "amd64" system, i have the following version installed :

xorg-x11-7.4-r1
xorg-server-1.6.5-r1
xf86-input-evdev-2.3.1

when i press a multimedia key ( XF86Mail / XF86AudioPlay / etc. ) of my Dell USB Keyboard ( 413c:2010 ) , Xorg SIGSEGV with following backtrace :

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x26) [0x4ec5d6]
1: /usr/bin/X(xf86SigHandler+0x39) [0x497679]
2: /lib/libc.so.6 [0x7ff64a9c13a0]           
3: /usr/bin/X [0x45dca0]                     
4: /usr/bin/X(GetKeyboardValuatorEvents+0x362) [0x45e242]
5: /usr/bin/X(GetKeyboardEvents+0x17) [0x45e327]         
6: /usr/bin/X(xf86PostKeyboardEvent+0x6f) [0x474e5f]     
7: /usr/lib64/xorg/modules/input//evdev_drv.so [0x7ff63734a9bf]
8: /usr/bin/X [0x497765]                                       
9: /usr/bin/X [0x4707d9]                                       
10: /lib/libpthread.so.0 [0x7ff64ca72df0]                      
11: /lib/libc.so.6(__select+0x13) [0x7ff64aa58dd3]             
12: /usr/bin/X(WaitForSomething+0x1cb) [0x4ea19b]              
13: /usr/bin/X(Dispatch+0xa0) [0x44b3b0]                       
14: /usr/bin/X(main+0x3aa) [0x43155a]                          
15: /lib/libc.so.6(__libc_start_main+0xe6) [0x7ff64a9ada26]    
16: /usr/bin/X [0x4309f9]                                      

Fatal server error:
Caught signal 11.  Server aborting

i have spied on the strace output of the crash but it does not help me :
...
read(27, 0x110b080, 4096)               = -1 EAGAIN (Resource temporarily unavailable)
writev(27, [{"\1\1\213\342\0\0\0\0\31\0\340\2\0\0\0\0\300h\213\1\0\0\0\0\0\0\0\0\0\0\0\0", 32}], 1) = 32
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
select(256, [1 3 5 7 9 10 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46], NULL, NULL, {0, 67000}) = 13 (in [10 20 22 24 27 29 33 34 35 36 37 38 46], left {0, 66995})
setitimer(ITIMER_REAL, {it_interval={0, 20000}, it_value={0, 20000}}, NULL) = 0
read(27, "!\1\4\0\34\1\0\0@\0\n\1\0{\3\0!\1\4\0\34\1\0\0B\0\n\1\0\1\0\0"..., 4096) = 132
read(27, 0x110b080, 4096)               = -1 EAGAIN (Resource temporarily unavailable)
--- SIGIO (I/O possible) @ 0 (0) ---
select(46, [8 11 12 13 14 15 16 45], NULL, NULL, {0, 0}) = 1 (in [11], left {0, 0})
rt_sigprocmask(SIG_BLOCK, [IO], [IO], 8) = 0
read(11, "[\n^K\0\0\0\0<N\7\0\0\0\0\0\1\0r\0\1\0\0\0[\n^K\0\0\0\0"..., 384) = 96
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
rt_sigaction(SIGSEGV, {SIG_IGN, [SEGV], SA_RESTORER|SA_RESTART, 0x7fc74b6273a0}, {0x497640, [SEGV], SA_RESTORER|SA_RESTART, 0x7fc74b6273a0}, 8) = 0
write(2, "\nBacktrace:\n", 12)          = 12
write(0, "\nBacktrace:\n", 12)          = 12
...
let me know if more could help.

i have tried lots of things with evdev fdi files and xorg.conf, but i have found no solution on the ".conf" side.
i believe the issue could be 64bit related because it also occurs with a livecd of sabayon for x86_64 (Sabayon_Linux_5.1-r1_amd64_K.iso) whereas it does not occur with the x86 edition (Sabayon_Linux_5.1-r1_x86_K.iso)
i'm able to recompile anything as long as it is the same versions as the current gentoo ebuilds, i'd be glad to help by testing a patch or provide more specific traces if needed.
Comment 1 ybby 2010-01-30 01:27:42 UTC
Created attachment 32920 [details]
lshal output
Comment 2 ybby 2010-01-30 01:28:13 UTC
Created attachment 32921 [details]
kernel info
Comment 3 ybby 2010-01-30 02:17:43 UTC
Created attachment 32923 [details]
Xorg.log
Comment 4 ybby 2010-01-30 02:25:34 UTC
Created attachment 32924 [details]
gentoo compilation environment
Comment 5 ybby 2010-01-31 10:26:10 UTC
a workaround has been found, i had to reintoduce xorg.conf, an input section with driver kbd, and the following flags :

Section "ServerFlags"
Option "AutoAddDevices" "off"
Option "AutoEnableDevices" "off"
Option "AllowEmptyInput" "off"
EndSection

then i had to reintoduce an xmodmaprc, as in the old days:

keycode 234 = XF86Back
keycode 233 = XF86Forward
keycode 232 = XF86Stop
keycode 231 = XF86Refresh
keycode 130 = XF86HomePage
keycode 236 = XF86Mail
keycode 198 = XF86MyComputer
keycode 161 = XF86Calculator
keycode 160 = XF86AudioMute
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 162 = XF86AudioPlay
keycode 129 = XF86AudioMedia
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 178 = XF86HomePage
Comment 6 Paul Vint 2010-03-01 08:01:58 UTC
I have the precise same issue (with the same keyboard)
Versions are the same, updated xf86-input-evdev to 2.3.2 with no change.

The above workaround stops the crash and enables the multimedia keys to work.
Comment 7 tazinblack 2010-04-12 23:03:17 UTC
same problem here on gentoo on amd64 with dell sk-8135 keyboard 413c:2010.

I tried to upgrade to x11-drivers/xf86-input-evdev ~2.4.0 but this does not help.
Comment 8 Peter Hutterer 2010-04-15 23:44:48 UTC
do you have a second machine? If so, please ssh in, attach gdb to the server and print out the full backtrace when the crash happens. Something is weird here, I wonder if we're smashing the stack or so.
Comment 9 Peter Hutterer 2010-04-21 21:57:56 UTC
(In reply to comment #8)
> do you have a second machine? If so, please ssh in, attach gdb to the server
> and print out the full backtrace when the crash happens. Something is weird
> here, I wonder if we're smashing the stack or so.

ping?

what's the output of eu-addr2line -e /usr/bin/Xorg  0x45e242 (and the other addresses where it crashes? note that if you recompiled since, the addresses will have changed from the log file here.
Comment 10 ybby 2010-07-20 13:18:28 UTC
sorry for late ping reply, but i'm not really a dev. and i had no time lately to learn about gdb and elfutils :-) 
however, i just installed these tools and learned to use them thanks to the xorg wiki, but an upgrade have raised the versions , now i have:

x11-drivers/xf86-input-evdev-2.3.2
x11-base/xorg-server-1.7.6

i have reverted back the above workaround, and i can not reproduce the crash. i assume this issue can be closed. is it possible to close this bug with a mention of the commit that may have fixed that ?  

thanks a lot for your attention, 

Regards,

Y.
Comment 11 Peter Hutterer 2010-07-20 15:23:06 UTC
sorry, but you saw the problem with 1.6 and it seems gone with 1.7. That cycle had the whole of the MPX work merged in and a more-or-less rewritten input subsystem with several hundred commits. It'll be rather hard narrowing down the single commit that broke it.

closing this bug for now, please reopen if you encounter it again.


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.