Bug 150245

Summary: setxkbmap crashes
Product: [openSUSE] SUSE Linux 10.1 Reporter: Vinay Khaitan <vkhaitan>
Component: X11 ApplicationsAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED FIXED QA Contact: Stefan Dirsch <sndirsch>
Severity: Major    
Priority: P5 - None    
Version: Beta 3   
Target Milestone: ---   
Hardware: 32bit   
OS: Linux   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Vinay Khaitan 2006-02-12 17:50:02 UTC
This is the backtrace......

vkhaitan@shree:~> setxkbmap
Couldn't interpret _XKB_RULES_NAMES property
Use defaults: rules - 'xorg' model - 'pc101' layout - 'us'
*** glibc detected *** setxkbmap: free(): invalid pointer: 0xb7fc84f0 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7dc9901]
/lib/libc.so.6(__libc_free+0x84)[0xb7dcaf74]
/usr/X11R6/lib/libX11.so.6(XFree+0x1d)[0xb7eb946d]
setxkbmap[0x804a343]
setxkbmap[0x804aafb]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb7d7b81c]
setxkbmap[0x8048bb1]
======= Memory map: ========
08048000-0804c000 r-xp 00000000 03:03 53653      /usr/X11R6/bin/setxkbmap
0804c000-0804d000 rw-p 00003000 03:03 53653      /usr/X11R6/bin/setxkbmap
0804d000-0806e000 rw-p 0804d000 00:00 0          [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7d61000-b7d62000 rw-p b7d61000 00:00 0
b7d62000-b7d64000 r-xp 00000000 03:03 10729      /lib/libdl-2.3.90.so
b7d64000-b7d66000 rw-p 00001000 03:03 10729      /lib/libdl-2.3.90.so
b7d66000-b7e7f000 r-xp 00000000 03:03 10723      /lib/libc-2.3.90.so
b7e7f000-b7e81000 r--p 00118000 03:03 10723      /lib/libc-2.3.90.so
b7e81000-b7e83000 rw-p 0011a000 03:03 10723      /lib/libc-2.3.90.so
b7e83000-b7e86000 rw-p b7e83000 00:00 0
b7e86000-b7f7a000 r-xp 00000000 03:03 17583      /usr/X11R6/lib/libX11.so.6.2
b7f7a000-b7f7d000 rw-p 000f3000 03:03 17583      /usr/X11R6/lib/libX11.so.6.2
b7f7d000-b7f9d000 r-xp 00000000 03:03 17659      /usr/X11R6/lib/libxkbfile.so.1.0
b7f9d000-b7f9e000 rw-p 0001f000 03:03 17659      /usr/X11R6/lib/libxkbfile.so.1.0
b7f9e000-b7f9f000 rw-p b7f9e000 00:00 0
b7faa000-b7fb4000 r-xp 00000000 03:03 10782      /lib/libgcc_s.so.1
b7fb4000-b7fb5000 rw-p 00009000 03:03 10782      /lib/libgcc_s.so.1
b7fb5000-b7fb6000 rw-p b7fb5000 00:00 0
b7fb6000-b7fd0000 r-xp 00000000 03:03 10716      /lib/ld-2.3.90.so
b7fd0000-b7fd2000 rw-p 00019000 03:03 10716      /lib/ld-2.3.90.so
bfd23000-bfd38000 rw-p bfd23000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]
Aborted

CTRL+ALT+F1 etc too are not working to go to VT1 and others. Perhaps that is related to this problem ?
Comment 1 Vinay Khaitan 2006-02-13 08:27:57 UTC
Well, I got the solution. The XKB maps were not loaded actually.
The reason behind not loading that xorgconfig/xf86config actually writes that
Option "XkbRules"   "xorg"

Whereas xorg and xorg.xml files are not symlinked to base and base.lst unlike to xfree86 and xfree86.xml .
Hence it is not loaded. When changed to "xfree86" , it works fine.

So the solution is that, change xorgconfig to write only xfree86 instead of xorg.
OR, symlink the needed files!

Still, one bug is there, why does it segfault? Segfault is alwaya a bug despite of whatever is the condition. Hence, I leave this bug open.

Comment 2 Stefan Dirsch 2006-02-13 09:38:26 UTC
I've added the missing xorg rules sysmlinks. I could not reproduce the segfault. I don't even know, what a setxkmap command without any options should do.
Comment 3 Vinay Khaitan 2006-02-13 10:48:12 UTC
(In reply to comment #2)
> I've added the missing xorg rules sysmlinks. I could not reproduce the
> segfault. I don't even know, what a setxkmap command without any options should
> do.

The point to reproduce the segfault is that, try not to set xkbrules corectly, so that output of 
xprop -root | grep XKB
doesn't show _XKB_RULES_NAMES(STRING) .
Then try to setxkbmap argument_whatever_you_know .