-
Notifications
You must be signed in to change notification settings - Fork 10
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: segmentation fault due to race condition. #285
Conversation
Signed-off-by: ISP akm <[email protected]>
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #285 +/- ##
===========================================
+ Coverage 25.02% 55.18% +30.16%
===========================================
Files 58 28 -30
Lines 3321 2180 -1141
Branches 1085 1215 +130
===========================================
+ Hits 831 1203 +372
+ Misses 1756 697 -1059
+ Partials 734 280 -454
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: ISP akm <[email protected]>
Signed-off-by: ISP akm <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Segmentation failure occurred at autoware pandar_node_container.
From the backtrace, it was confirmed that it occurs within TracingController::add_allowed_messages() in caret_trace.
Related links
https://tier4.atlassian.net/browse/RT2-1592
Notes for reviewers
After adding an exclusive lock to add_allowed_messages(), the segmentation fault no longer occurred, but the cause was unknown.
Examination revealed that ‘writes’ were mixed in the shared lock and that the segmentation fault was caused by corruption of the map data due to thread contention.
The shared and exclusive locks were reviewed with a focus on TracingController and the following modifications were made.
With the * mark, thread races could occur separately from this issue
Pre-review checklist for the PR author
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.