-
Notifications
You must be signed in to change notification settings - Fork 15
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
Terminate lrauv-application cleanly #4
Comments
Here's a related upstream issue: gazebosim/gz-transport#101 |
Wow, I think that issue was forgotten, because it never came up when we first looked into the issue. |
I spent some time looking into it today. Not getting rid of the singleton completely, but tried to add a helper function to terminate all threads. After a couple hours I gave up 🙃 |
Thanks for sharing and taking a look. I also tried creating the transport context on the heap and actively deleting in the destructor. That didn't work. The next thing I'd like to verify is if the issue happens when we only have one transport instance in the app - one thing we could try is creating a transport singleton in the application with accessor functions like we do with our LCM instance. |
This issue is resolved following the removal of |
Expected behavior
lrauv-application should terminate cleanly on
exit
orquit
commands.Actual behavior
Currently, the lrauv-application does not terminate cleanly when running with Ignition. This only happens when running with Ignition.
When
quit
orexit
is issued, the command prompt hangs:Ctrl+C is needed to terminate the program.
Initial investigation found that ign-transport has a singleton node that is not meant to be terminated, and the destructors are clean.
There could be a mismatch in expectations, where ign-transport does not intend to terminate, but the lrauv-application's tear-down procedure expects all threads to terminate and waits for the ign-transport thread to merge, which never happens.
Who even cares
Clean termination is useful for automated tests such as in osrf/lrauv_private#82, which are currently force-terminating the program.
It is also useful to know when all the log files are written and closed properly, which is guaranteed on a clean termination.
Suggestions of how to start
@caguero and @braanan know better where exactly the lines are in the code in ign-transport and lrauv-application, respectively.
The text was updated successfully, but these errors were encountered: