[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-11-24 Thread Daniel van Vugt
Good question. Alan seems to be on top of this problem. Maybe he can try to upstream the fix...? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619616 Title: Mir test fails with protobuf3:

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-11-24 Thread LocutusOfBorg
why this patch is not upstream? I don't see it in the google protobuf github repo https://github.com/google/protobuf/blob/master/src/google/protobuf/stubs/common.cc -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-15 Thread Launchpad Bug Tracker
This bug was fixed in the package protobuf - 3.0.0-7ubuntu3 --- protobuf (3.0.0-7ubuntu3) yakkety; urgency=medium [ Alan Griffiths ] * Fix reloading of the shared libraries with dlopen. LP: #1619616. -- Matthias Klose Thu, 08 Sep 2016 14:19:44 +0200 **

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-08 Thread Daniel van Vugt
protobuf (3.0.0-7ubuntu3) yakkety; urgency=medium [ Alan Griffiths ] * Fix reloading of the shared libraries with dlopen. LP: #1619616. -- Matthias Klose Thu, 08 Sep 2016 14:19:44 +0200 ** Changed in: protobuf (Ubuntu) Status: In Progress => Fix Committed -- You

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-08 Thread Alan Griffiths
Same patch as mentioned in #18 and #20 formatted better ** Attachment added: "my least bad solution" https://bugs.launchpad.net/ubuntu/+source/mir/+bug/1619616/+attachment/4736828/+files/fix-protobuf ** Changed in: mir Milestone: 0.25.0 => None ** Changed in: mir (Ubuntu) Milestone:

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-08 Thread Alan Griffiths
** Description changed: builds with 3.0.0-7, then has one failing test: test 19 Start 19: Protobuf-can-be-reloaded 19: Test command: /<>/mir-0.24.0+16.10.20160815.3/obj-powerpc64le-linux-gnu/bin/mir_test_reload_protobuf 19: Test timeout computed to be: 9.99988e+06 19/19

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-08 Thread Alan Griffiths
Hmm the library publishes a load of symbols that seem unnecessary at best: $ readelf -Ws /usr/local/lib/libprotobuf-lite.so | grep -v " UND " | grep -v 6google8protobuf | wc -l 123 2.6.1 seems far more reasonable: $ readelf -Ws /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9 | grep -v " UND "

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-08 Thread Alan Griffiths
Narrowing the problem: it isn't any of the Mir code, or the generated code, or explicit calls into libprotobuf-lite. The following program loads and unloads libprotobuf-lite.so from 2.6.1 successfully. With 3.0.0 it fails to unload. #include #include int main(int argc, char** argv) { char

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Daniel van Vugt
Invalid for the Mir project. Sounds like it's just another protobuf bug. Hopefully we won't need to workaround it in Mir, but that's not completely out of the question. Especially if protobuf3 hits distro without first getting fixed we won't have much choice. -- You received this bug

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Daniel van Vugt
** Changed in: mir Status: Confirmed => Invalid ** Changed in: mir (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619616 Title: Mir test fails

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
In any case, if protobuf choses to remain resident it is only polite to work when the startup/shutdown cycle is repeated. (And that's what the patch achieves.) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
This shows the problem, but not the underlying cause: $ gdb bin/mir_test_reload_protobufGNU gdb (Ubuntu 7.11.90.20160906-0ubuntu1) 7.11.90.20160906-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
The reason 2.6.1 works is that libprotobuf-lite-so.9 is unloaded each iteration. But with the move to 3.0.0 that no longer happens. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619616 Title: Mir

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
Oops. The patch in #18 is for google/protobuf/stubs/common.cc: 415d414 < shutdown_functions = new vector; 425a425,426 > if (internal::shutdown_functions == NULL) > shutdown_functions = new vector; 446,447d446 < delete internal::shutdown_functions_mutex; <

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
But I don't yet see how 2.6.1 avoided this issue. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619616 Title: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT) To manage

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
A simpler fix that removes the assumption that the shared library will be unloaded between uses ** Attachment added: "fix-protobuf" https://bugs.launchpad.net/ubuntu/+source/mir/+bug/1619616/+attachment/4736108/+files/fix-protobuf -- You received this bug notification because you are a

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-07 Thread Alan Griffiths
OK, I have rebuild laptop and have a less flaky system. This (updated) patch is only a proof-of-concept as it clearly leaks resources on program exit in this form. OTOH it does make the Mir test pass, so I have found the right problem. ** Attachment added: "fix-protobuf"

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-06 Thread Alan Griffiths
I'm very suspicious of my laptop running yakkety - even with "proposed" purged it is now crashing every few minutes (which makes keeping track of things a PITA). The root cause is probably a failure in protobuf to re-initalise static data when clients call

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-06 Thread Alan Griffiths
There was a hack put into Mir around the end of June 2015 as linked by Daniel (https://code.launchpad.net/~vanvugt/mir/fix-1391976/+merge/262678). As the comment suggests this was pending "a proper fix will come from libprotobuf itself but this way we don't need to wait for that". This "hack" was

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Daniel van Vugt
Two problems with that statement: (1) That's just a test and not a fix or workaround; and (2) It's for Mir, not to be "applied in the protobuf package". The relevant workaround for Mir is actually: https://code.launchpad.net/~vanvugt/mir/fix-1391976/+merge/262678 but we'll hold off

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Matthias Klose
hmm, and the hack found in lp:~vanvugt/mir/test-1391976/+merge/262669 was never applied in the protobuf package, if you look at protobuf's publishing history at https://launchpad.net/ubuntu/+source/protobuf/+publishinghistory -- You received this bug notification because you are a member of

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Matthias Klose
the test still fails when built using protobuf 3.0.0-7ubuntu2 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619616 Title: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT) To

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Alan Griffiths
Patch for the correct branch ** Attachment added: "fix-protobuf" https://bugs.launchpad.net/ubuntu/+source/mir/+bug/1619616/+attachment/4734930/+files/fix-protobuf -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Alan Griffiths
Ooops!! that's based on the wrong branch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619616 Title: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT) To manage notifications

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Alan Griffiths
Here's the fix to +branch/ubuntu/wily-proposed/protobuf/ that fixes the problem with reloading modules that depend on protobuf. ** Attachment added: "Forward port fix from protobuf 2.6" https://bugs.launchpad.net/ubuntu/+source/mir/+bug/1619616/+attachment/4734807/+files/fix-protobuf -- You

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Daniel van Vugt
** Changed in: mir Assignee: (unassigned) => Alan Griffiths (alan-griffiths) ** Changed in: mir Status: New => In Progress ** Also affects: protobuf (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs,

[Bug 1619616] Re: Mir test fails with protobuf3: Protobuf-can-be-reloaded (SEGFAULT)

2016-09-05 Thread Alan Griffiths
It looks very much as though protobuf3 reverts this change: $ bzr log -c 295 lp:protobuf I've not yet proved that's the whole problem, but it would explain it. ** Changed in: mir (Ubuntu) Assignee: (unassigned) => Alan Griffiths (alan-griffiths) -- You received this bug notification