evince and eog broken on remote sessions (X, NX, x2go and VNC)

Bug #997630 reported by Emanuele Rocca on 2012-05-10
170
This bug affects 30 people
Affects Status Importance Assigned to Milestone
Geis
High
Stephen M. Webb
evince (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
geis (Ubuntu)
High
Stephen M. Webb
Precise
High
Stephen M. Webb

Bug Description

libgrip has some troubles when accessing a Ubuntu 12.04 desktop via x2go, which uses libnx-x11.

The applications (evince and eog) start up very slowly. It takes about 50 seconds to open a 900k pdf document.

The following output makes me think that the problem is libgrip-related. A way to avoid the issue is running evince in preview mode (-w).

$ evince

(evince:15833): GRIP-WARNING **: failed to determine device types

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

(evince:15833): GRIP-WARNING **: Failed to initialize gesture manager.

$ lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

$ apt-cache policy libgrip0
libgrip0:
  Installed: 0.3.4-0ubuntu1

$ apt-cache policy evince
evince:
  Installed: 3.4.0-0ubuntu1

$ apt-cache policy eog
eog:
  Installed: 3.4.1-0ubuntu1

$ apt-cache policy libnx-x11
libnx-x11:
  Installed: 2:3.5.0.12-0~234~oneiric1
  Candidate: 2:3.5.0.12-0~234~oneiric1
  Version table:
 *** 2:3.5.0.12-0~234~oneiric1 0
        500 http://ppa.launchpad.net/x2go/stable/ubuntu/ oneiric/main amd64 Packages

Chase Douglas (chasedouglas) wrote :

I doubt the hanging is due to libgrip or utouch in general. utouch-geis should notice that there is not an XInput 2.2 capable server and immediately stop initialization. Please try running evince under gdb to see if it really is hung up in utouch while starting up. Until then, I'm moving this to the evince package.

affects: libgrip (Ubuntu) → evince (Ubuntu)
Changed in evince (Ubuntu):
status: New → Incomplete
Eugene San (eugenesan) wrote :

Looks like evince got stuck in libgrip/libutouch-geis
Attached gdb trace

Changed in evince (Ubuntu):
status: Incomplete → Confirmed
summary: - Breaks evince and eog via NX/x2go
+ Breaks evince and eog on remote sessions (X / NX / x2go)
Eugene San (eugenesan) on 2012-05-14
summary: - Breaks evince and eog on remote sessions (X / NX / x2go)
+ Breaks evince and eog on remote sessions (X, NX, x2go and probably VNC)
summary: - Breaks evince and eog on remote sessions (X, NX, x2go and probably VNC)
+ [precise] evince and eog broken on remote sessions (X, NX, x2go and
+ probably VNC)

Impacts sessions running over Real VNC too.

summary: - [precise] evince and eog broken on remote sessions (X, NX, x2go and
- probably VNC)
+ [precise] evince and eog broken on remote sessions (X, NX, x2go and VNC)
no longer affects: utouch
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

affects: libgrip (Ubuntu) → utouch-geis (Ubuntu)
Changed in utouch-geis (Ubuntu):
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

closing the evince part but keeping it so users who ran into the issue can maybe find this report, the issue seems to be an utouch-geis one

Changed in evince (Ubuntu):
status: Confirmed → Invalid
summary: - [precise] evince and eog broken on remote sessions (X, NX, x2go and VNC)
+ evince and eog broken on remote sessions (X, NX, x2go and VNC)
Changed in utouch-geis (Ubuntu):
importance: Undecided → High
affects: libgrip → utouch-geis
Changed in utouch-geis:
importance: Undecided → High

I've found that downgrading to libutouch-geis (2.1.2-0ubuntu4) from oneiric resolves the issue.

$ wget http://mirror.anl.gov/pub/ubuntu//pool/main/u/utouch-geis/libutouch-geis1_2.1.2-0ubuntu4_amd64.deb
$ sudo dpkg -i libutouch-geis1_2.1.2-0ubuntu4_amd64.deb
$ echo "libutouch-geis1 hold" | sudo dpkg --set-selections

Stephen M. Webb (bregma) on 2012-05-22
Changed in utouch-geis:
status: New → In Progress
assignee: nobody → Stephen M. Webb (bregma)
Changed in utouch-geis (Ubuntu):
status: New → In Progress
assignee: nobody → Stephen M. Webb (bregma)
Changed in utouch-geis (Ubuntu Precise):
importance: Undecided → High
Changed in evince (Ubuntu Precise):
status: New → Invalid
Changed in utouch-geis (Ubuntu Precise):
status: New → Triaged
Stephen M. Webb (bregma) on 2012-05-25
Changed in utouch-geis (Ubuntu Precise):
status: Triaged → In Progress
assignee: nobody → Stephen M. Webb (bregma)
Stephen M. Webb (bregma) on 2012-05-25
Changed in utouch-geis:
status: In Progress → Fix Committed

FYI: Just built utouch-geis1 (2.2.9-0ubuntu4) from lp:utouch-geis/precise and the issue was _not_ resolved. Still took ~50 seconds for evince to load, compared to under a second with libutouch-geis1 (2.1.2-0ubuntu4) from Oneiric.

$ apt-cache policy libutouch-geis1
libutouch-geis1:
  Installed: 2.2.9-0ubuntu4
  Candidate: 2.2.9-0ubuntu4
  Version table:
 *** 2.2.9-0ubuntu4 0
        100 /var/lib/dpkg/status
     2.2.9-0ubuntu3 0
        900 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     2.2.9-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

On 05/25/2012 03:32 PM, Bradley M. Froehle wrote:
> FYI: Just built utouch-geis1 (2.2.9-0ubuntu4) from lp:utouch-
> geis/precise and the issue was _not_ resolved. Still took ~50 seconds
> for evince to load, compared to under a second with libutouch-geis1
> (2.1.2-0ubuntu4) from Oneiric.

Yes, the patch is missing the key line that fixes the problem, I'm reverting it right now.

--
Stephen M. Webb <email address hidden>

If it helps, I'm attaching the result of starting evince with Geis debugging enabled on precise over RealVNC.

$ echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-PF6Hw1bX2X,guid=152cbe68c696d8366474511f00208d95
$ GEIS_DEBUG=10 evince &> geis-debug-evince.log

Clint Byrum (clint-fewbar) wrote :

Hello! Can you please make sure this bug has Test Case and Regression Potential, per the procedure outlined here:

https://wiki.ubuntu.com/StableReleaseUpdates

Otherwise it will be difficult to verify the fix. I will leave the upload in the upload queue for now.

Thanks!

Stephen M. Webb (bregma) wrote :

I have deferred creating an SRU since new information came to light after uploading to the queue. I will continue the SRU process after additional investigation.

Chris Halse Rogers (raof) wrote :

I've rejected the existing SRU from the precise-proposed queue based on your previous comment; please feel free to upload again after you've finished investigating.

Stephen M. Webb (bregma) on 2012-06-05
Changed in utouch-geis:
milestone: none → utouch-geis-2.2.10
Stephen M. Webb (bregma) on 2012-06-05
Changed in utouch-geis:
status: Fix Committed → Fix Released
assignee: Stephen M. Webb (bregma) → nobody

This bug should be re-opened, as the fix merged in https://code.launchpad.net/~bregma/utouch-geis/lp-997630/+merge/106886 does not actually address the issue. In particular, the assumption that the DBUS_SESSION_BUS_ADDRESS is unset is inaccurate, as show in comment #9.

Changed in utouch-geis:
status: Fix Released → In Progress
Launchpad Janitor (janitor) wrote :

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

---------------
utouch-geis (2.2.10-0ubuntu1) quantal-proposed; urgency=low

  * New upstream release v2.2.10.
    - fixes pinch radius and drag delta calculations (lp: #985916) (lp: #986215)
    - changes type of geisSubscriptionFlags (lp: #813819)
    - changes direct devices to use window coordinates (lp: #984069)
    - reports device axis extents, if available (lp: #987539)
    - removes overlapping events when a gesture is accepted (lp: #1001365)
    - avoids trying to start a DBus session if there is none already
      (lp: #997630)
    - removes XCB back end
    - adds GEIS_EVENT_ATTRIBUTE_CONSTRUCTION_FINISHED event
    - adds a compile-time sentinel check to variadic calls in the API
 -- <email address hidden> (Stephen M. Webb) Wed, 06 Jun 2012 09:51:23 -0400

Changed in utouch-geis (Ubuntu):
status: In Progress → Fix Released
Stephen M. Webb (bregma) wrote :

Note that this bug is still not considered completely fixed in Ubuntu 12.04 (precise pangolin).

Changed in utouch-geis:
milestone: utouch-geis-2.2.10 → none
Changed in utouch-geis (Ubuntu):
status: Fix Released → In Progress
Peter Bennett (pgbennett) wrote :

Ubuntu 12.04.
I am having similar problems with evince when logging in remotely using xrdp. Opening any file with evince shows a blank window and the blank window takes a long time to close (a couple of minutes). It also displays the messages
(evince:18278): GRIP-WARNING **: failed to determine device types
(evince:18278): GRIP-WARNING **: Failed to initialize gesture manager.
Running evince with the -w option works. How do I set up Ubuntu so that opening a file from nautilus uses the -w option?

Joachim Schwender (jschwender) wrote :

I have purged utouch* and the problem still persists.

affects: utouch-geis (Ubuntu) → geis (Ubuntu)

@ferro: Yes, but I bet you still have libutouch-geis installed. (libevince depends on libgrip0 which depends on libutouch-geis).

@chasedouglas & @bregma:

I've looked into this problem some more and the fix should be relatively trivial. I'll attempt to briefly describe the cause of the error, outline a simple solution, and will attach a patch that can be applied to the utouch-geis 2.2.10 source which fixes the problem for me.

The cause of the delay is that `_geis_wait_for_init` attempts to wait a full 5 seconds (GEIS_DEFAULT_INIT_TIMEOUT) or until the Geis backend is initialized. In the event of a failure, i.e., when no backend can be initialized, the 5 second waiting period is still observed. To fix this bug, we need only signal the failure of the initialization process so we can abort from `_geis_wait_for_init` immediately.

To do so, I propose the following changes:
1) Add a new GeisState, GEIS_STATE_ERROR
2) Set geis->state to GEIS_STATE_ERROR whenever no backend can be initialized and we are out of fallbacks.
3) Check for geis->state == GEIS_STATE_ERROR in _geis_wait_for_init and abort.

I should additionally mention that the logic in the above patch might not be flawless --- i.e., the addition of the else clause in _input_event_handler might be a bit off -- but the overall theme of the patch should point you in the correct direction.

Stephen M. Webb (bregma) on 2012-08-06
Changed in geis:
assignee: nobody → Stephen M. Webb (bregma)

The attachment "libutouch-geis-state-error.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in geis:
status: In Progress → Fix Committed
alpianon (alberto-pianon) wrote :

Patch do not apply to the source for armel architecture.
The code of geis.c is slightly different, but I am not a programmer so I do not know how to fix it
I attach the file that I get with "apt-get source libutouch-geis1"

alpianon (alberto-pianon) wrote :

@chasedouglas: Thanks! I've backported the change to utouch-geis 2.2.9 and successfully built and tested the patch in a PPA. https://launchpad.net/~brad-froehle/+archive/utouch-geis

I've attached the debdiff from 2.2.9-0ubuntu3 to 2.2.9-0ubuntu3+lp997630.

Changed in geis:
milestone: none → 2.2.12
Changed in geis:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package geis - 2.2.12-0ubuntu1

---------------
geis (2.2.12-0ubuntu1) quantal; urgency=low

  * New upstream release.
    - Fully fix initialization timeout for remote sessions (LP: #997630)
 -- Chase Douglas <email address hidden> Wed, 15 Aug 2012 08:10:42 -0700

Changed in geis (Ubuntu):
status: In Progress → Fix Released
Sebastien Bacher (seb128) wrote :

Thanks Chase, do you guys plan to SRU that fix as well?

Chase Douglas (chasedouglas) wrote :

Hi Seb,

Yes, an SRU is in progress. It will hopefully be uploaded shortly after the precise-proposed freeze is lifted.

Hello Emanuele, or anyone else affected,

Accepted geis into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/geis/2.2.9.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in geis (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed

My issue was solved after upgrading to the new libgrip0 (and hence libgeis1, libgrail5, libframe6) from precise-proposed.

Thanks!

$ apt-cache policy libgrip0
libgrip0:
  Installed: 0.3.5-0ubuntu1~12.04.1
  Candidate: 0.3.5-0ubuntu1~12.04.1
  Version table:
 *** 0.3.5-0ubuntu1~12.04.1 0
        400 http://us.archive.ubuntu.com/ubuntu/ precise-proposed/main amd64 Packages

tags: added: verification-done
removed: verification-needed
Emanuele Rocca (ema) wrote :

I can also confirm that the proposed update fixes this bug.

To verify the fix I've started an EC2 instance with the official precise AMI, installed ubuntu-desktop and the relevant x2go packages. The bug was reproducible. After installing libgrip0 and its dependencies from precise-proposed the bug was not reproducible anymore.

Thanks,
  Emanuele

Adam Conrad (adconrad) wrote :

Hello Emanuele, or anyone else affected,

Accepted geis into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/geis/2.2.9.2-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed

I've installed libgeis1 2.2.9.2-0ubuntu1 and can confirm that the proposed update does fix this bug (the slow startup of evince when the backend fails to initialize).

I don't run Unity, so I cannot comment on whether this version solves that particular regression.

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package geis - 2.2.9.2-0ubuntu1

---------------
geis (2.2.9.2-0ubuntu1) precise-proposed; urgency=low

  * New upstream release. Only change is the following bug fix:
    - Fixes regression that caused GEISv1 clients, such as Unity, to not work
      (LP: #1047596)

geis (2.2.9.1-0ubuntu1) precise-proposed; urgency=low

  * Update debian/watch file for new project name
  * New upstream release.
    - removes XCB back end
    - removes overlapping events when a gesture is accepted (lp: #1001365)
    - fix for excessive timeout on backend init failure (lp: #997630)
    - detect added devices properly (LP: #1009270)
    - fix crash when accepting a gesture (LP: #1015775)
    - fix result value of geis_subscription_deactivate() (LP: #1021448)
    - upstream project renamed to just 'geis'
  * Update packaging for project rename (LP: #1037621)
    - Added Conflicts and Replaces clauses for libgeis-dev, libgeis-doc,
      python-geis and geis-tools
  * Remove patches that have been integrated into upstream
    - remove lp813819-typedef-geis-subscription-flags.patch
    - remove lp985986-fix-touch-delta-calculation.patch
    - remove lp986215-calculate-pinch-delta-as-ratio.patch
    - remove lp987539-add-device-axis-attributes.patch
    - remove lp997630-avoid-starting-dbus-session-on-remote-connection.patch
    - remove fix-touch-coordinate-space.patch (patch for lp984069)
 -- Chase Douglas <email address hidden> Fri, 07 Sep 2012 14:11:40 -0700

Changed in geis (Ubuntu Precise):
status: Fix Committed → Fix Released
David Dombrowsky (davek) wrote :

I wish I could confirm this one, but I still get the error:

 $ evince
(evince:6073): GRIP-WARNING **: failed to determine device types
(evince:6073): GRIP-WARNING **: Failed to initialize gesture manager.
(evince:6073): GRIP-WARNING **: Failed to initialize gesture manager.
[evince opens about 10 seconds later

libgeis1 is 2.2.9.2

 $ dpkg -s libgeis1
Package: libgeis1
Status: install ok installed
Multi-Arch: same
Priority: extra
Section: libs
Installed-Size: 196
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Source: geis
Version: 2.2.9.2-0ubuntu1
Depends: libgrail5 (>= 3.0.6), libc6 (>= 2.15), libdbus-1-3 (>= 1.1.1), libframe6 (>= 2.2.4), libx11-6 (>= 2:1.2.99.901), libxext6, libxi6 (>= 2:1.5.99.2)
Pre-Depends: multiarch-support
Description: Gesture engine interface support
 A common API for clients of a systemwide gesture recognition and propagation
 engine.
Homepage: https://launchpad.net/geis

@davek: What does `apt-cache policy libgrip0` return?

David Dombrowsky (davek) wrote :

 $ apt-cache policy libgrip0
libgrip0:
  Installed: 0.3.5-0ubuntu1~12.04.1
  Candidate: 0.3.5-0ubuntu1~12.04.1
  Version table:
 *** 0.3.5-0ubuntu1~12.04.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3.4-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

did I miss a step somewhere?

Joachim Schwender (jschwender) wrote :

I can not able to relate why this bug is marked fixed????? It is certainly NOT fixed!
I use gnome2d desktop and it does not work.
On my terminal servers here it takes evince 45 s to start up - this is a show stopper.
ii libgeis1 2.2.9.2-0ubuntu1
ii libgrip0 0.3.5-0ubuntu1~12.04.1

David Dombrowsky (davek) wrote :

For the record, `evince` seems to work OK if you pass it the `-w` (preview) flag.

If the root cause of this bug has been fixed, it isn't pushed to the stable repositories.

Thomas Karcher (thkarcher) wrote :

After upgrade to Saucy, the symptoms persist:

[4757284.068031] evince[6095]: segfault at 0 ip 00007ff85f446e10 sp 00007fff2a90b338 error 4 in libgeis.so.1.3.0[7ff85f440000+24000]

ii libgeis1:amd64 2.2.16+13.10.20130919.4 amd64 Gesture engine interface support
ii libgrip0 0.3.7+13.10.20130628-0u amd64 provides multitouch gestures to GTK+ apps

... and no segfault when passing "-w".

I can confirm that the bug is still present on Ubuntu 12.04.

After the update&upgrade, evince still takes a minute to start up, and it is unusable. Same GRIP-WARNING messages. Same version of libgeis and libgrip of post #38.

Markus (chickenmarkus) wrote :

In Trusty (libgeis1 (2.2.16+13.10.20130919.4-0ubuntu2), libgrip0 (0.3.7+13.10.20130628-0ubuntu2)) the same behavior over x2go and xrdp (TigerVNC)

"evince -w $FILE" works but normal mode crashs with segfault:
[ 4382.584653] evince[9291]: segfault at 0 ip 00007fcc9247fe10 sp 00007fff196e4bc8 error 4 in libgeis.so.1.3.0[7fcc92479000+24000]

Timo Ketola (2-timo) wrote :

I have 12.04.4 and evince startup time is 50s in x2go session.

$ apt-cache policy libgrip0 libgeis1
libgrip0:
  Installed: 0.3.5-0ubuntu1~12.04.1
  Candidate: 0.3.5-0ubuntu1~12.04.1
  Version table:
 *** 0.3.5-0ubuntu1~12.04.1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3.4-0ubuntu1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libgeis1:
  Installed: 2.2.9.2-0ubuntu1
  Candidate: 2.2.9.2-0ubuntu1
  Version table:
 *** 2.2.9.2-0ubuntu1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status

Markus (chickenmarkus) wrote :

After updating Trusty from Alpha to stable release evince works without any restrictions over x2go.

libgeis1: 2.2.16+14.04.20140303-0ubuntu1
libgrip0: 0.3.7+14.04.20140303-0ubuntu1
evince: 3.10.3-0ubuntu10

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

Other bug subscribers