Skip to content

Self-deadlock in ~Subscription when a callback owns the last reference to another Subscription #1687

Open

Description

@Koichi98

~Subscription() calls id2_callback_info.erase() while holding id2_callback_info_mtx, so the erased callback is destroyed with that mutex still held. If that callback holds the last reference to another agnocast::Subscription (e.g. via an agnocast::Client), the inner ~Subscription() locks the same mutex on the same thread and hangs forever. This reproduces on every shutdown of vehicle_door_node in autoware_default_adapi_universe, whose service callback created with relay_service captures a client.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions