Merge lp:~alan-griffiths/mir/fix-1488500 into lp:mir
| Status: | Merged |
|---|---|
| Approved by: | Alan Griffiths on 2015-08-28 |
| Approved revision: | 2882 |
| Merged at revision: | 2887 |
| Proposed branch: | lp:~alan-griffiths/mir/fix-1488500 |
| Merge into: | lp:mir |
| Diff against target: |
80 lines (+39/-15) 1 file modified
src/common/sharedlibrary/shared_library_prober.cpp (+39/-15) |
| To merge this branch: | bzr merge lp:~alan-griffiths/mir/fix-1488500 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Approve on 2015-08-28 | |
| Daniel van Vugt | 2015-08-26 | Approve on 2015-08-28 | |
| Alexandros Frantzis (community) | Approve on 2015-08-27 | ||
|
Review via email:
|
|||
Commit Message
Try the newest versions of client graphics platform module ".so"s first.
(LP: #1488500)
Description of the Change
Try the newest versions of client graphics platform module ".so"s first.
As well as being efficient, this is because if we attempt to load functions from mesa.so.2 before those from mesa.so.3 we get a segfault.
| Daniel van Vugt (vanvugt) wrote : | # |
I think newest first is still overcomplicated and makes the system unreliable because the fallback to older ABIs likely will break, even crash. When we break ABIs we don't imply any compatibility between them. We should be trying newest only, instead of newest first...
Given that:
set(
Mir should only try to load:
lib/
Or it should load * and be able to query the ABI level internally. Only accepting a perfect match for MIR_CLIENT_
A better file naming scheme would also help, but that can come later.
| Alexandros Frantzis (afrantzis) wrote : | # |
> As well as being efficient, this is because if we attempt to load functions from
> mesa.so.2 before those from mesa.so.3 we get a segfault.
Why does this happen? Is there a way to fix this at its core, instead of working around it?
| Alan Griffiths (alan-griffiths) wrote : | # |
Daniel:
We load versioned symbols, so loading from a driver that doesn't support the correct version fails and we don't ever call incompatible code. This isn't about ABI breaks, it is about something odd that our mesa driver does (see response to Alexandros below for my current guess).
Enforcing that the library is numbered for the ABI version would prevent a driver module exporting symbols for multiple versions. We don't do that currently but it could conceivably be a useful hack.
Alexandros:
You're right, I haven't root caused this yet. But the MP avoids an embarrassing problem while reducing the chance that we try to load symbols from an obsolete module.
I suspect the problem is caused by the ensure_
It is too late to fix that in mesa.so.2 even if I knew how.
| Alexandros Frantzis (afrantzis) wrote : | # |
Two issues/questions:
Do we know if the older to newer load order important for this bug to occur, or could it be caused by just loading two mesa modules in the future regardless of order?
If it's the latter, then the proposed solution is problematic, since in the future a server that needs to use an older mesa platform will run into the same segfault (e.g., server needs 4, loads mesa.so.5 first, then mesa.so.4).
30 + return atoi(++lhbuf) > atoi(++rhbuf);
Better to use strtol() that's guaranteed to have well defined behavior for all inputs strings.
Needs info/fixing
| Alan Griffiths (alan-griffiths) wrote : | # |
Yes, I would expect there to be a problem with a server that wanted the older mesa module.
But, while we release updates to all downstream servers with each Mir release, that is less bad than the current situation.
| Alexandros Frantzis (afrantzis) wrote : | # |
OK as a quick (and temporary?) workaround, as long as we are aware that we will probably come across this problem again in some form (e.g. using an older server/platform installed in parallel with newer ones) in the future.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2882
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://

PASSED: Continuous integration, rev:2880 jenkins. qa.ubuntu. com/job/ mir-ci/ 4679/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/3675 s-jenkins. ubuntu- ci:8080/ job/mir- clang-ts- vivid-amd64- build/96 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/2586 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/3625 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 828 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 828/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3625 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3625/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/6394 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 22827
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/4679/ rebuild
http://