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

Fix race condition in events-executor #2177

Merged
merged 6 commits into from
May 5, 2023

Commits on May 2, 2023

  1. Fix race condition in events-executor

    The initial implementation of the events-executor contained a bug where the executor
    would end up in an inconsistent state and stop processing interrupt/shutdown notifications.
    Manually adding a node to the executor results in a) producing a notify waitable event
    and b) refreshing the executor collections.
    The inconsistent state would happen if the event was processed before the collections were
    finished to be refreshed: the executor would pick up the event but be unable to process it.
    This would leave the `notify_waitable_event_pushed_` flag to true, preventing additional
    notify waitable events to be pushed.
    The behavior is observable only under heavy load.
    
    Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
    alsora committed May 2, 2023
    Configuration menu
    Copy the full SHA
    1984550 View commit details
    Browse the repository at this point in the history
  2. remove irobot api for node options

    Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
    alsora committed May 2, 2023
    Configuration menu
    Copy the full SHA
    2301aef View commit details
    Browse the repository at this point in the history
  3. move test to common executor tests file; use volatile keyword to prev…

    …ent optimizations
    
    Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
    alsora committed May 2, 2023
    Configuration menu
    Copy the full SHA
    338662a View commit details
    Browse the repository at this point in the history
  4. fix uncrustify errors

    Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
    alsora committed May 2, 2023
    Configuration menu
    Copy the full SHA
    3cfdf89 View commit details
    Browse the repository at this point in the history
  5. restore volatile keyword

    Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
    alsora committed May 2, 2023
    Configuration menu
    Copy the full SHA
    7447355 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. move rclcpp context init/shutdown to SetUp and TearDown test functions

    before they were in the SetUpTestCase and TearDownTestCase but we have tests that call rclcpp::shutdown, thus disrupting successive tests
    
    Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
    alsora committed May 3, 2023
    Configuration menu
    Copy the full SHA
    7c33c1d View commit details
    Browse the repository at this point in the history