Compiz crash on startup

Bug #1080386 reported by per-olav
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Geis
Fix Released
High
Daniel d'Andrada
geis (Ubuntu)
Fix Released
Undecided
Daniel d'Andrada
Quantal
Fix Released
Undecided
Daniel d'Andrada

Bug Description

Thanks for any help. Ubuntu 12.10. After login Compiz crashes, and when I try to lunch it in terminal it doesn't work and the output is:

per-olav@asus12:~$ compiz
compiz (core) - Info: Loading plugin: core
compiz (core) - Info: Starting plugin: core
[...]
ERROR 2012-11-18 17:24:14 nux.gestures_subscription GesturesSubscription.cpp:299 Failed to activate Geis subscription.
Minnesegmentsfeil (core dumped)

[Impact]

In some computers, users are unable to get past the login screen. Compiz crashes right after it's started.

The fix should be backported as it's a simple null pointer check (i.e., low regression risk) and solves the serious problem described above. The crash happened because, in nux, when geis fails to activate a gestures subscription (which is an uncommon case, thus the low number of computers affected), nux destroys the related objects, which includes a pointer to a geis filter. In this situation that geis filter pointer is null and therefore geis_filter_delete() receives a null pointer and tries to access it, which causes a segmentation fault. The fix changes geis_filter_delete() so that it checks if the received pointer is null before trying to use it.

[Test Case]

A unit test has been included along with the fix.

For users with computers affected by this bug, testing the fix is really simple: after installing the package with the proposed fix, just try to log in and check if you get to the ubuntu desktop successfully.

[Regression Potential]

Only computers affected by this bug will get a different code path executed due to this fix, as they are the only ones that pass null pointers to geis_filter_delete() and, therefore, will now get a different behaviour out of this funticion (a no-op success instead of a segmentation fault).

Related branches

Changed in geis:
status: New → Confirmed
Changed in compiz:
status: New → Confirmed
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

That nux.gestures_subscription error message by itself doesn't imply that there as a crash in geis.
A backtrace would be nice.

Changed in geis:
status: Confirmed → Incomplete
Revision history for this message
per-olav (pobr1990) wrote :

Thanks for the comments. How do I backtrace? When I logon Ubuntu 12.10 I only see the background, and nothing more. In a second the unity panel is shown, but then disappears.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :
Revision history for this message
Daniel Nyström (speakman) wrote :

Here's my backtrace. I could not find any debug symbols for neither geis nor compiz:

Starting program: /usr/bin/compiz
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3b5a700 (LWP 18643)]
[New Thread 0x7ffff0a64700 (LWP 18644)]
[New Thread 0x7fffebfff700 (LWP 18645)]
[New Thread 0x7fffd3397700 (LWP 18651)]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffdc26b0e0 in ?? () from /usr/lib/x86_64-linux-gnu/libgeis.so.1

Thread 5 (Thread 0x7fffd3397700 (LWP 18651)):
#0 0x00007ffff70330fe in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#1 0x00007ffff5bca195 in g_cond_wait_until ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2 0x00007ffff5b63761 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3 0x00007ffff5bb0d6a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#4 0x00007ffff5bb0645 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#5 0x00007ffff702ee9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#6 0x00007ffff7337cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#7 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 4 (Thread 0x7fffebfff700 (LWP 18645)):
#0 0x00007ffff732a8bd in read () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x00007ffff5bc915f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2 0x00007ffff5b8c914 in g_main_context_check ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3 0x00007ffff5b8cd22 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#4 0x00007ffff5b8d1e2 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#5 0x00007ffff19b34a6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
No symbol table info available.
#6 0x00007ffff5bb0645 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#7 0x00007ffff702ee9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.

Revision history for this message
per-olav (pobr1990) wrote :

Thanks again! I've uploaded the file from the process.

Changed in geis:
status: Incomplete → Confirmed
Changed in geis:
importance: Undecided → Medium
assignee: nobody → Daniel d'Andrada (dandrader)
affects: geis → nux
Changed in nux:
status: Confirmed → In Progress
Changed in geis:
assignee: nobody → Daniel d'Andrada (dandrader)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Thanks for the stack trace. that was very helpful.

Per-Olav,

Could you please attach the terminal output you get when you have the following enviroment variable set?
GEIS_DEBUG=3

Revision history for this message
Daniel Nyström (speakman) wrote :

Thank you for triaging, but I wouldn't put it on "medium" since my MacBook Air 2011 won't even start anymore. ;)

Just let me know if there's anything I can do - I'll stay alerted on all Launchpad mail!

Revision history for this message
per-olav (pobr1990) wrote :
Download full text (5.5 KiB)

If I understand this correctly, I just type "GEIS_DEBUG=3 geistest" in terminal? Used google to find the answer. It shows:

per-olav@asus12:~$ GEIS_DEBUG=3 geistest
GEIS(debug)-geis_register_backend:95 back end 0 registered as 'com.canonical.oif.backend.mock'
GEIS(debug)-geis_register_backend:95 back end 1 registered as 'com.canonical.oif.backend.dbus'
GEIS(debug)-geis_register_backend:95 back end 2 registered as 'com.canonical.oif.backend.grail'
GEIS(warning)-_set_valist:654 back end not specified, defaulting to DBus
GEIS(debug)-geis_backend_by_name:125 creating back end of class "com.canonical.oif.backend.dbus"
GEIS(debug)-_geis_wait_for_init:684 waiting for initialization to complete...
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 7 callback_info=0x1ac8560
GEIS(warning)-_locator_message_handler:120 server not found!
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-geis_backend_delete:162 destroying back end com.canonical.oif.backend.dbus
GEIS(debug)-geis_backend_by_name:125 creating back end of class "com.canonical.oif.backend.grail"
GEIS(debug)-geis_register_gesture_class:1219 registering class "Drag" id 0
GEIS(debug)-geis_register_gesture_class:1219 registering class "Pinch" id 1
GEIS(debug)-geis_register_gesture_class:1219 registering class "Rotate" id 2
GEIS(debug)-geis_register_gesture_class:1219 registering class "Tap" id 15
GEIS(debug)-geis_register_gesture_class:1219 registering class "Touch" id 32
GEIS(debug)-geis_register_region:1467 registering region
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-_default_output_event_callback:132 posting output event
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 9 callback_info=0x1ad9b70
GEIS(debug)-geis_register_device:1258 registering device "ETPS/2 Elantech Touchpad" id 40496
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-_default_output_event_callback:132 posting output event
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-_default_output_event_callback:132 posting output event
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-_default_output_event_callback:132 posting output event
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-_default_output_event_callback:132 posting output event
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1ac79f0
GEIS(debug)-_input_event_handler:261 input event available
GEIS(debug)-_default_output_event_callback:132 posting output event
GEIS(debug)-geis_backend_multiplexor_pump:415 activity 0x1 on fd 5 callback_info=0x1a...

Read more...

Revision history for this message
Daniel Nyström (speakman) wrote :

Here's mine attached.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

@Per-Olav

Sorry, I meant the output you get when you run *compiz* (like you did in the description of this bug) and have that GEIS_DEBUG=3 env variable set.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

@speakman

Yes, that's it! Thanks!

Revision history for this message
per-olav (pobr1990) wrote :
Download full text (14.9 KiB)

Ahh, my bad, here is the output then:

per-olav@asus12:~$ GEIS_DEBUG=3 compiz
compiz (core) - Info: Loading plugin: core
compiz (core) - Info: Starting plugin: core
compiz (core) - Info: Loading plugin: ccp
compiz (core) - Info: Starting plugin: ccp
compizconfig - Info: Backend : gsettings
compizconfig - Info: Integration : true
compizconfig - Info: Profile : unity
compiz (core) - Info: Loading plugin: composite
compiz (core) - Info: Starting plugin: composite
compiz (core) - Info: Loading plugin: opengl
compiz (core) - Info: Unity is fully supported by your hardware.
compiz (core) - Info: Unity is fully supported by your hardware.
compiz (core) - Info: Starting plugin: opengl
compiz (core) - Info: Loading plugin: compiztoolbox
compiz (core) - Info: Starting plugin: compiztoolbox
compiz (core) - Info: Loading plugin: decor
compiz (core) - Info: Starting plugin: decor
compiz (core) - Info: Loading plugin: regex
compiz (core) - Info: Starting plugin: regex
compiz (core) - Info: Loading plugin: gnomecompat
compiz (core) - Info: Starting plugin: gnomecompat
compiz (core) - Info: Loading plugin: resize
compiz (core) - Info: Starting plugin: resize
compiz (core) - Info: Loading plugin: imgpng
compiz (core) - Info: Starting plugin: imgpng
compiz (core) - Info: Loading plugin: grid
compiz (core) - Info: Starting plugin: grid
compiz (core) - Info: Loading plugin: resizeinfo
compiz (core) - Info: Starting plugin: resizeinfo
compiz (core) - Info: Loading plugin: mousepoll
compiz (core) - Info: Starting plugin: mousepoll
compiz (core) - Info: Loading plugin: snap
compiz (core) - Info: Starting plugin: snap
compiz (core) - Info: Loading plugin: place
compiz (core) - Info: Starting plugin: place
compiz (core) - Info: Loading plugin: move
compiz (core) - Info: Starting plugin: move
compiz (core) - Info: Loading plugin: text
compiz (core) - Info: Starting plugin: text
compiz (core) - Info: Loading plugin: vpswitch
compiz (core) - Info: Starting plugin: vpswitch
compiz (core) - Info: Loading plugin: unitymtgrabhandles
GEIS(debug)-geis_register_backend:95 back end 0 registered as 'com.canonical.oif.backend.mock'
GEIS(debug)-geis_register_backend:95 back end 1 registered as 'com.canonical.oif.backend.dbus'
GEIS(debug)-geis_register_backend:95 back end 2 registered as 'com.canonical.oif.backend.grail'
compiz (core) - Info: Starting plugin: unitymtgrabhandles
compiz (core) - Info: Loading plugin: animation
compiz (core) - Info: Starting plugin: animation
compiz (core) - Info: Loading plugin: session
compiz (core) - Info: Starting plugin: session
I/O warning : failed to load external entity "/home/per-olav/.compiz/session/10ff0267cd306b4199135490646245402800000025900001"
compiz (core) - Info: Loading plugin: wall
compiz (core) - Info: Starting plugin: wall
compiz (core) - Info: Loading plugin: workspacenames
compiz (core) - Info: Starting plugin: workspacenames
compiz (core) - Info: Loading plugin: workarounds
compiz (core) - Info: Starting plugin: workarounds
compiz (core) - Info: Loading plugin: expo
compiz (core) - Info: Starting plugin: expo
compiz (expo) - Warn: failed to bind image to texture
compiz (core) - Info: Loading plugin: ezoom
compiz (core) ...

no longer affects: nux
no longer affects: compiz
Revision history for this message
Daniel Nyström (speakman) wrote :

How can I easily test your patch? Are there an PPA archive available when it's been accepted? When I try rebuilding the geis package (debuild -us -uc) it complains about an "orig. tar.xz" has changed and halts. Ideas?

Changed in geis:
status: In Progress → Fix Committed
Stephen M. Webb (bregma)
Changed in geis (Ubuntu Quantal):
assignee: nobody → Daniel d'Andrada (dandrader)
status: New → In Progress
Changed in geis (Ubuntu):
status: New → In Progress
assignee: nobody → Daniel d'Andrada (dandrader)
description: updated
Revision history for this message
Daniel Nyström (speakman) wrote :

"For users with computers affected by this bug, testing the fix is really simple: after installing the package with the proposed fix, just try to log in and check if you get to the ubuntu desktop successfully."

Yes, trying to login I could really have guessed. But how to get the "package with the proposed fix"? Any PPA?

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

@speakman

The package containing the fix should reach quantal-proposed repository soon. Then you'll be able to get it from there and verify the propsed fix.

Revision history for this message
Daniel Nyström (speakman) wrote :

Great. Make sure to notice those subscribing this bug. Thanks.

Revision history for this message
per-olav (pobr1990) wrote :

Thank you for fixing this bug :) also, thanks to speakman for help and contributions to the bug :) It's my first experience reporting a bug.

Changed in geis:
status: Fix Committed → Fix Released
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

FYI:
The fix is already in raring apt repositories but in order to reach precise it has to go through a process[1] that takes some time.

[1] - https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
per-olav (pobr1990) wrote :

What about quantal? Which package in proposed repository should I update?

Revision history for this message
Daniel Nyström (speakman) wrote :

I just tried to update, including quantal-proposed, but still no geis updates (latest changelog entry is 2.2.12-0buntu2).

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

It's still waiting for a review/approval to get into quantal-proposed.

This is the queue of packages waiting to get there: https://launchpad.net/ubuntu/quantal/+queue?queue_state=1&direction=backwards&memo=30

Revision history for this message
Brian Murray (brian-murray) wrote :

This was not automatically marked as Fix Released for some reason, here is the changelog entry:

geis (2.2.15daily12.12.10-0ubuntu1) raring; urgency=low

  [ Daniel d'Andrada ]
  * Don't crash if a null filter is passed to geis_filter_delete() (LP: #1080386)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 300
 -- Automatic PS uploader <email address hidden> Mon, 10 Dec 2012 07:44:42 +0000

Changed in geis (Ubuntu):
status: In Progress → Fix Released
Changed in geis (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Per-Olav, or anyone else affected,

Accepted geis into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/geis/2.2.12-0ubuntu3 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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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!

Revision history for this message
Daniel Nyström (speakman) wrote :

Sorry for this meta question, but since this bug took only one day to get fixed but over a month to reach the first official stage - what could we, the users, have done to quicken this process?

I havn't been able to run my MacBook Air 2012 with Ubuntu for over a month, and I guess I'm not the only one. Very frustrating. But I'm also eager to help, since open projects as Ubuntu rely on user contribution and collaboration.

What could have helped?

Revision history for this message
per-olav (pobr1990) wrote :

It works! Using version 2.2.12-0buntu3. Thanks a lot :-)

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote :

Daniel: unfortunately not a lot, we've been backlogged on SRU review which is hard for users to help with :-(

The best thing to do, albeit indirect, is to help with verifying SRUs that are already in -proposed. Reducing the volume of unverified updates means we have less to read routinely and speeds everything up.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
geis (2.2.12-0ubuntu3) quantal-proposed; urgency=low

  * Don't crash if a null filter is passed to geis_filter_delete() (LP: #1080386)
    - added 002-fix-lp1080386.patch
 -- Daniel d'Andrada <email address hidden> Mon, 10 Dec 2012 09:46:03 -0200

Changed in geis (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

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.

Stephen M. Webb (bregma)
Changed in geis:
milestone: none → 2.2.16
Stephen M. Webb (bregma)
Changed in geis:
milestone: 2.2.16 → none
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.