Mir crashes with useless backtrace when mg::Platform methods throw

Bug #1553549 reported by marcel wouters
124
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Chris Halse Rogers
Unity System Compositor
Invalid
High
Unassigned
mir (Ubuntu)
Fix Released
High
Unassigned
unity-system-compositor (Ubuntu)
Invalid
High
Unassigned

Bug Description

So, the problem that causes unity-system-compositor to crash (rather than fail to start with a helpful error message) is that when methods on mg::Platform throw we unload the platform DSO before exception processing is completed, so libstdc++ goes merrily along trying to execute code that is longer mapped.

Original report below:
unity-system-co[5574]: segfault at 7f8056ee2490 ip 00007f805c592c3b sp 00007fffd6b871a0 error 4 in libstdc++.so.6.0.21[7f805c506000+172000]

ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: unity-system-compositor 0.4.2+16.04.20160219.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-10.25-generic 4.4.3
Uname: Linux 4.4.0-10-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CrashCounter: 1
Date: Sat Mar 5 19:03:39 2016
ExecutablePath: /usr/sbin/unity-system-compositor
ExecutableTimestamp: 1455894356
GraphicsCard:
 Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])
   Subsystem: Micro-Star International Co., Ltd. [MSI] 4th Gen Core Processor Integrated Graphics Controller [1462:1102]
   Subsystem: Micro-Star International Co., Ltd. [MSI] GM204M [GeForce GTX 970M] [1462:1102]
InstallationDate: Installed on 2015-02-25 (374 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
ProcCmdline: /usr/sbin/unity-system-compositor --disable-inactivity-policy=true --on-fatal-error-abort --file /run/lightdm-mir-0 --from-dm-fd 11 --to-dm-fd 20 --vt 8
ProcCwd: /
ProcEnviron:

SegvAnalysis:
 Segfault happened at: 0x7f805c592c3b: mov (%rsi),%rax
 PC (0x7f805c592c3b) ok
 source "(%rsi)" (0x7f8056ee2490) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: unity-system-compositor
StacktraceTop:
 ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1
 _Unwind_Resume_or_Rethrow () from /lib/x86_64-linux-gnu/libgcc_s.so.1
 __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Title: unity-system-compositor crashed with SIGSEGV in __gxx_personality_v0()
UpgradeStatus: Upgraded to xenial on 2015-11-03 (122 days ago)
UserGroups:

version.libdrm: libdrm2 2.4.67-1
version.lightdm: lightdm 1.17.5-0ubuntu2
version.mesa: libegl1-mesa-dev N/A

Related branches

Revision history for this message
marcel wouters (marcel-wouters) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 get_adjusted_ptr (catch_type=0x7f805d9af818 <typeinfo for mir::AbnormalExit>, throw_type=throw_type@entry=0x7f8056ee2490, thrown_ptr_p=thrown_ptr_p@entry=0x7fffd6b87230) at ../../../../src/libstdc++-v3/libsupc++/eh_personality.cc:225
 __cxxabiv1::__gxx_personality_v0 (version=<optimized out>, actions=<optimized out>, exception_class=5138137972254386944, ue_header=<optimized out>, context=0x7fffd6b873c0) at ../../../../src/libstdc++-v3/libsupc++/eh_personality.cc:595
 _Unwind_RaiseException (exc=0x22c4950) at ../../../src/libgcc/unwind.inc:113
 _Unwind_Resume_or_Rethrow (exc=exc@entry=0x22c4950) at ../../../src/libgcc/unwind.inc:252
 __cxxabiv1::__cxa_rethrow () at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:118

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in unity-system-compositor (Ubuntu):
importance: Undecided → Medium
summary: - unity-system-compositor crashed with SIGSEGV in __gxx_personality_v0()
+ unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr()
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr()

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

Changed in unity-system-compositor (Ubuntu):
status: New → Confirmed
information type: Private → Public
Changed in unity-system-compositor:
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Welcome to the world of exceptions. Some exception is occurring causing USC/Mir to crash. However our exception handling is also crashing in response to that. So we have both no log message indicating what the error was, and no stack trace indicating where the error was.

If I had to guess though, I would look at removing the proprietary nvidia drivers. We expect those to fail with Mir/USC for now.

summary: - unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr()
+ unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr(), when
+ Nvidia drivers are installed
Changed in mir:
status: New → Confirmed
Changed in mir (Ubuntu):
status: New → Confirmed
Changed in mir:
assignee: nobody → Chris Halse Rogers (raof)
importance: Undecided → High
Changed in unity-system-compositor:
importance: Undecided → High
Changed in mir (Ubuntu):
importance: Undecided → High
Changed in unity-system-compositor (Ubuntu):
importance: Medium → High
summary: unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr(), when
- Nvidia drivers are installed
+ proprietary Nvidia drivers are installed
tags: added: nvidia
Revision history for this message
Chris Halse Rogers (raof) wrote : Re: unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr(), when proprietary Nvidia drivers are installed

Yeah, remove the nvidia binary drivers and this will likely work. We're not going to have a release that works with the nvidia binary drivers in the immediate future :)

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

I'm guessing people read some news about the Nvidia driver and think Unity8/Mir is ready for it now. That's not correct. Please don't try using the Nvidia binary driver with Mir/Unity8 yet.

kevin gunn (kgunn72)
Changed in mir:
status: Confirmed → Won't Fix
Changed in unity-system-compositor:
status: Confirmed → Won't Fix
Changed in mir (Ubuntu):
status: Confirmed → Won't Fix
Changed in unity-system-compositor (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That doesn't sound right. RAOF is (indirectly) working on it right now and we expect to have this resolved within months, if not weeks.

Changed in mir:
status: Won't Fix → Confirmed
Changed in unity-system-compositor:
status: Won't Fix → Confirmed
Changed in mir (Ubuntu):
status: Won't Fix → Confirmed
Changed in unity-system-compositor (Ubuntu):
status: Won't Fix → Confirmed
tags: added: bugpattern-needed
summary: - unity-system-compositor crashed with SIGSEGV in get_adjusted_ptr(), when
- proprietary Nvidia drivers are installed
+ Mir crashes with useless backtrace when mg::Platform methods throw
description: updated
Changed in mir:
status: Confirmed → Triaged
Changed in mir (Ubuntu):
status: Confirmed → Triaged
Changed in unity-system-compositor:
status: Confirmed → Invalid
Changed in unity-system-compositor (Ubuntu):
status: Confirmed → Invalid
Changed in mir:
status: Triaged → In Progress
milestone: none → 0.23.0
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.23.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.23.0+16.10.20160602.1-0ubuntu1

---------------
mir (0.23.0+16.10.20160602.1-0ubuntu1) yakkety; urgency=medium

  [ Kevin DuBois ]
  * New upstream release 0.23.0 (https://launchpad.net/mir/+milestone/0.23.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI bumped to 40
      . mircommon ABI bumped at 6
      . mirplatform ABI unchanged at 11
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI unchanged at 9
      . mirclientplatform ABI unchanged at 5
      . mirinputplatform ABI unchanged at 5
    - Enhancements:
      . Enable internal usage of more flexible graphics buffer submission,
        precursing client API additions.
    - Bug fixes:
      . Potential NBS performance loss after resize (LP: #1579076)
      . Performance loss with NBS and overlays on (LP: #1578159)
      . Mir crashes with useless backtrace when mg::Platform methods throw
        (LP: #1553549)
      . Virtual output is not removed when screencast client disappears
        (LP: #1573572)
      . Can't VT switch from mir_demo_server (any more) (LP: #1576260)
      . mir_demo_server(_minimal): Window movement/resizing stops responding
        when the cursor leaves the surface, and can lead to windows 1px wide
        and unrecoverable. (LP: #1447886)
      . Virtual display output configuration is set to LVDS (LP: #1573782)
      . Mir-on-X11 doesn't pass Alt+primary button drag to Mir (LP: #1575765)
      . Mir-on-X11 breaks mir_proving_server resize logic (LP: #1575192)
      . Resizing can crash mir_demo_server (LP: #1575211)
      . [regression] Cursor stops at phantom edge on M10 and N7 (LP: #1580774)
      . [regression] MIR_CLIENT_PERF_REPORT is showing bogus render times and
        buffer lag (LP: #1581368)
      . Test failures in ClientLogging.reports_performance due to the above
        fix. (LP: #1583970, LP: #1584603, LP: #1584605)
      . Do not throw when creating some objects under HWC 1.5 (LP: #1583086)
      . Correct black frame issue under Xmir (LP: #1584784)

  [ Tarmac, Kevin DuBois <email address hidden>, Daniel van Vugt <email address hidden>, Andreas Pokorny <email address hidden>, Alberto Aguirre ]
  * 0.23.0 Mir release

 -- Kevin DuBois <email address hidden> Thu, 02 Jun 2016 13:18:03 +0000

Changed in mir (Ubuntu):
status: Triaged → 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.