Segmentation fault in MesaBufferIntegration.*
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Mir |
Fix Released
|
Medium
|
Alan Griffiths | |
| | mir (Ubuntu) |
Medium
|
Unassigned | ||
Bug Description
$ LD_PRELOAD=
MIR_CLIENT_
MIR_SERVER_
LD_LIBRARY_
exec=bin/
Running main() from main.cpp
Note: Google Test filter = MesaBufferInteg
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from MesaBufferInteg
[ RUN ] MesaBufferInteg
[1442227540.564035] mirplatform: Found graphics driver: android
[1442227540.565387] mirplatform: Found graphics driver: mesa-x11
[1442227540.565869] mirplatform: Found graphics driver: mesa-kms
[1442227540.566018] mirplatform: Found graphics driver: dummy
Segmentation fault (core dumped)
This *may* have something to do with loading and discarding the server-
Related branches
- PS Jenkins bot: Approve (continuous-integration) on 2015-09-15
- Alexandros Frantzis (community): Approve on 2015-09-15
- Daniel van Vugt: Needs Information on 2015-09-15
- Kevin DuBois (community): Approve on 2015-09-14
-
Diff: 20 lines (+8/-0)1 file modifiedtests/integration-tests/graphics/mesa/test_buffer_integration.cpp (+8/-0)
| Alan Griffiths (alan-griffiths) wrote : | #1 |
| Alan Griffiths (alan-griffiths) wrote : | #2 |
OK, it looks like selecting the X11 lib is the problem, not probing it...
$ LD_PRELOAD=
MIR_CLIENT_
MIR_SERVER_
LD_LIBRARY_
exec=bin/
Running main() from main.cpp
Note: Google Test filter = MesaBufferInteg
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from MesaBufferInteg
[ RUN ] MesaBufferInteg
Segmentation fault (core dumped)
| Alan Griffiths (alan-griffiths) wrote : | #3 |
For completeness:
$ LD_PRELOAD=
MIR_CLIENT_
MIR_SERVER_
LD_LIBRARY_
exec=bin/
Running main() from main.cpp
Note: Google Test filter = MesaBufferInteg
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from MesaBufferInteg
[ RUN ] MesaBufferInteg
[ OK ] MesaBufferInteg
[ RUN ] MesaBufferInteg
[ OK ] MesaBufferInteg
[ RUN ] MesaBufferInteg
[ OK ] MesaBufferInteg
[----------] 3 tests from MesaBufferInteg
[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (4 ms total)
[ PASSED ] 3 tests.
| Alan Griffiths (alan-griffiths) wrote : | #4 |
Hmm, there's no obvious reason for this test suite to be probing the graphics platform anyway.
| Alan Griffiths (alan-griffiths) wrote : | #5 |
Oh! It's the code to load platform specific config options.
| Alan Griffiths (alan-griffiths) wrote : | #6 |
Specifically, it is the following line that triggers the problem:
$ bzr diff
=== modified file 'src/platforms/
--- src/platforms/
+++ src/platforms/
@@ -66,7 +66,7 @@
{
config.
- boost::
+// boost::
}
| Changed in mir: | |
| milestone: | none → 0.16.0 |
| assignee: | nobody → Alan Griffiths (alan-griffiths) |
| status: | New → In Progress |
| importance: | Undecided → Medium |
| Alan Griffiths (alan-griffiths) wrote : | #7 |
In the test SetUp() we have the line:
auto options = mtf::TestingSer
There are two significant objects created here:
1. a temporary TestingServerCo
2. a named shared_ptr<Option>
the first is destroyed at the the end of the above statement, the second exists until the end of scope.
If we modify the code to name the TestingServerCo
This leads me to believe that setting the default value on the option (as mentioned above) is creating an object whose destructor is instantiated in the server-mesa-x11 module. (I'm not sure of the mechanism but, empirically, the library is unloaded by ~TestingServerC
| PS Jenkins bot (ps-jenkins) wrote : | #8 |
Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.16.0
| Changed in mir: | |
| status: | In Progress → Fix Committed |
| Changed in mir: | |
| status: | Fix Committed → Fix Released |
| Daniel van Vugt (vanvugt) wrote : | #9 |
mir (0.16.0+
| Changed in mir (Ubuntu): | |
| importance: | Undecided → Medium |
| status: | New → Fix Released |

Another workaround: specify the platform graphics library...
$ LD_PRELOAD= libumockdev- preload. so.0 bin/mir_ integration_ tests --gtest_ filter= MesaBufferInteg ration. * --platform- graphics- lib lib/server- modules/ graphics- dummy.so