unity-2d-launcher crashes under NX

Bug #730899 reported by Scott Moser
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Geis
Fix Released
Critical
Unassigned
unity-2d
Invalid
Critical
Olivier Tilloy
unity-2d (Ubuntu)
Invalid
High
Unassigned
Natty
Invalid
High
Unassigned
utouch-geis (Ubuntu)
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: unity-2d

When running under NX (freenx NX server), unity-2d-launcher crashes. The captured output is below:

Unity 2D Launcher: [WARNING] X Error: BadRequest (invalid request code or no such operation) 1
  Extension: 131 (XInputExtension)
  Minor opcode: 48 ()
  Resource id: 0x0
Unity 2D Launcher: [WARNING] X Error: BadRequest (invalid request code or no such operation) 1
  Extension: 131 (XInputExtension)
  Minor opcode: 48 ()
  Resource id: 0x76
Unity 2D Launcher: [DEBUG] Server doesn't support the Composite extension.

(unity-2d-launcher:18046): Wnck-CRITICAL **: wnck_set_client_type got called multiple times.

Unity 2D Launcher: [WARNING] QPainter::begin: Cannot paint on an image with the QImage::Format_Indexed8 format
Unity 2D Launcher: [WARNING] QPainter::setCompositionMode: Painter not active
Unity 2D Launcher: [WARNING] QPainter::end: Painter not active, aborted
Unity 2D Launcher: [WARNING] QPainter::begin: Cannot paint on an image with the QImage::Format_Indexed8 format
Unity 2D Launcher: [WARNING] QPainter::setCompositionMode: Painter not active
Unity 2D Launcher: [WARNING] QPainter::end: Painter not active, aborted
Unity 2D Launcher: [WARNING] file:///usr/share/unity-2d/launcher/AutoScrollingListView.qml:33: ReferenceError: Can't find variable: list
Unity 2D Launcher: [WARNING] file:///usr/share/unity-2d/launcher/AutoScrollingListView.qml:32: ReferenceError: Can't find variable: list
Unity 2D Launcher: [WARNING] file:///usr/share/unity-2d/launcher/AutoScrollingListView.qml:33: ReferenceError: Can't find variable: list
Unity 2D Launcher: [WARNING] file:///usr/share/unity-2d/launcher/AutoScrollingListView.qml:32: ReferenceError: Can't find variable: list
Unity 2D Launcher: [WARNING] unity-2d-launcher: Fatal IO error: client killed

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unity-2d-launcher 3.6.1-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-5.32-virtual 2.6.38-rc6
Uname: Linux 2.6.38-5-virtual i686
Architecture: i386
Date: Mon Mar 7 15:29:17 2011
Ec2AMI: ami-6e936107
Ec2AMIManifest: ubuntu-images-testing-us/ubuntu-natty-daily-i386-desktop-20110306.manifest.xml
Ec2AvailabilityZone: us-east-1c
Ec2InstanceType: m1.small
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: unity-2d
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

I just tested the 2d-unity ppa:
Just verified issue is still present with
$ apt-cache policy unity-2d
unity-2d:
  Installed: 3.6.2-0ubuntu1~bzr452
  Candidate: 3.6.2-0ubuntu1~bzr452
  Version table:
 *** 3.6.2-0ubuntu1~bzr452 0
        500 http://ppa.launchpad.net/unity-2d-team/unity-2d-daily/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
     3.6.1-0ubuntu2 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

The problem is still present. Also, note above in that "Server doesn't support the Composite extension."

Changed in unity-2d:
importance: Undecided → Critical
milestone: none → 3.10
Changed in unity-2d (Ubuntu):
importance: Undecided → High
Changed in unity-2d:
milestone: 3.10 → 3.8.2
Changed in unity-2d (Ubuntu):
status: New → Confirmed
Changed in unity-2d:
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Wapsi (miikka-veijonen) wrote :

Hi,

maybe this is a QT related problem, because every application based on QT (VLC, Dolphin etc...) I get those "[WARNING] X Error: BadRequest (invalid request code or no such operation) 1" error messages when I'm running them over NX.

 BTW. In "floating window" mode the windows decorations aren't drawn at all with QT applications (NoMachine's NX Linux Client).

BR,
Wapsi

Olivier Tilloy (osomon)
Changed in unity-2d:
status: New → In Progress
Revision history for this message
Olivier Tilloy (osomon) wrote :

It looks like the gesture handler that implements multitouch support is the culprit: commenting out its instantiation in launcher.cpp, I manage to get the launcher to run.

That doesn’t get us rid of the X errors, but that’s likely a separate (and less critical) issue.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The call that crashes is geis_init(…).
I can reproduce with the minimal test program attached, ruling out any Qt-related code.

Revision history for this message
Olivier Tilloy (osomon) wrote :

When activating the maximum debug level for geis (set the GEIS_DEBUG environment variable to 3), I get the following error:

GEIS(error)-_verify_xcb_version:163 failed to receive XCB gesture version reply.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I can also reproduce by simply running the following in a terminal:

    GEIS_DEBUG=3 geistest

(geistest is part of the package utouch-geis-tools)

Revision history for this message
Olivier Tilloy (osomon) wrote :

So it appears geis and NX don’t play well together. Whether that may be fixed in geis, I don’t really know, we’d need a geis developer to advise. In any case, we can probably patch unity-2d to conditionally activate touch support, based on e.g. the value of an environment variable, or whatever other mechanism is easiest to work with.

Changed in unity-2d:
status: In Progress → Triaged
Revision history for this message
Robbie Williamson (robbiew) wrote :

A patch would be good, as we'd and Edubuntu would really like to have this working before release.

Revision history for this message
Bill Filler (bfiller) wrote :

Can someone from the MT team have a look? Would be best to fix geis crash rather than patching unity-2d to work around it.

@robbie
If we did have to patch unity-2d would setting an ENV variable to disable touch be acceptable for you guys?

Revision history for this message
Chase Douglas (chasedouglas) wrote :

This is caused by the new XInput 2.1 prototype extension in natty, which is used by geis. Geis needs to check that the XInput 2.1 protocol is available and fail gracefully if not.

Changed in geis:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Dave Walker (davewalker) wrote :

@Bill, I think an ENV variable should work wonderfully, assuming that could be used with something like:
"GEIS=disable gnome-session"

affects: geis → utouch-geis
Changed in utouch-geis:
assignee: nobody → Stephen M. Webb (bregma)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Dave: You can simply add a "export GEIS=disable" in node.conf.
WebLive's config already exports:
export LTSP_CLIENT=""
export CUPS_SERVER=""
export PULSE_SERVER=""

So Pulse doesn't try to start, cups doesn't hang and some gnome feature are disabled (checks for LTSP_CLIENT in env).

Stephen M. Webb (bregma)
Changed in utouch-geis:
status: Triaged → In Progress
Stephen M. Webb (bregma)
Changed in utouch-geis:
milestone: none → 2.0.9
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package utouch-geis - 2.0.9-0ubuntu1

---------------
utouch-geis (2.0.9-0ubuntu1) natty; urgency=low

  * New upstream release.
  * Fixed (LP: #730899) crash on XI2.1 init failure.
 -- <email address hidden> (Stephen M. Webb) Tue, 05 Apr 2011 14:41:37 -0400

Changed in utouch-geis (Ubuntu Natty):
status: New → Fix Released
Stephen M. Webb (bregma)
Changed in utouch-geis:
status: In Progress → Fix Released
assignee: Stephen M. Webb (bregma) → nobody
Revision history for this message
Chase Douglas (chasedouglas) wrote :

We found a crashes in geis related to initialization in X. We believe it's the cause of the error, so we uploaded the fix for it to Ubuntu. Please test it out to see if it works any better.

Thanks!

Revision history for this message
Florian Boucault (fboucault) wrote :

Awesome work MT guys.

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Chase: it looks like this patch is not enough to fix the initialization error. After upgrading to utouch-geis 2.0.9-0ubuntu1 in the test instance provided by Scott Moser, I still get the same error when running geistest with GEIS_DEBUG=3:

    GEIS(error)-_verify_xcb_version:163 failed to receive XCB gesture version reply.

Revision history for this message
Dave Walker (davewalker) wrote :

Confirmed, Unity Dock still not showing. Thanks for the work so far on this!

Revision history for this message
Stephen M. Webb (bregma) wrote :

    GEIS(error)-_verify_xcb_version:163 failed to receive XCB gesture version reply.

If you do not have XI2.1 supported in your X server there is nothing you can do to get XI2.1 functionality. You will get an error status returned when trying to initialize the uTouch stack and you will need to handle that appropriately.

The bug fix prevents a segfault: we determined that was an inappropriate way to indicate the lack of functional availability.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Stephen, I just double-checked, and I still get a segmentation fault in geis_init(…). This is with utouch-geis 2.0.9-0ubuntu1.

Not having XI2.1 functionality is not a problem in this particular use case, but we need geis_init(…) to fail gracefully and return an error status code in order to handle it properly.

Revision history for this message
Stephen M. Webb (bregma) wrote :

I am unable to reproduce the crash with 2.0.9... could you capture a stacktrace and attach to this bug?

Revision history for this message
Olivier Tilloy (osomon) wrote :

So it appears what happens is not a big bad segfault, but the program exiting cleanly, before geis_init(…) has returned.

This is all the output I get:

GEIS(error)-_verify_xcb_version:163 failed to receive XCB gesture version reply.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":2000"
      after 6 requests (6 known processed) with 0 events remaining.

I’m trying to understand where in the stack of calls the program exits, and for this I’ve compiled libutouch-geis from source, but no luck at identifying the cause of the problem so far. I just realized that despite setting GEIS_DEBUG to 3, I’m not getting any debug messages printed out, only errors. I’ll see if I can understand how to really turn debug output on.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Geis requests the version of the X gesture extension. This errors out inside XCB when checking the length of the request. If I had to guess, I'd say the NX X server implementation has a bug that causes this failure. However, the NX X server doesn't have the gesture extension anyways, so I moved on to figure out what was crashing the application.

It turns out that when there's an error over the XCB connection, a call to XCloseDisplay will fire a fatal IO error. There's no sane way to deal with this because xcb_disconnect returns immediately without actually disconnecting if the connection has an error. The best we can do is check if there's an error on the XCB connection and leave the connection dangling instead of calling XCloseDisplay.

I have a merge request pending to do this. I've tested the changes out myself to confirm that unity-2d-launcher works over an NX session. I'm hoping we'll have a fix uploaded shortly.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

utouch-geis 2.0.10-0ubuntu1 has been uploaded with the fix for this issue.

Changed in unity-2d:
status: Triaged → Invalid
Changed in unity-2d (Ubuntu Natty):
status: Confirmed → Invalid
Revision history for this message
Olivier Tilloy (osomon) wrote :

Confirming that unity-2d-launcher now works over a NX session.
Great work, thanks a lot Chase!

Revision history for this message
Al. (bug-odesk) wrote :

Work, but always on top (no auto-hide or dodge). And maximized windows under launcher.

Revision history for this message
Olivier Tilloy (osomon) wrote :

@bUg.: when running under NX, could you please execute the following command and paste the output here?

    gconftool-2 -R /desktop/unity-2d

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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