onboard crashed with SIGSEGV in XkbGetNames()

Bug #526791 reported by hemant
110
This bug affects 20 people
Affects Status Importance Assigned to Milestone
virtkey
Fix Released
Undecided
Unassigned
onboard (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: onboard

When lucid lynx on macbook pro boots up, gnome-panel notifies of onboard failure.

ProblemType: Crash
Architecture: i386
Date: Tue Feb 23 17:30:23 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/bin/onboard
InterpreterPath: /usr/bin/python2.6
NonfreeKernelModules: nvidia wl
Package: onboard 0.93.0-0ubuntu3
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/onboard --size 500x180 -x 20 -y 10
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/false
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
SegvAnalysis:
 Segfault happened at: 0xecac1b <XkbGetNames+75>: mov 0x1c(%edi),%ecx
 PC (0x00ecac1b) ok
 source "0x1c(%edi)" (0x0000001c) not located in a known VMA region (needed readable region)!
 destination "%ecx" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: onboard
StacktraceTop:
 XkbGetNames () from /usr/lib/libX11.so.6
 getKbd () from /usr/lib/python2.6/dist-packages/virtkey.so
 ?? () from /usr/lib/python2.6/dist-packages/virtkey.so
 PyEval_EvalFrameEx ()
 PyEval_EvalCodeEx ()
Title: onboard crashed with SIGSEGV in XkbGetNames()
Uname: Linux 2.6.32-14-generic i686
UserGroups:

Revision history for this message
hemant (hemant-egroups) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 XkbGetNames (dpy=0x880d308, which=16383, xkb=0x0)
 getKbd (cvirt=0xb73fa260) at python-virtkey.c:170
 virtkey_new (self=0x0, args=0xb779702c)
 PyEval_EvalFrameEx (f=0x877100c, throwflag=0)
 PyEval_EvalCodeEx (co=0xb75a4188, globals=0xb73f3c64,

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in onboard (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
visibility: private → public
Revision history for this message
marmuta (marmuta) wrote :

The direct cause of the segfault appears to be a missing error exit in python-virtkey.c. I don't have launchpad access to virtkey, so I'll attach a tiny patch. However this doesn't fix the root cause, it only shifts the error from a SIGSEGV to a python backtrace:

Traceback (most recent call last):
  File "/usr/bin/onboard", line 15, in <module>
    ob = Onboard()
  File "/usr/lib/python2.6/dist-packages/Onboard/OnboardGtk.py", line 73, in __init__
    self.load_layout(config.layout_filename)
  File "/usr/lib/python2.6/dist-packages/Onboard/OnboardGtk.py", line 200, in load_layout
    self.keyboard = KeyboardSVG(filename)
  File "/usr/lib/python2.6/dist-packages/Onboard/KeyboardSVG.py", line 38, in __init__
    Keyboard.__init__(self)
  File "/usr/lib/python2.6/dist-packages/Onboard/Keyboard.py", line 44, in __init__
    self.vk = virtkey.virtkey()
virtkey.error: XkbGetKeyboard failed to get keyboard from x server

Revision history for this message
Chris Cheney (ccheney) wrote :

I think I see this issue also under VMware on a ThinkPad X200 while trying to work on bug 548891. At least very often the virtual keyboard will just briefly when I try to enable it instead of showing up and letting me use it.

marmuta (marmuta)
Changed in virtkey:
status: New → Fix Committed
Changed in onboard (Ubuntu):
status: New → Fix Committed
Revision history for this message
marmuta (marmuta) wrote :

I've pushed a workaround to onboard and virtkey trunks. Instead of crashing on a missing X keyboard, onboard now waits until one becomes available (if ever) and should generally react more dynamically to keyboard and keyboard layout changes. Bug 548891 for vmware users seems resolved, but the workaround should help reporters of temporary keyboard failures during native startup too.

tags: added: patch-accepted-upstream
Revision history for this message
NoBugs! (luke32j) wrote :

Fix released? I still sometimes get this crash report on up-to-date 10.04.
Do I need to manually install the patch?

Changed in python-virtkey:
status: Fix Committed → Fix Released
Changed in onboard (Ubuntu):
status: Fix Committed → Fix Released
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.