[jira] [Commented] (MESOS-6658) Mesos tests generated with cmake build fail to unload libraries properly
[ https://issues.apache.org/jira/browse/MESOS-6658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748851#comment-15748851 ] Benjamin Bannier commented on MESOS-6658: - Not sure if you got any closer to a proper solution [~kaysoky], in the end the whole schlamassel seems to be due to a combination of destructors being called too late and dynamically loaded libraries. I posted a possible fix [here|https://reviews.apache.org/r/54753/], should we go from there with you as shepherd? > Mesos tests generated with cmake build fail to unload libraries properly > > > Key: MESOS-6658 > URL: https://issues.apache.org/jira/browse/MESOS-6658 > Project: Mesos > Issue Type: Bug > Components: cmake, tests >Affects Versions: 1.2.0 >Reporter: Benjamin Bannier >Assignee: Joseph Wu > Labels: mesosphere > > A default cmake build created from {{ec0546e}} creates a {{mesos-tests}} > which cannot unload dependency without an error, > {code} > $ ./src/mesos-tests --gtest_filter='' > Source directory: /vagrant > Build directory: /home/vagrant/mesos > Note: Google Test filter = > [==] Running 0 tests from 0 test cases. > [==] 0 tests from 0 test cases ran. (0 ms total) > [ PASSED ] 0 tests. > Inconsistency detected by ld.so: dl-close.c: 762: _dl_close: Assertion > `map->l_init_called' failed! > {code} > This problem appears e.g., ubuntu-14.04 with cmake-2.8.12, but also on > debian-8, or ubuntu-16. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-6658) Mesos tests generated with cmake build fail to unload libraries properly
[ https://issues.apache.org/jira/browse/MESOS-6658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15715470#comment-15715470 ] Benjamin Bannier commented on MESOS-6658: - One crucial difference between the cmake and the autotools build is that the autotools build explicitly requests {{-Wl,--as-needed}} under Linux, while the cmake build just inherits the default behavior of the linker. AFAIK e.g., Fedora enable {{-Wl,--as-needed}} systemwide and by default, while e.g., Debian-based distros (Debian & Ubuntu) do not. This seems to nicely overlap with were these bad binaries are created. To test this out I added {{-Wl,--as-needed}} to the {{CMAKE_SHARED_LINKER_FLAGS}} on a ubuntu-14 host, and was indeed able to unload a {{src/mesos-tests}} created with the cmake setup successfully. I am not sure this is a problem in the cmake build; it seems more that the autotools build explicitly masks a problem, and we see that only in the cmake build which didn't behave identical. It seems desirable to have the build produce good binaries no matter whether {{-Wl,--as-needed}} was used or not, as e.g., some systems use versions of {{ld}} which overeagerly might drop even required dependencies (e.g., in cases where dependencies do not model their own dependencies correctly). > Mesos tests generated with cmake build fail to unload libraries properly > > > Key: MESOS-6658 > URL: https://issues.apache.org/jira/browse/MESOS-6658 > Project: Mesos > Issue Type: Bug > Components: cmake, tests >Affects Versions: 1.2.0 >Reporter: Benjamin Bannier >Assignee: Joseph Wu > Labels: mesosphere > > A default cmake build created from {{ec0546e}} creates a {{mesos-tests}} > which cannot unload dependency without an error, > {code} > $ ./src/mesos-tests --gtest_filter='' > Source directory: /vagrant > Build directory: /home/vagrant/mesos > Note: Google Test filter = > [==] Running 0 tests from 0 test cases. > [==] 0 tests from 0 test cases ran. (0 ms total) > [ PASSED ] 0 tests. > Inconsistency detected by ld.so: dl-close.c: 762: _dl_close: Assertion > `map->l_init_called' failed! > {code} > This problem appears e.g., ubuntu-14.04 with cmake-2.8.12, but also on > debian-8, or ubuntu-16. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-6658) Mesos tests generated with cmake build fail to unload libraries properly
[ https://issues.apache.org/jira/browse/MESOS-6658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15715447#comment-15715447 ] Benjamin Bannier commented on MESOS-6658: - FWIW, a patch to make {{DynamicLibrary}} safer to use (i.e., disabling copy, and move ctr) is here: https://issues.apache.org/jira/browse/MESOS-6672. > Mesos tests generated with cmake build fail to unload libraries properly > > > Key: MESOS-6658 > URL: https://issues.apache.org/jira/browse/MESOS-6658 > Project: Mesos > Issue Type: Bug > Components: cmake, tests >Affects Versions: 1.2.0 >Reporter: Benjamin Bannier >Assignee: Joseph Wu > Labels: mesosphere > > A default cmake build created from {{ec0546e}} creates a {{mesos-tests}} > which cannot unload dependency without an error, > {code} > $ ./src/mesos-tests --gtest_filter='' > Source directory: /vagrant > Build directory: /home/vagrant/mesos > Note: Google Test filter = > [==] Running 0 tests from 0 test cases. > [==] 0 tests from 0 test cases ran. (0 ms total) > [ PASSED ] 0 tests. > Inconsistency detected by ld.so: dl-close.c: 762: _dl_close: Assertion > `map->l_init_called' failed! > {code} > This problem appears e.g., ubuntu-14.04 with cmake-2.8.12, but also on > debian-8, or ubuntu-16. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-6658) Mesos tests generated with cmake build fail to unload libraries properly
[ https://issues.apache.org/jira/browse/MESOS-6658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15712936#comment-15712936 ] Benjamin Bannier commented on MESOS-6658: - Added a move ctr and move assignment operator to {{Owned}}, and then {{std::move}}'ing the {{Owned}} into the storage map inside the body of {{ModuleManager::loadManifest}} was not enough to make this problem go away. It might be worthwhile to look into related upstream issues such as e.g., https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60731 or https://sourceware.org/bugzilla/show_bug.cgi?id=17833 (there are more). > Mesos tests generated with cmake build fail to unload libraries properly > > > Key: MESOS-6658 > URL: https://issues.apache.org/jira/browse/MESOS-6658 > Project: Mesos > Issue Type: Bug > Components: cmake, tests >Affects Versions: 1.2.0 >Reporter: Benjamin Bannier >Assignee: Joseph Wu > Labels: mesosphere > > A default cmake build created from {{ec0546e}} creates a {{mesos-tests}} > which cannot unload dependency without an error, > {code} > $ ./src/mesos-tests --gtest_filter='' > Source directory: /vagrant > Build directory: /home/vagrant/mesos > Note: Google Test filter = > [==] Running 0 tests from 0 test cases. > [==] 0 tests from 0 test cases ran. (0 ms total) > [ PASSED ] 0 tests. > Inconsistency detected by ld.so: dl-close.c: 762: _dl_close: Assertion > `map->l_init_called' failed! > {code} > This problem appears e.g., ubuntu-14.04 with cmake-2.8.12, but also on > debian-8, or ubuntu-16. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-6658) Mesos tests generated with cmake build fail to unload libraries properly
[ https://issues.apache.org/jira/browse/MESOS-6658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15712623#comment-15712623 ] Benjamin Bannier commented on MESOS-6658: - This error appears when when unloading {{libtestanonymous.so}}. A verbose run showing unloading progression: {code} $ LD_DEBUG=files ./src/mesos-tests --gtest_filter='' 4467: 4467: file=libmesos-1.2.0.so.0 [0]; needed by ./src/mesos-tests [0] 4467: file=libmesos-1.2.0.so.0 [0]; generating link map 4467: dynamic: 0x7f563f66c4e8 base: 0x7f563dd0 size: 0x0199fe18 4467: entry: 0x7f563e557a50 phdr: 0x7f563dd00040 phnum: 8 4467: 4467: 4467: file=libprocess-0.0.1.so.0 [0]; needed by ./src/mesos-tests [0] 4467: file=libprocess-0.0.1.so.0 [0]; generating link map 4467: dynamic: 0x7f563dcf8098 base: 0x7f563d848000 size: 0x004b7528 4467: entry: 0x7f563d9374f0 phdr: 0x7f563d848040 phnum: 8 4467: 4467: 4467: file=libload_qos_controller.so [0]; needed by ./src/mesos-tests [0] 4467: file=libload_qos_controller.so [0]; generating link map 4467: dynamic: 0x7f563d846a38 base: 0x7f563d621000 size: 0x00226680 4467: entry: 0x7f563d633e80 phdr: 0x7f563d621040 phnum: 7 4467: 4467: 4467: file=libmesos-protobufs.so [0]; needed by ./src/mesos-tests [0] 4467: file=libmesos-protobufs.so [0]; generating link map 4467: dynamic: 0x7f563d60c0b0 base: 0x7f563cd57000 size: 0x008c9bb0 4467: entry: 0x7f563cfd43f0 phdr: 0x7f563cd57040 phnum: 7 4467: 4467: 4467: file=libglog.so.0 [0]; needed by ./src/mesos-tests [0] 4467: file=libglog.so.0 [0]; generating link map 4467: dynamic: 0x7f563cd45c18 base: 0x7f563cb28000 size: 0x0022e760 4467: entry: 0x7f563cb31810 phdr: 0x7f563cb28040 phnum: 7 4467: 4467: 4467: file=libprotobuf.so.9 [0]; needed by ./src/mesos-tests [0] 4467: file=libprotobuf.so.9 [0]; generating link map 4467: dynamic: 0x7f563cb24810 base: 0x7f563c815000 size: 0x003128f0 4467: entry: 0x7f563c868650 phdr: 0x7f563c815040 phnum: 7 4467: 4467: 4467: file=libdl.so.2 [0]; needed by ./src/mesos-tests [0] 4467: file=libdl.so.2 [0]; generating link map 4467: dynamic: 0x7f563c813d88 base: 0x7f563c611000 size: 0x00203130 4467: entry: 0x7f563c611ed0 phdr: 0x7f563c611040 phnum: 9 4467: 4467: 4467: file=librt.so.1 [0]; needed by ./src/mesos-tests [0] 4467: file=librt.so.1 [0]; generating link map 4467: dynamic: 0x7f563c60fd70 base: 0x7f563c409000 size: 0x00207c78 4467: entry: 0x7f563c40b350 phdr: 0x7f563c409040 phnum: 9 4467: 4467: 4467: file=libpthread.so.0 [0]; needed by ./src/mesos-tests [0] 4467: file=libpthread.so.0 [0]; generating link map 4467: dynamic: 0x7f563c403d50 base: 0x7f563c1eb000 size: 0x0021d530 4467: entry: 0x7f563c1f1f70 phdr: 0x7f563c1eb040 phnum: 9 4467: 4467: 4467: file=libstdc++.so.6 [0]; needed by ./src/mesos-tests [0] 4467: file=libstdc++.so.6 [0]; generating link map 4467: dynamic: 0x7f563c1d34f8 base: 0x7f563bee7000 size: 0x00303400 4467: entry: 0x7f563bf42620 phdr: 0x7f563bee7040 phnum: 8 4467: 4467: 4467: file=libm.so.6 [0]; needed by ./src/mesos-tests [0] 4467: file=libm.so.6 [0]; generating link map 4467: dynamic: 0x7f563bee5da8 base: 0x7f563bbe1000 size: 0x00305168 4467: entry: 0x7f563bbe6610 phdr: 0x7f563bbe1040 phnum: 9 4467: 4467: 4467: file=libgcc_s.so.1 [0]; needed by ./src/mesos-tests [0] 4467: file=libgcc_s.so.1 [0]; generating link map 4467: dynamic: 0x7f563bbe04b0 base: 0x7f563b9cb000 size: 0x00215b20 4467: entry: 0x7f563b9cdab0 phdr: 0x7f563b9cb040 phnum: 6 4467: 4467: 4467: file=libc.so.6 [0]; needed by ./src/mesos-tests [0] 4467: