-
Notifications
You must be signed in to change notification settings - Fork 295
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
Use RTLD_NODELETE=true when loading libraries #1649
Conversation
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@osrf-jenkins run tests please |
src/gui/Gui_clean_exit_TEST.cc
Outdated
/// TODO (azeey) Temporarliy disabled until | ||
/// https://github.com/gazebosim/gz-sim/issues/1443 is resolved | ||
TEST_P(GazeboDeathTest, DISABLED_CleanExit) | ||
TEST_P(GazeboDeathTest, CleanExit) |
There was a problem hiding this comment.
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 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## gz-sim7 #1649 +/- ##
========================================
Coverage 63.90% 63.90%
========================================
Files 334 334
Lines 26344 26344
========================================
Hits 16836 16836
Misses 9508 9508
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Fixes (Potentially): #806
Summary
Gazebo Garden crashes at exit because the destructor for an
EventT
object created by a gui plugin is accesses after the plugin is unloaded. For that particular crash, the plugin in question is in gz-gui, so I've submitted a fix there (gazebosim/gz-gui#469). This PR is proactively usingRTLD_NODELETE
to prevent future bugs of this nature.I believe this might also fix #806 because if the shared libraries never get deleted, when a plugin goes through a load--unload--load cycle, the components (more specifically, the vtable of the components) it registers will be located in the same memory address. This was not the case before, which I think was the culprit for many of the flakiness in macOS.
More context:
Requires:
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.