Mir

Merge lp:~vanvugt/mir/libprotobuf-unlite into lp:mir

Proposed by Daniel van Vugt
Status: Work in progress
Proposed branch: lp:~vanvugt/mir/libprotobuf-unlite
Merge into: lp:mir
Diff against target: 127 lines (+16/-10)
9 files modified
debian/control (+1/-1)
debian/libmirprotobuf4.install (+1/-1)
src/client/mirclient.pc.in (+1/-1)
src/protobuf/CMakeLists.txt (+2/-2)
src/protobuf/mir_protobuf.proto (+3/-0)
src/protobuf/mir_protobuf_wire.proto (+3/-0)
tests/integration-tests/CMakeLists.txt (+1/-1)
tests/integration-tests/graphics/mesa/CMakeLists.txt (+2/-2)
tests/unit-tests/CMakeLists.txt (+2/-2)
To merge this branch: bzr merge lp:~vanvugt/mir/libprotobuf-unlite
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing
Alan Griffiths Needs Information
Review via email: mp+302252@code.launchpad.net

Commit message

Revert back to linking to libprotobuf instead of libprotobuf-lite.
Thankfully we don't have to change the classes we link to, but it
seems we do need to use the full libprotobuf library in order to
avoid it getting confused, corrupting the heap and crashing unity8
every time you log out. (LP: #1535297)

Consider this a semi-permanent workaround to stop the crash reports
from happening.

This change appears to be free from ABI and protocol breaks. Existing
clients/servers can still talk to the new clients/servers.

Description of the change

As well as hopefully stopping the crash reports, this might also
shrink our system footprint if we were the first/last users of
libprotobuf-lite.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3635
https://mir-jenkins.ubuntu.com/job/mir-ci/1405/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/1714/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/1767
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1758
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1758
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1758
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/1735/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1735
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1735/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1735
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1735/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1735/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1735/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1735/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1735
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1735/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1405/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

1. It would be better if we simply stopped loading libprotobuf-lite into global symbol space with "dlopen(info.dli_fname, RTLD_NOW | RTLD_NOLOAD | RTLD_GLOBAL);". I though Cemil was already working on that?

2. If any of the (current or future) Qt plugins use protobuf-lite then we'll see similar issues with this approach. Have we checked?

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I was going for a quick fix (and waiting to see if it works afterwards).

If anyone has a better alternative that might work, please do.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Deja vu:
    Protobuf-can-be-reloaded (SEGFAULT)
on vivid+overlay.

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3637
https://mir-jenkins.ubuntu.com/job/mir-ci/1415/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/1726/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/1779
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1770
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1770
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1770
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/1748/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1748
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/1748/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1748
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/1748/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1748
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/1748/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/1748/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1748
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/1748/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/1415/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It only crashes on vivid now. I'd guess that's possibly bug 1391976 regressing, and perhaps it was fixed upstream in protobuf in xenial and later.

But if the required fix isn't in vivid yet then we can't proceed with this.

Revision history for this message
Christopher Townsend (townsend) wrote :

Based on your last comment, does the Vivid crash occur on the phone? I thought this was a desktop only crash, and if that is still the case, then we don't care about supporting U8 desktop on Vivid.

If the crash does occur on the phone, then well, uh, ignore this comment:)

Unmerged revisions

3637. By Daniel van Vugt

Bump the libmirprotobuf ABI in one last clumsy effort to get
mir_test_reload_protobuf passing on vivid.

3636. By Daniel van Vugt

Merge latest trunk

3635. By Daniel van Vugt

Working

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-08-01 14:43:19 +0000
3+++ debian/control 2016-08-09 07:23:07 +0000
4@@ -52,7 +52,7 @@
5 # just go ahead. ~mir-team will notice and sync up the code again.
6 Vcs-Bzr: https://code.launchpad.net/mir
7
8-Package: libmirprotobuf3
9+Package: libmirprotobuf4
10 Section: libs
11 Architecture: linux-any
12 Multi-Arch: same
13
14=== renamed file 'debian/libmirprotobuf3.install' => 'debian/libmirprotobuf4.install'
15--- debian/libmirprotobuf3.install 2016-01-29 08:18:22 +0000
16+++ debian/libmirprotobuf4.install 2016-08-09 07:23:07 +0000
17@@ -1,1 +1,1 @@
18-usr/lib/*/libmirprotobuf.so.3
19+usr/lib/*/libmirprotobuf.so.4
20
21=== modified file 'src/client/mirclient.pc.in'
22--- src/client/mirclient.pc.in 2016-01-29 08:18:22 +0000
23+++ src/client/mirclient.pc.in 2016-08-09 07:23:07 +0000
24@@ -8,6 +8,6 @@
25 Name: mirclient
26 Description: Mir client library
27 Version: @MIR_VERSION@
28-Requires.private: protobuf-lite >= 2.4.1, mircookie
29+Requires.private: protobuf >= 2.4.1, mircookie
30 Libs: -L${libdir} -lmirclient -lmircommon
31 Cflags: -I${includedir} -I${common_includedir}
32
33=== modified file 'src/protobuf/CMakeLists.txt'
34--- src/protobuf/CMakeLists.txt 2016-08-04 16:49:58 +0000
35+++ src/protobuf/CMakeLists.txt 2016-08-09 07:23:07 +0000
36@@ -23,10 +23,10 @@
37
38 target_link_libraries(
39 mirprotobuf
40- ${PROTOBUF_LITE_LIBRARIES}
41+ ${PROTOBUF_LIBRARIES}
42 )
43
44-set(MIRPROTOBUF_ABI 3)
45+set(MIRPROTOBUF_ABI 4)
46
47 set_target_properties(
48 mirprotobuf
49
50=== modified file 'src/protobuf/mir_protobuf.proto'
51--- src/protobuf/mir_protobuf.proto 2016-06-21 21:31:05 +0000
52+++ src/protobuf/mir_protobuf.proto 2016-08-09 07:23:07 +0000
53@@ -1,3 +1,6 @@
54+// We wish to maintain support for protobuf-lite into the future even if we
55+// presently access the Lite classes via the full libprotobuf to work around
56+// crashes (LP: #1535297)
57 option optimize_for = LITE_RUNTIME;
58
59 package mir.protobuf;
60
61=== modified file 'src/protobuf/mir_protobuf_wire.proto'
62--- src/protobuf/mir_protobuf_wire.proto 2016-01-29 08:18:22 +0000
63+++ src/protobuf/mir_protobuf_wire.proto 2016-08-09 07:23:07 +0000
64@@ -1,3 +1,6 @@
65+// We wish to maintain support for protobuf-lite into the future even if we
66+// presently access the Lite classes via the full libprotobuf to work around
67+// crashes (LP: #1535297)
68 option optimize_for = LITE_RUNTIME;
69
70 package mir.protobuf.wire;
71
72=== modified file 'tests/integration-tests/CMakeLists.txt'
73--- tests/integration-tests/CMakeLists.txt 2016-08-01 07:24:32 +0000
74+++ tests/integration-tests/CMakeLists.txt 2016-08-09 07:23:07 +0000
75@@ -79,7 +79,7 @@
76
77 mircommon
78
79- ${PROTOBUF_LITE_LIBRARIES}
80+ ${PROTOBUF_LIBRARIES}
81 ${Boost_LIBRARIES}
82 ${GTEST_BOTH_LIBRARIES}
83 ${GMOCK_LIBRARY}
84
85=== modified file 'tests/integration-tests/graphics/mesa/CMakeLists.txt'
86--- tests/integration-tests/graphics/mesa/CMakeLists.txt 2016-08-01 07:24:32 +0000
87+++ tests/integration-tests/graphics/mesa/CMakeLists.txt 2016-08-09 07:23:07 +0000
88@@ -23,7 +23,7 @@
89 mirsharedmesaservercommon-static
90 mircommon
91
92- ${PROTOBUF_LITE_LIBRARIES}
93+ ${PROTOBUF_LIBRARIES}
94 # Mesa platform dependencies
95 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
96 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
97@@ -60,7 +60,7 @@
98 mirsharedmesaservercommon-static
99 mircommon
100
101- ${PROTOBUF_LITE_LIBRARIES}
102+ ${PROTOBUF_LIBRARIES}
103 # Mesa platform dependencies
104 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
105 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
106
107=== modified file 'tests/unit-tests/CMakeLists.txt'
108--- tests/unit-tests/CMakeLists.txt 2016-08-04 18:53:11 +0000
109+++ tests/unit-tests/CMakeLists.txt 2016-08-09 07:23:07 +0000
110@@ -139,7 +139,7 @@
111
112 mircommon
113
114- ${PROTOBUF_LITE_LIBRARIES}
115+ ${PROTOBUF_LIBRARIES}
116 ${GTEST_BOTH_LIBRARIES}
117 ${GMOCK_LIBRARY}
118 ${GMOCK_MAIN_LIBRARY}
119@@ -172,7 +172,7 @@
120 mir-test-static
121 mir-test-framework-static
122
123- ${PROTOBUF_LITE_LIBRARIES}
124+ ${PROTOBUF_LIBRARIES}
125 ${GTEST_BOTH_LIBRARIES}
126 ${GMOCK_LIBRARY}
127 ${GMOCK_MAIN_LIBRARY}

Subscribers

People subscribed via source and target branches