Skip to content

Actions (particularly ExecuteProcess) exist indefinitely #565

Description

@joncppl

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • both
  • Version or commit hash:
    • foxy
  • DDS implementation:
    • fastrtps
  • Client library (if applicable):
    • launch

Steps to reproduce issue

I have created a wrapper around the LaunchService which can dynamically add new Nodes and/or shutdown existing nodes.

New nodes are dynamically added by calling LaunchService.include_launch_description during runtime.

Nodes are stopped by emitting a ShutdownProcess event.

Expected behaviour

After ShutdownProcess, the node exits and the Node/ExecuteProcess object is destroyed.

Actual behavior

I observed that the Node (ExecuteProcess) object is not destroyed until the LaunchService completely shutdown. This is also the case if the node exits on it's own (without a ShutdownProcess event).

Additional information

The result is a small memory leak. Which stacks up in my use case of long lived LaunchService.

I looked at LaunchService._prune_and_count_entity_future_pairs where the Action is removed from entity_future_pairs. The Action is indeed pruned. However there are still ~18 references to it in event handlers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions