Conversation
Greptile SummaryThis PR fixes a segfault during cleanup of Confidence Score: 5/5Safe to merge — the race condition root cause is correctly identified and fixed, and the fix is well-tested. The fix is targeted and correct: No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Main as Main Thread
participant LoopThread as LCM Loop Thread
participant LCMObj as C++ LCM Object
Main->>Main: _stop_event.set()
Main->>LoopThread: thread.join(timeout)
alt Thread exits before timeout
LoopThread->>LoopThread: stop_event detected, exits while loop
LoopThread->>LCMObj: _cleanup_owned_lcm() - del self.l
LoopThread->>LoopThread: self._thread = None
Main-->>Main: join returns, thread not alive
Main->>Main: skip _cleanup_owned_lcm()
else Thread still in handle_timeout when timeout expires
Main-->>Main: join timed out, thread.is_alive() == True
Main->>Main: SKIP _cleanup_owned_lcm() - key fix avoids segfault
LoopThread->>LoopThread: handle_timeout returns, loop exits
LoopThread->>LCMObj: _cleanup_owned_lcm() - del self.l
LoopThread->>LoopThread: self._thread = None
end
Reviews (1): Last reviewed commit: "fix(lcm): segfault at cleanup" | Re-trigger Greptile |
710f9f6 to
7fa805a
Compare
7fa805a to
ea6b398
Compare
|
can we get a |
This reverts commit 3a4c24e.
ea21bb5 to
c6f11da
Compare

Problem
Example broken runs:
Closes DIM-XXX
Solution
Breaking Changes
How to Test
Contributor License Agreement