Skip to content

Leave the demo performers without their teardown - #48

Merged
HanielUlises merged 2 commits into
rollingfrom
demo/leave-without-teardown
Sep 29, 2026
Merged

HanielUlises merged 2 commits into
rollingfrom
demo/leave-without-teardown

Conversation

@HanielUlises

Copy link
Copy Markdown
Collaborator

At the end of a mission, the launch file interrupts the demo performers. About one run in five then segfaulted after every action had finished (2 of 10 standalone interrupts). gdb puts the fault in the performer's destructor, run from main after rclcpp::shutdown(): CascadeLifecycleNode frees its activators_state_ map through a pointer that is no longer valid. No thread of the process is using the node at that point, only CycloneDDS's own.

The three demo performers now end through eplansys_demo::leave(), which shuts ROS down, flushes stdout and stderr, and leaves through _exit, skipping a teardown that has nothing left to do. plansys2_tests exits the same way for its own exit-time fault. The fault itself is in cascade_lifecycle, and fixing it there is a separate job.

Checked locally:

  • Interrupts: 30 of 30 standalone interrupts exit 0. Before the change, 2 of 10 exited 139.
  • Full demo: the two-site survey, serial and parallel, ends with every process finishing cleanly.
  • Lint: ament_cpplint and ament_uncrustify pass on the package.

@HanielUlises
HanielUlises merged commit 0c2bcce into rolling Sep 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant