[regression] Mir servers just segfault just after "Selected driver:" instead of reporting exceptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Andreas Pokorny | ||
0.18 |
Won't Fix
|
High
|
Unassigned | ||
mir (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Mir server segfaults when trying to report exception - "Error opening DRM device".
I could not get any workable backtrace, but by deduction was able to figure out that was the one being thrown. Unfortunately Mir segfaults before it can report the error to the user. This does not happen in Mir 0.17.1 at least but does happen with lp:mir ...
Try this from ssh while you're logged in to X, or on the login screen:
$ sudo bin/mir_demo_server --platform-
MIR_CLIENT_
MIR_SERVER_
LD_LIBRARY_
exec=bin/
[1450687750.973798] mirserver: Starting
[1450687750.974124] mirserver: Selected driver: mesa-kms (version 0.19.0)
$ echo $?
139
When launched within an X session, after opening /dev/dri/card0 the kms platform attempts to drmSetInterface
Then a rethrow of the exception leads to a segmentation fault.
#0 0x00007ffff78dfc3b in ?? () from /usr/lib/
#1 0x00007ffff78e01bf in __gxx_personali
#2 0x00007ffff764c203 in _Unwind_
#3 0x00007ffff764c50d in _Unwind_
#4 0x00007ffff78e095c in __cxa_rethrow () from /usr/lib/
#5 0x00007ffff67661f0 in mir::report_
#6 0x00007ffff677ef36 in mir::Server::run (this=this@
#7 0x00007ffff6b1dbb5 in main (argc=2, argv=0x7fffffff
#8 0x0000000000400e8e in main (argc=2, argv=0x7fffffff
It seems to try to access unwind / throw location related information. But those are no longer present since the platform library is already unloaded.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Mir CI Bot: Approve (continuous-integration)
- Chris Halse Rogers: Approve
- Daniel van Vugt: Abstain
- Kevin DuBois (community): Approve
- Alan Griffiths: Approve
-
Diff: 315 lines (+187/-45)5 files modifieddebian/mir-test-tools.install (+1/-0)
src/server/graphics/default_configuration.cpp (+57/-45)
tests/acceptance-tests/test_server_shutdown.cpp (+20/-0)
tests/mir_test_framework/CMakeLists.txt (+20/-0)
tests/mir_test_framework/platform_graphics_throw.cpp (+89/-0)
summary: |
- Mir server segfaults when trying to report exception - "Error opening - DRM device" + [regression] Mir server segfaults when trying to report exception - + "Error opening DRM device" |
Changed in mir: | |
milestone: | none → 0.19.0 |
assignee: | nobody → Daniel van Vugt (vanvugt) |
status: | New → In Progress |
description: | updated |
Changed in mir: | |
assignee: | nobody → Andreas Pokorny (andreas-pokorny) |
summary: |
- [regression] Mir server segfaults when trying to report exception - - "Error opening DRM device" + [regression] Mir server segfaults when trying to report exception in the + driver module - "Error opening DRM device" |
summary: |
- [regression] Mir server segfaults when trying to report exception in the + [regression] Mir server segfaults on startup just after "Selected + driver: mesa-kms". It's actually trying to report exception in the driver module - "Error opening DRM device" |
Changed in mir: | |
assignee: | Daniel van Vugt (vanvugt) → Andreas Pokorny (andreas-pokorny) |
status: | Triaged → In Progress |
no longer affects: | mir/0.18 |
Changed in mir: | |
milestone: | 0.19.0 → 0.20.0 |
Changed in mir: | |
milestone: | 0.20.0 → 0.19.0 |
Bisected. The regression came in at:
------- ------- ------- ------- ------- ------- ------- ------- ----
revno: 3070 [merge]
author: Andreas Pokorny <email address hidden>
committer: Alberto Aguirre <email address hidden>
branch nick: devel
timestamp: Mon 2015-11-02 12:52:36 -0600
message:
Switch to UniqueModulePtr in graphics platform creation symbols
With this the lifetime of the graphics platform shared module is tied to the lifetime of the graphics::Platform instance used by the server. So we can get rid of the global static SharedLibrary in mirserver. This is then identical to the lifetime tracking used for input platforms.
The platform plays factory for Display, PlatformIPCOper ations and GraphicsBufferA llocator. These instances are still created as plain shared ptrs. Currently DisplayServer guarantees that the Platform outlives those objects, if we dont want to guarantee that destruction ordering we could also use UniqueModulePtr for those - but that requires a slightly larger rework in integration tests.
This change also required removing enable_ shared_ from_this from the kms version of mir::graphics: :mesa:: Platform. Capturing a UniqueModulePtr<T> with a shared_ptr<T> works, and also when enable_ shared_ from_this is used in T. It does not work when enable_ shared_ from_this is only added by a class derived from T. ------- ------- ------- ------- ------- ------- ------- ----
-------