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
=== modified file 'debian/control'
--- debian/control 2016-08-01 14:43:19 +0000
+++ debian/control 2016-08-09 07:23:07 +0000
@@ -52,7 +52,7 @@
52# just go ahead. ~mir-team will notice and sync up the code again.52# just go ahead. ~mir-team will notice and sync up the code again.
53Vcs-Bzr: https://code.launchpad.net/mir53Vcs-Bzr: https://code.launchpad.net/mir
5454
55Package: libmirprotobuf355Package: libmirprotobuf4
56Section: libs56Section: libs
57Architecture: linux-any57Architecture: linux-any
58Multi-Arch: same58Multi-Arch: same
5959
=== renamed file 'debian/libmirprotobuf3.install' => 'debian/libmirprotobuf4.install'
--- debian/libmirprotobuf3.install 2016-01-29 08:18:22 +0000
+++ debian/libmirprotobuf4.install 2016-08-09 07:23:07 +0000
@@ -1,1 +1,1 @@
1usr/lib/*/libmirprotobuf.so.31usr/lib/*/libmirprotobuf.so.4
22
=== modified file 'src/client/mirclient.pc.in'
--- src/client/mirclient.pc.in 2016-01-29 08:18:22 +0000
+++ src/client/mirclient.pc.in 2016-08-09 07:23:07 +0000
@@ -8,6 +8,6 @@
8Name: mirclient8Name: mirclient
9Description: Mir client library9Description: Mir client library
10Version: @MIR_VERSION@10Version: @MIR_VERSION@
11Requires.private: protobuf-lite >= 2.4.1, mircookie11Requires.private: protobuf >= 2.4.1, mircookie
12Libs: -L${libdir} -lmirclient -lmircommon12Libs: -L${libdir} -lmirclient -lmircommon
13Cflags: -I${includedir} -I${common_includedir} 13Cflags: -I${includedir} -I${common_includedir}
1414
=== modified file 'src/protobuf/CMakeLists.txt'
--- src/protobuf/CMakeLists.txt 2016-08-04 16:49:58 +0000
+++ src/protobuf/CMakeLists.txt 2016-08-09 07:23:07 +0000
@@ -23,10 +23,10 @@
2323
24target_link_libraries(24target_link_libraries(
25 mirprotobuf25 mirprotobuf
26 ${PROTOBUF_LITE_LIBRARIES}26 ${PROTOBUF_LIBRARIES}
27)27)
2828
29set(MIRPROTOBUF_ABI 3)29set(MIRPROTOBUF_ABI 4)
3030
31set_target_properties(31set_target_properties(
32 mirprotobuf32 mirprotobuf
3333
=== modified file 'src/protobuf/mir_protobuf.proto'
--- src/protobuf/mir_protobuf.proto 2016-06-21 21:31:05 +0000
+++ src/protobuf/mir_protobuf.proto 2016-08-09 07:23:07 +0000
@@ -1,3 +1,6 @@
1// We wish to maintain support for protobuf-lite into the future even if we
2// presently access the Lite classes via the full libprotobuf to work around
3// crashes (LP: #1535297)
1option optimize_for = LITE_RUNTIME;4option optimize_for = LITE_RUNTIME;
25
3package mir.protobuf;6package mir.protobuf;
47
=== modified file 'src/protobuf/mir_protobuf_wire.proto'
--- src/protobuf/mir_protobuf_wire.proto 2016-01-29 08:18:22 +0000
+++ src/protobuf/mir_protobuf_wire.proto 2016-08-09 07:23:07 +0000
@@ -1,3 +1,6 @@
1// We wish to maintain support for protobuf-lite into the future even if we
2// presently access the Lite classes via the full libprotobuf to work around
3// crashes (LP: #1535297)
1option optimize_for = LITE_RUNTIME;4option optimize_for = LITE_RUNTIME;
25
3package mir.protobuf.wire;6package mir.protobuf.wire;
47
=== modified file 'tests/integration-tests/CMakeLists.txt'
--- tests/integration-tests/CMakeLists.txt 2016-08-01 07:24:32 +0000
+++ tests/integration-tests/CMakeLists.txt 2016-08-09 07:23:07 +0000
@@ -79,7 +79,7 @@
7979
80 mircommon80 mircommon
8181
82 ${PROTOBUF_LITE_LIBRARIES}82 ${PROTOBUF_LIBRARIES}
83 ${Boost_LIBRARIES}83 ${Boost_LIBRARIES}
84 ${GTEST_BOTH_LIBRARIES}84 ${GTEST_BOTH_LIBRARIES}
85 ${GMOCK_LIBRARY}85 ${GMOCK_LIBRARY}
8686
=== modified file 'tests/integration-tests/graphics/mesa/CMakeLists.txt'
--- tests/integration-tests/graphics/mesa/CMakeLists.txt 2016-08-01 07:24:32 +0000
+++ tests/integration-tests/graphics/mesa/CMakeLists.txt 2016-08-09 07:23:07 +0000
@@ -23,7 +23,7 @@
23 mirsharedmesaservercommon-static23 mirsharedmesaservercommon-static
24 mircommon24 mircommon
2525
26 ${PROTOBUF_LITE_LIBRARIES}26 ${PROTOBUF_LIBRARIES}
27 # Mesa platform dependencies27 # Mesa platform dependencies
28 ${DRM_LDFLAGS} ${DRM_LIBRARIES}28 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
29 ${GBM_LDFLAGS} ${GBM_LIBRARIES}29 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
@@ -60,7 +60,7 @@
60 mirsharedmesaservercommon-static60 mirsharedmesaservercommon-static
61 mircommon61 mircommon
6262
63 ${PROTOBUF_LITE_LIBRARIES}63 ${PROTOBUF_LIBRARIES}
64 # Mesa platform dependencies64 # Mesa platform dependencies
65 ${DRM_LDFLAGS} ${DRM_LIBRARIES}65 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
66 ${GBM_LDFLAGS} ${GBM_LIBRARIES}66 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
6767
=== modified file 'tests/unit-tests/CMakeLists.txt'
--- tests/unit-tests/CMakeLists.txt 2016-08-04 18:53:11 +0000
+++ tests/unit-tests/CMakeLists.txt 2016-08-09 07:23:07 +0000
@@ -139,7 +139,7 @@
139139
140 mircommon140 mircommon
141141
142 ${PROTOBUF_LITE_LIBRARIES}142 ${PROTOBUF_LIBRARIES}
143 ${GTEST_BOTH_LIBRARIES}143 ${GTEST_BOTH_LIBRARIES}
144 ${GMOCK_LIBRARY}144 ${GMOCK_LIBRARY}
145 ${GMOCK_MAIN_LIBRARY}145 ${GMOCK_MAIN_LIBRARY}
@@ -172,7 +172,7 @@
172 mir-test-static172 mir-test-static
173 mir-test-framework-static173 mir-test-framework-static
174174
175 ${PROTOBUF_LITE_LIBRARIES}175 ${PROTOBUF_LIBRARIES}
176 ${GTEST_BOTH_LIBRARIES}176 ${GTEST_BOTH_LIBRARIES}
177 ${GMOCK_LIBRARY}177 ${GMOCK_LIBRARY}
178 ${GMOCK_MAIN_LIBRARY}178 ${GMOCK_MAIN_LIBRARY}

Subscribers

People subscribed via source and target branches