No version for distro humble showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro kilted showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro lyrical showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro rolling showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro github showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro galactic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro iron showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro melodic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange

No version for distro noetic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.0.1
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/robosoft-ai/SMACC2.git
VCS Type git
VCS Version jazzy
Last Updated 2026-11-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Core test: a component posts an ABSOLUTE event at pulse_rate_hz from a node timer on the executor thread while a 50 ms CbSleepFor cycles two states, so that ISmaccStateMachine::postEvent reads the current state and walks its reactors while the state machine thread is exiting that state. Reproduces the Next Level Study NL-2 race without a simulator; run under ThreadSanitizer.

Maintainers

  • Brett Aldrich

Authors

No additional authors.

sm_coretest_post_during_exit_1

Core test that reproduces, without a simulator, the race between an event posted from the executor thread and a state exit on the state machine thread (Next Level Study NL-2). ISmaccStateMachine::postEvent reads currentState_.back() and walks that state’s reactors on the posting thread, while the state machine thread pushes and pops currentState_ and destroys the state under m_mutex_, which postEvent does not hold. The nav2 machines showed it under ThreadSanitizer on every action-driven transition; this test shows it in a few seconds with no simulator.

Design

  • CpEventPulse (on ClPulse in OrPulse) posts EvPulse at pulse_rate_hz (default 200) from a node wall timer, that is from the executor thread, the posting thread of every subscription, timer and action callback.
  • StA and StB alternate on the natural end of a 50 ms CbSleepFor in OrSleep, about twenty transitions a second. No state reacts to EvPulse.
  • StA creates a SrEventCountdown on EvPulse with a count it never reaches, so every post walks into a reactor object owned by StA, whether StA is running or being destroyed.

What it shows

Under ThreadSanitizer on the current core: data races pairing propagateEventToStateReactors (the executor thread, inside postEvent<EvPulse>) with StA’s destruction on the state machine thread (the vptr write in ~SmaccState, the deallocation of the state, and the reactor’s eventCount_). After a fix that moves the reactor walk onto the state machine thread, none. The plain run is the regression check: the StA/StB alternation and the pulse count, with no TRAP-style failure, since no transition depends on EvPulse.

Running

ros2 launch sm_coretest_post_during_exit_1 sm_coretest_post_during_exit_1.launch.py

The launch file tees the node output to /tmp/sm_coretest_post_during_exit_1_latest.log. For the sanitizer run, build in the sanitizer base and run the node binary directly with the sanitizer environment of the CI gate script (.github/scripts/sanitizer_core_tests.sh).

CHANGELOG
No CHANGELOG found.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged sm_coretest_post_during_exit_1 at Robotics Stack Exchange