compiz crashed with SIGSEGV in CompositeScreen::compositingActive()

Bug #833729 reported by Daryl Sweat on 2011-08-25
190
This bug affects 44 people
Affects Status Importance Assigned to Milestone
Compiz Core
Critical
Daniel van Vugt
Unity
Won't Fix
Critical
Daniel van Vugt
Unity Distro Priority
Critical
Unassigned
compiz (Ubuntu)
Critical
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

Crashes when used by /usr/lib/nux/unity_support_test

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: compiz-core 1:0.9.5.92+bzr2791-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
Architecture: amd64
CompizPlugins: [core,gtkloader,bailer,detection,composite,opengl,imgjpeg,compiztoolbox,decor,grid,mousepoll,wallpaper,resize,move,place,imgpng,imgsvg,gnomecompat,text,snap,wall,vpswitch,regex,session,thumbnail,unitymtgrabhandles,animation,expo,workarounds,ezoom,staticswitcher,fade,opacify,scale,unityshell]
CompositorRunning: compiz
CrashCounter: 1
Date: Thu Aug 25 07:50:21 2011
DistUpgraded: Log time: 2011-08-12 01:37:52.657651
DistroCodename: oneiric
DistroVariant: ubuntu
ExecutablePath: /usr/bin/compiz
GraphicsCard:
 Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA controller])
   Subsystem: Acer Incorporated [ALI] Device [1025:0487]
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 003: ID 04f2:b1d8 Chicony Electronics Co., Ltd
MachineType: Acer Aspire 5742Z
ProcCmdline: compiz
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-9-generic root=UUID=beff164b-12df-49d5-b810-f23d5495eb50 ro quiet splash vt.handoff=7
SegvAnalysis:
 Segfault happened at: 0x7f2969ce32e0 <_ZN15CompositeScreen17compositingActiveEv>: mov 0x48(%rdi),%rax
 PC (0x7f2969ce32e0) ok
 source "0x48(%rdi)" (0x00000048) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: compiz
StacktraceTop:
 CompositeScreen::compositingActive() () from /usr/lib/compiz/libcomposite.so
 PrivateCompositeWindow::PrivateCompositeWindow(CompWindow*, CompositeWindow*) () from /usr/lib/compiz/libcomposite.so
 CompositeWindow::CompositeWindow(CompWindow*) () from /usr/lib/compiz/libcomposite.so
 PluginClassHandler<CompositeWindow, CompWindow, 2>::get(CompWindow*) () from /usr/lib/compiz/libopengl.so
 PrivateGLWindow::PrivateGLWindow(CompWindow*, GLWindow*) () from /usr/lib/compiz/libopengl.so
Title: compiz crashed with SIGSEGV in CompositeScreen::compositingActive()
UpgradeStatus: Upgraded to oneiric on 2011-08-12 (13 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 01/10/2011
dmi.bios.vendor: Acer
dmi.bios.version: V1.14
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Aspire 5742Z
dmi.board.vendor: Acer
dmi.board.version: V1.14
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: V1.14
dmi.modalias: dmi:bvnAcer:bvrV1.14:bd01/10/2011:svnAcer:pnAspire5742Z:pvrV1.14:rvnAcer:rnAspire5742Z:rvrV1.14:cvnAcer:ct10:cvrV1.14:
dmi.product.name: Aspire 5742Z
dmi.product.version: V1.14
dmi.sys.vendor: Acer
version.compiz: compiz 1:0.9.5.92+bzr2791-0ubuntu1
version.ia32-libs: ia32-libs 20090808ubuntu16
version.libdrm2: libdrm2 2.4.26-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu3
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

Related branches

Revision history for this message
Daryl Sweat (curnel-d) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 CompositeScreen::compositingActive (this=0x0) at /build/buildd/compiz-0.9.5.92+bzr2791/plugins/composite/src/screen.cpp:455
 PrivateCompositeWindow::PrivateCompositeWindow (this=0x544d910, w=0x400dde0, cw=<optimized out>) at /build/buildd/compiz-0.9.5.92+bzr2791/plugins/composite/src/window.cpp:93
 CompositeWindow::CompositeWindow (this=0x5203310, w=0x400dde0) at /build/buildd/compiz-0.9.5.92+bzr2791/plugins/composite/src/window.cpp:32
 getInstance (base=0x400dde0) at /build/buildd/compiz-0.9.5.92+bzr2791/include/core/pluginclasshandler.h:159
 PluginClassHandler<CompositeWindow, CompWindow, 2>::get (base=0x400dde0) at /build/buildd/compiz-0.9.5.92+bzr2791/include/core/pluginclasshandler.h:196

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 compiz (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Alex Launi (alexlauni) on 2011-08-25
Changed in compiz (Ubuntu):
status: New → Confirmed
importance: Medium → High
visibility: private → public
Revision history for this message
Eugene San (eugenesan) wrote :

Attached crash file for compiz=1:0.9.6+bzr20110929-0ubuntu3
In my case it crashed when durin session setuo in NX session.

description: updated
Daniel Hahler (blueyed) on 2011-12-02
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Changed in compiz-core:
status: New → Incomplete
Revision history for this message
Didier Roche (didrocks) wrote :

updated stracktrace that people encounters more: http://paste.ubuntu.com/894814/

Changed in compiz-core:
status: Incomplete → Triaged
importance: Undecided → Critical
Changed in compiz (Ubuntu):
importance: High → Critical
Changed in unity:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 5.8.0
Changed in unity-distro-priority:
status: New → Triaged
importance: Undecided → Critical
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in compiz-core:
status: Triaged → In Progress
assignee: nobody → Alan Griffiths (alan-griffiths)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

There are two elements to this:

/1/ a fairly unusual error condition that I've yet to identify; and,
/2/ poor error handling in compiz

The error condition causes CompositeScreen::CompositeScreen to call setFailed() - which should simply cause the composite plugin to fail loading (and normally would).

However, the opengl tries to find the composite plugin which implicitly loads it again. But this failure isn't handled gracefully and results in the segfault.

If the error were handled gracefully then compiz would be still missing some plugins (composite and opengl for two). So more research into /1/ is needed.

Meanwhile I'll fix /2/

Revision history for this message
Didier Roche (didrocks) wrote :

maybe you can exit 1 so that in that case, gnome-session is trying to respawn it? (to be tested). if there is no composite plugin, I'm afraid not a lot will work in compiz.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

We saw from one log batch that after such a crash (not exit(1), but after a SIGSEGV) gnome-session tried restarting compiz a few times, but still wasn't able to start it for good. So I'm afraid that even if an exit(1) is fired, compiz will still be unable to start correctly. But at least we won't have an ugly crash but a graceful exit.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

"exit(1)" - that may be the best quick fix. There is too much flaky code around in plugins that have a transitive dependency on CompositeScreen. (If the code were exception-neutral then I could throw an exception and clean up neatly.)

Revision history for this message
Bruno Girin (brunogirin) wrote :

This bug affects the latest 12.04 too meaning that Unity is completely borked on my machine (Lenovo X1, amd64).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Confirmed from Jason Warner that the cause of the problem is:
 compiz (composite) - Error: Screen 0 on display ":0" already has a compositing manager; try using the --replace option to replace the current compositing manager.
 error CompositeScreen::CompositeScreen - line 278

The unusual thing is that for some people running precise, the composite plugin can't load because some other compositing manager is running. But we can't see one running yet! Looks like the atom/selection used to indicate that one is running is being leaked somewhere.

This is an unusual failure. The fact that it caused crashes is probably not unusual -- most plugins have probably not been written well enough to handle the case where composite fails. So we can fix the plugins, but that's a different issue.

The root cause of the problem is that something is leaking the atom "_NET_WM_CM_S0", which should not be possible if no compositing manager is running.

Changed in unity:
status: Triaged → In Progress
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in unity:
assignee: Daniel van Vugt (vanvugt) → nobody
Didier Roche (didrocks) on 2012-03-23
Changed in unity:
milestone: 5.8.0 → 5.10.0
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.7.2-0ubuntu1

---------------
compiz (1:0.9.7.2-0ubuntu1) precise-proposed; urgency=low

  [ Łukasz 'sil2100' Zemczak ]
  * New upstream snapshot:
    - Fix global menu not being ergonomical on large screens (LP: #682788)
    - Fix Alt+Right arrow key (LP: #943612)
    - Fix key bindings for actions while doing tap detection (LP: #944631)
    - Window movement is erratic and buggy, backport (LP: #923683)
    - CompScreenImpl::addAction(CompAction*): Assertion `priv->initialized'
      failed (LP: #946118)
    - gtk-window-decorator crash with SIGSEGV in max_window_name_width()
      (LP: #937815)
    - Finish the implementation of the locally integrated menubars
      (LP: #931245)
    - Unity/compiz intercepts keystrokes from grabbed windows (LP: #806255)
    - Pressing alt doesn't show the menu title bar in top panel (LP: #943194)
    - Fix Alt stealing focus from widgets (LP: #943851)
    - Fix Alt + drag (LP: #945373)
    - lp:compiz-core fails parallel builds (make -jN) (LP: #938417)
    - Changing the HUD shortcut disables all Alt-based combinations. And
      changing the Dash shortcut disables all Super-based shortcuts
      (LP: #945816)
    - Fix key bindings (such as Super) not working on empty workspace or on
      slow/loaded systems (LP: #953089)
    - compiz crashed with signal 5 in Glib::exception_handlers_invoke()
      (LP: #808007)
    - Fix segfault caused by r3043 (LP: #958540)
  * Removed cherry-picked patches:
    - debian/patches/fix_806255.patch
    - debian/patches/fix_923683.patch
    - debian/patches/fix_943194.patch
    - debian/patches/fix_944631.patch
    - debian/patches/fix_alt_pressing.patch
    - debian/patches/additional_alt_tapping_fix.patch

  [ Didier Roche ]
  * pick upstream fix, debian/patches/fix_953839.patch:
    [regression] Invisible resize border is now only 1px wide (LP: #953839)
  * debian/patches/revert_lim.patch:
    - revert the integrated menu patch. It won't be released in precise and
      triggers a regression (in bug #962085)
  * debian/patches/fix_953089_2.patch:
    - second trial to fix remaining corner cases
  * debian/patches/exit_1_if_composite_cant_init.patch:
    - try to workaround a crasher which seems to happen when the composite
      plugin failed to initialize. Hopefully exiting 1 will make gnome-session
      respawning compiz and then the init will work. (LP: #833729)
  * debian/patches/always_replace.patch:
    - right now, always replace the current WM as it seems that some people
      got another compositor running at the start of the session. This will
      hopefully workaround the issue that some people experience.
 -- Didier Roche <email address hidden> Fri, 23 Mar 2012 09:13:51 +0100

Changed in compiz (Ubuntu):
status: Triaged → Fix Released
Changed in compiz-core:
assignee: Alan Griffiths (alan-griffiths) → Daniel van Vugt (vanvugt)
Tim Penhey (thumper) on 2012-03-28
Changed in compiz-core:
status: In Progress → Fix Committed
Changed in compiz-core:
milestone: none → 0.9.7.4
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix released in Compiz Core 0.9.7.4

Changed in compiz-core:
status: Fix Committed → Fix Released
Didier Roche (didrocks) on 2012-03-30
Changed in unity:
status: In Progress → Fix Released
no longer affects: unity (Ubuntu)
Changed in unity-distro-priority:
status: Fix Committed → Fix Released
Changed in unity:
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Dekel Amrani (dekela) wrote :

Still not solved:
Compiz 0.9.7.6

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Dekel, if you're still getting problems like this bug then please log a new bug with the details.

Revision history for this message
Jean-Philippe Leboeuf (jpleboeuf) wrote :

Still not solved? - Compiz version 1:0.9.7.8-0ubuntu1.
Logging via XDMCP.
Nomore crash, but still no launcher or menu appearing...

Revision history for this message
Phil Wieland (launchpad-philwieland) wrote :

Workaround which solved this for me is to delete /tmp/unity_support_test.0 before attempting remote login. See Bug 889996.

(This only worked after the bug fix for this ticket was applied.)

I'm logging in using NX so this may be irrelevant.

Revision history for this message
Jean-Philippe Leboeuf (jpleboeuf) wrote :

Phil, thanks a lot!! the workaround you mentioned works also with XDMCP :D

Revision history for this message
Diego Mesa (diego898) wrote :

Hello,

I've just installed Ubuntu 12.04 and fully updated. I then installed the xrdp package. I then tried to login using remote desktop from another windows 7 machine. After typing in a username and password, it begins to login and it stops at my ubuntu machines desktop showing nothing but the wallpaper and a mouse. Meanwhile on my actual ubuntu machine I get the compiz error asking me if I'd like to restart it. I do so, but on my windows machine, the remote desktop connection remains stuck on the wallpaper/mouse combo. I see in the comments that this issue has been fixed, but I'm still experiencing the issue! How should I proceed?

Thank you

Revision history for this message
Phil Wieland (launchpad-philwieland) wrote :

Have you tried the workaround in my comment above dated 2012-05-02.

Revision history for this message
Diego Mesa (diego898) wrote :

above when you say "This only worked after the bug fix for this ticket was applied." What bug fix are you referring to? Some fixes listed here earlier on in the thread? Or are you referring to bug 889996?

thanks

Revision history for this message
Phil Wieland (launchpad-philwieland) wrote :

Fixes for this bug listed earlier in this thread. I can't remember exactly, probably Compiz Core 0.9.7.4.

Revision history for this message
Diego Mesa (diego898) wrote :

Im not very clear on what I have to do BEFORE I try to "delete /tmp/unity_support_test.0 before attempting remote login" as you mentioned. Should I do something before trying that?

Thanks!

Revision history for this message
Phil Wieland (launchpad-philwieland) wrote :

Nothing. Just delete that file if it exists before remotely logging in. If you are at a remote location, you can ssh into the machine to do this.

As I understand it, the reason is this:

Every time you log in, from a remote computer or on the local console, a test is performed to decide whether the display can support certain features of Unity. This test takes a few seconds, so someone decided to record the result by creating a file in /tmp, so that next time you log in it doesn't need to perform the test. So what happens is, you boot up your brand new installation for the first time and log in to the local console, the test runs and the result is recorded by creating /tmp/unity_support_test.0 Now, every time you log in unity assumes you have the features of a local console. You install xrdp or nx or whatever and then try a remote login. The functionality available is different and unity needs to fall back to a simpler version but it sees the file in /tmp and doesn't test so it tries to run as though you were a local console, and fails.

If you have deleted the file, then when you remotely log in the test will be performed and unity will see the different feature set and act appropriately. It will then create /tmp/unity_support_test.1 which means that if you later log in to the local console you won't get the right result, but remote logins will work OK.

Just to be clear, this workaround is for bug 889996. I believe 833729 is fixed.

I use nx nomachine to log in to my desk PC here at home from a windows machine at work successfully on a daily basis, so it does work.

Revision history for this message
Diego Mesa (diego898) wrote :

strangely, this did indeed allow me to see my ubuntu desktop from my mac using RDP. However, the ubuntu machine remain logged in, adn when I opened a browser through my remote session, it did NOT pop up on my remote session, but on my actual desktop monitor. Only when I opened a file browser did it open on my remote session. Logging in throguh remote seemed to extend my session onto where as well, instead of replacing it? Any idea how I can proceed from here?

Revision history for this message
Phil Wieland (launchpad-philwieland) wrote :

I've never used RDP, perhaps it's different. With nx nomachine I get two independent sessions. There are a few gotchas, e.g. only one Firefox allowed so it won't run in both at once, but basically it just works.

Maybe you could install NX, I see they do a mac client.

Revision history for this message
Oti Humbel (ohumbel) wrote :

The problem affects NX, too.
Both NX Client and NoMachine Player.
Even with the newest Unity update from today.

The workaround still is:
  cd /usr/lib/nux
  sudo mv unity_support_test unity_support_test.original
  sudo ln -s /bin/false unity_support_test

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

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

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Will Cooke (willcooke) wrote :

As part of the big bug clear up for 16.04 LTS I am marking this bug as Wont Fix.
These types of crasher are better handled by errors.ubutnu.com which can collate similar crash reports to help us identify persitent bugs rather than one-off crashes.
Sorry we are not able to help with this specific issue. If you are still experiencing this crash, please re-open the bug and add the tag "desktop-bugscrub-reopened". See https://wiki.ubuntu.com/BigDesktopBugScrub for more information.

Changed in compiz-core:
status: Fix Released → Won't Fix
Changed in unity:
status: Fix Released → Won't Fix
Changed in unity (Ubuntu):
status: Confirmed → Won't Fix
tags: added: desktop-bugscrub-autoclosed
To post a comment you must log in.