Wacom + GTK + old configuration causes Xorg to segfault with error 4 under Kubuntu Jaunty

Bug #359133 reported by Chris Drost
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wacom-tools (Ubuntu)
Triaged
High
Timo Aaltonen

Bug Description

Binary package hint: xorg

In the latest aptitude full-upgrade I did (running Kubuntu Jaunty) there were a couple of packages that said they were "recommended but would not be installed." -- I more or less shrugged these off, but I forgot to write them down.

After the computer rebooted, a whole mess of things happened: the biggest one is that now, whenever I start any GTK-based app, (tested with GIMP, Firefox, and CellWriter) X segfaults.

Since the bug is trivially reproducable, I've recorded the /var/log/syslog messages on four separate occasions after deliberately triggering this bug. They all have these lines in common:

Xorg[*****]: segfault at d0 ip 0000000000496786 sp 00007fff*******0 error 4 in Xorg[400000+1c3000]
[drm:gm45_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
kdm[****]: X server for display :0 terminated unexpectedly

I have also seen these three lines erratically appear; they suggestively implicate Qt 4.5, but it may be that Qt is just noticing the X segfault:

python[17124]: segfault at 30 ip 00007fc440976bb5 sp 00007fff4a0e38f8 error 4 in libQtCore.so.4.5.0[7fc440807000+240000]
ksmserver[17070]: segfault at 8 ip 00007f2045afbe2b sp 00007f203b28f648 error 4 in libQtDBus.so.4.5.0[7f2045ab7000+74000]
ksmserver[19042]: segfault at 8 ip 00007f4c24ecde2b sp 00007f4c1a661648 error 4 in libQtDBus.so.4.5.0[7f4c24e89000+74000]

There is also a backtrace recorded in /var/logs/Xorg.0.log.old file, which looks like this:

0: /usr/bin/X(xorg_backtrace+0x26) [0x4f1b66]
1: /usr/bin/X(xf86SigHandler+0x41) [0x485a61]
2: /lib/libc.so.6 [0x7f2d63995040]
3: /usr/lib/xorg/modules/input//wacom_drv.so [0x7f2d61795035]
4: /usr/bin/X(ActivateDevice+0x3e) [0x447a8e]
5: /usr/bin/X(OpenInputDevice+0x10) [0x4968e0]
6: /usr/bin/X(ProcXOpenDevice+0xa3) [0x545823]
7: /usr/bin/X(Dispatch+0x364) [0x44e304]
8: /usr/bin/X(main+0x3bd) [0x433d8d]
9: /lib/libc.so.6(__libc_start_main+0xe6) [0x7f2d639805a6]
10: /usr/bin/X [0x433219]
Saw signal 11. Server aborting.

An upcoming comment will discuss this more in-depth.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xorg 1:7.4~5ubuntu18
ProcEnviron:
 LANGUAGE=
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@crested) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #41-Ubuntu SMP Wed Apr 8 04:39:23 UTC 2009
SourcePackage: xorg
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Chris Drost (chris-drostie) wrote :
description: updated
summary: - GTK apps cause Xorg to segfault with error 4 under Kubuntu Jaunty
+ Wacom + GTK + old configuration causes Xorg to segfault with error 4
+ under Kubuntu Jaunty
Revision history for this message
Chris Drost (chris-drostie) wrote :

I don't see a way to refile this post under a different project, but it probably belongs under xserver-xorg and possibly under xserver-xorg-input-wacom.

I've resolved my personal issue to my own satisfaction, although I'm not sure that xorg should segfault on this particular issue. The key to the puzzle came with a more extensive problem description in apport, which I tried to submit but didn't succeed. In any case, part of the apport response discussed that it was trying to remove the Wacom device. That convinced me that Qt, which I was previously staring very hard at, was not the problem and that I should check on the Wacom settings in my xorg.conf file.

When those were removed, two things happened: (1) GTK programs did indeed start again; (2) my tablet input device still worked, as if by magic. (It didn't before I put those lines there!)

So, to place the bug more narrowly: there were some recent patches in xserver-xorg-input-wacom. I believe that one of these patches automatically configures the tablet device for you -- a process that previously had to be done manually in xorg.conf. If the xorg.conf file specifies a manual configuration, apparently everything goes smooth for most applications, but GTK for some reason tries to remove the device and/or create a new one -- the details aren't clear to me. When the device gets removed and then recreated, Xorg apparently gets confused and segfaults.

I have the feeling that not all of that is right, but in any case: something weird is happening that probably shouldn't be happening, even though the userbase it affects is probably a fringe case.

Revision history for this message
Bryce Harrington (bryce) wrote :

Nice sleuthing! Yes, sounds like it's a bug by the wacom-tools update, which occurred just recently.

Sounds like the update procedure ought to force commenting out any existing wacom entries in xorg.conf. Assigning to timo to look into.

affects: xorg (Ubuntu) → wacom-tools (Ubuntu)
Changed in wacom-tools (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-9.04
Revision history for this message
Julius Bloch (jbloch) wrote :

Hi,
I don't know if it is the same bug. But I have a ibm thinkpad x41 tablet where I got the same error.
But I can't start X.
dmesg shows this if I try to start X:
[ 102.124027] Xorg[3880]: segfault at 10 ip 080d8832 sp bff47a70 error 4 in Xorg[8048000+19d000]
[ 102.300148] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
[ 106.825618] [drm:i915_setparam] *ERROR* unknown parameter 4
[ 106.825644] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 107.742091] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 111.760533] Xorg[3912]: segfault at 10 ip 080d8832 sp bfdd6900 error 4 in Xorg[8048000+19d000]
[ 111.936152] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
[ 346.907953] [drm:i915_setparam] *ERROR* unknown parameter 4
[ 346.908488] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 347.910566] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 352.548593] Xorg[4042]: segfault at 10 ip 080d8832 sp bfc2cf50 error 4 in Xorg[8048000+19d000]
[ 352.724143] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
[ 355.619586] [drm:i915_setparam] *ERROR* unknown parameter 4
[ 355.619637] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 356.652732] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 361.231635] Xorg[4074]: segfault at 10 ip 080d8832 sp bff31260 error 4 in Xorg[8048000+19d000]
[ 361.564107] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
[ 364.316599] [drm:i915_setparam] *ERROR* unknown parameter 4
[ 364.316650] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 365.319237] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 370.624554] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0

Revision history for this message
Jasper Mattsson (jasper-mattsson) wrote :

I'm seeing this issue with Wine programs requiring tablet. i386, X41Tablet too.

Also, Intel video driver crashes X, sometimes GDM comes back and reboot is not required, sometimes I can't even get to the virtual console.

I'm using Xorg.conf for Wacom, since the autodetected wacom doesn't support rotating the tablet.

Xorg log most relevant parts:

BEGIN xf86WcmProc dev=0x92c1788 priv=0x92eef50 type=eraser((null)) flags=97 fd=153813100 what=INIT
xf86WcmDevOpen

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x3b) [0x813518b]
1: /usr/bin/X(xf86SigHandler+0x55) [0x80c7be5]
2: [0xb7f04400]
3: /usr/lib/xorg/modules/input//wacom_drv.so [0xb77719c2]
4: /usr/bin/X(ActivateDevice+0x4f) [0x808662f]
5: /usr/bin/X(OpenInputDevice+0x24) [0x80d89a4]
6: /usr/bin/X(ProcXOpenDevice+0xaa) [0x818bf8a]
7: /usr/bin/X [0x8187713]
8: /usr/bin/X(Dispatch+0x33f) [0x808d57f]
9: /usr/bin/X(main+0x3bd) [0x80722ed]
10: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7ad8775]
11: /usr/bin/X [0x80717a1]
Saw signal 11. Server aborting.
(II) UnloadModule: "wacom"
(II) UnloadModule: "wacom"
(II) UnloadModule: "wacom"

Xorg.conf relevant parts:

Section "InputDevice"
 Driver "wacom"
 Identifier "stylus"
 Option "Device" "/dev/input/wacom"
 Option "Type" "stylus"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "ServerLayout"
...
#Uncomment if you have a wacom tablet
 InputDevice "stylus" "SendCoreEvents"
 InputDevice "cursor" "SendCoreEvents"
 InputDevice "eraser" "SendCoreEvents"
EndSection

Revision history for this message
Chris Drost (chris-drostie) wrote :

Jasper: did you already try the fix from bug # 358643 ? It's important if we find out that this fix isn't universal, and you didn't say anything about it.

Just to recap that fix here, Timo Aaltonen has a personal package archive with patched .deb packages of xserver-xorg-core, which are available at this URL:

http://ppa.launchpad.net/tjaalton/ppa/ubuntu/pool/main/x/xorg-server/

For at least two of us, telling dpkg to install that .deb over our current version of xserver-xorg-core has fixed this bug.

Revision history for this message
Jasper Mattsson (jasper-mattsson) wrote :

Chris: I tried it now, it works, thank you for your reply.

Because the bug symptoms in that report weren't similar, I thought it wasn't really a duplicate of this bug. Apparently the solution is the same, so it is a dup after all.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.