Loading libmirclient.so twice leads to a segfault in libmirprotobuf.so
Bug #1391976 reported by
Alexandros Frantzis
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Daniel van Vugt | ||
0.14 |
Fix Released
|
High
|
Daniel van Vugt | ||
mir (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Can be reproduced with: load_twice libmircommon.so.1 (or .2)
For recent versions of mir use: load_twice libmirclient.so.X (currently .8)
load_twice.c:
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char** argv)
{
void *dl;
int i;
for (i = 0; i < 2; i++)
{
dl = dlopen (argv[1], RTLD_LAZY);
printf ("%d open dl: %p\n", i, dl);
if (dl)
dlclose (dl);
}
}
Related branches
lp://staging/~vanvugt/mir/test-1391976
- PS Jenkins bot (community): Approve (continuous-integration)
- Kevin DuBois (community): Approve
- Alexandros Frantzis (community): Approve
-
Diff: 117 lines (+85/-0)4 files modifieddebian/mir-test-tools.install (+1/-0)
tests/CMakeLists.txt (+1/-0)
tests/loader-tests/CMakeLists.txt (+34/-0)
tests/loader-tests/test_reload.c (+49/-0)
lp://staging/~vanvugt/mir/fix-1391976
- PS Jenkins bot (community): Approve (continuous-integration)
- Robert Carr (community): Approve
- Kevin DuBois (community): Approve
- Alexandros Frantzis (community): Approve
-
Diff: 54 lines (+13/-5)3 files modifiedsrc/protobuf/CMakeLists.txt (+1/-1)
src/protobuf/google_protobuf_guard.cpp (+9/-0)
tests/loader-tests/CMakeLists.txt (+3/-4)
lp://staging/~vanvugt/mir/fix-1391976-0.14
- Andreas Pokorny (community): Approve
- Kevin DuBois (community): Approve
-
Diff: 169 lines (+96/-1)7 files modifieddebian/changelog (+2/-0)
debian/mir-test-tools.install (+1/-0)
src/protobuf/CMakeLists.txt (+1/-1)
src/protobuf/google_protobuf_guard.cpp (+9/-0)
tests/CMakeLists.txt (+1/-0)
tests/loader-tests/CMakeLists.txt (+33/-0)
tests/loader-tests/test_reload.c (+49/-0)
Changed in mir: | |
status: | New → Confirmed |
summary: |
- Loading libmircommon.so twice leads to a segfault in protobuf code + Loading libmircommon.so twice leads to a segfault in libprotobuf.so |
Changed in mir (Ubuntu): | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in mir: | |
assignee: | Alexandros Frantzis (afrantzis) → Daniel van Vugt (vanvugt) |
milestone: | none → 0.14.0 |
status: | Triaged → In Progress |
Changed in mir: | |
milestone: | 0.14.0 → 0.15.0 |
Changed in mir: | |
status: | Fix Committed → In Progress |
Changed in mir: | |
status: | In Progress → Fix Committed |
Changed in mir: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Is it a use case we need to worry about right now? We already know the singleton init logic in protobuf is troublesome. That's why it got separated out of mircommon for Mir 0.9.
Obviously with a single driver loaded we have no issues (yet). But multi-driver support in future would probably hit this. Is there any more realistic use case that will trigger it?