Skip to content
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

Possible race condition when shutting down #274

Open
urfeex opened this issue Feb 24, 2025 · 0 comments
Open

Possible race condition when shutting down #274

urfeex opened this issue Feb 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@urfeex
Copy link
Member

urfeex commented Feb 24, 2025

During testing #229 I noticed that at least on Windows a lot of the integration tests segfault, when shutting down. I traced it down that the access to the RTDE's DataPackage's static g_type_list gets destructed before the communication is shutdown / the other objects are destroyed. This leads to a segfault in

if (g_type_list.find(item) != g_type_list.end())

which is executed for an incoming package while the type list doesn't exist anymore.

To reproduce this, e.g. run the SplineInterpolation integration tests. The tests may succeed, but when shutting down the tests it segfaults

Possible mitigation:

  • destroying the RobotWrapper object in TearDownTestSuite seems to bypass that problem. That seems like a workaround, however.
  • Have the lookup table in another form than the static member map
  • Refactor dataflow. Why do we need to create the package structure for every parsing operation? It should be enough to initialize the structure once and re-use that package.
@urfeex urfeex added the bug Something isn't working label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant