Skip to content

Mutually exclusive callback group hangs #832

Closed

Description

@guillaumeautran

The root cause for this issue is due to a combination between the multithreaded executor and the mutually exclusive callback group used for all the ROS topics.
When the executor collects all the references to the subscriptions, timers and services, it skips the mutually exclusive callback_groups which are currently locked (ie: being processed by another thread).
This cause the resulting waitset to only contain the guard pointers.
If there is no activity on those guards, the thread will wait for work forever in the get_next_executable and block all other threads.

Activity

  1. self-assigned this
    on Sep 5, 2019
  2. ivanpauno commented on Sep 5, 2019

    @ivanpauno
    Member

    I have think about this (again), and I haven't found a way of avoiding the race condition without blocking others threads of executing an available executable (which is the whole point of multithreaded executors), or without refactoring the executor completely.
    Therefor, I'm deleting me as assignee ...

  3. ivanpauno commented on Sep 12, 2019

    @ivanpauno
    Member

    @guillaumeautran Could you provide an example of this hang?

  4. removed their assignment
    on Oct 13, 2020
  5. guillaumeautran commented on Jan 14, 2021

    @guillaumeautran
    ContributorAuthor

    Sorry for the extremely late reply. We obviously moved on and in the end, we ended up extending the multi-threaded executor and implementing our own (for several reasons).

    Will close this issue is no-one else is experiencing problems.

  6. ivanpauno commented on Jan 14, 2021

    @ivanpauno
    Member

    Sorry for the extremely late reply. We obviously moved on and in the end, we ended up extending the multi-threaded executor and implementing our own (for several reasons).

    Thanks for the reply!
    I know the current multi-threaded executor has many quirks and isn't ideal, so it would be great if you can share what were the reasons to not use the current implementation and, if possible, explain how those were solved in your own implementation.

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

    bugSomething isn't workingmore-information-neededFurther information is required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions