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

[HW]: Fix data race condition on started variable #545

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

GwnDaan
Copy link
Member

@GwnDaan GwnDaan commented Feb 4, 2025

Describe your changes

Fixes the warnings in the TSAN output in this issue. It reports multiple data races.

By applying the changes in this PR, we make sure that all operations are atomic, or guarded by a mutex.

Fixes #544

Tested

This has been tested by running the PGNRequestExampleTarget and making sure all TSAN warnings were gone.
Furthermore, I have looked into the newly added mutex; it shouldn't be possible to reach a deadlock

@GwnDaan GwnDaan added the bug Something isn't working label Feb 4, 2025
@GwnDaan GwnDaan self-assigned this Feb 4, 2025
@GwnDaan GwnDaan force-pushed the daan/fix-datarace-hardware-interface branch from cf93199 to 80e16aa Compare February 4, 2025 18:43
@GwnDaan GwnDaan marked this pull request as ready for review February 4, 2025 18:47
@GwnDaan GwnDaan merged commit 7ca7dfd into main Feb 6, 2025
11 checks passed
@GwnDaan GwnDaan deleted the daan/fix-datarace-hardware-interface branch February 6, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data races in CANHardwareInterface
3 participants