Skip to content

Use RTLD_NODELETE=true when loading libraries #1649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SystemLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class gz::sim::SystemLoaderPrivate
}
}

auto pluginNames = this->loader.LoadLib(pathToLib);
auto pluginNames = this->loader.LoadLib(pathToLib, true);
if (pluginNames.empty())
{
gzerr << "Failed to load system plugin [" << filename <<
Expand Down
4 changes: 1 addition & 3 deletions src/gui/Gui_clean_exit_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ void startBoth(const std::string &_fileName)
}

/////////////////////////////////////////////////
/// TODO (azeey) Temporarliy disabled until
/// https://github.com/gazebosim/gz-sim/issues/1443 is resolved
TEST_P(GazeboDeathTest, DISABLED_CleanExit)
TEST_P(GazeboDeathTest, CleanExit)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is failing on all platforms 😕

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is using nightlies of plugin2, but not of gui7 yet, let me trigger some:

  • Build Status
  • Build Status

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, now it passes on Ubuntu, but it's failing on macOS:

61: [ RUN      ] WorldFiles/GazeboDeathTest.CleanExit/0
61: 
61: [WARNING] /Users/jenkins/workspace/ignition_gazebo-ci-pr_any-homebrew-amd64/ign-gazebo/test/gtest_vendor/src/gtest-death-test.cc:1108:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test detected 3 threads. See https://github.com/google/googletest/blob/master/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.
61: /Users/jenkins/workspace/ignition_gazebo-ci-pr_any-homebrew-amd64/ign-gazebo/src/gui/Gui_clean_exit_TEST.cc:97: Failure
61: Death test: startBoth(sdfFile)
61:     Result: died but not with expected exit code:
61:             Terminated by signal 11
61: Actual msg:
61: [  DEATH   ] The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
61: [  DEATH   ] Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
61: [  DEATH   ] 
61: [  FAILED  ] WorldFiles/GazeboDeathTest.CleanExit/0, where GetParam() = "empty.sdf" (50 ms)

Windows is also failing, but it doesn't even find the shared libraries.

I'm going to disable the test for macOS and Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also only enabled on Linux in Fortress, so thanks for making the change in f0c2c27

{
std::string githubAction;
// This test hangs when there is high CPU usage, so we skip it on Github
Expand Down