| Issue |
184181
|
| Summary |
LLDB stops on unrelated system threads while stepping in complex multithreaded C++ apps (Apple Silicon, macOS 26.3)
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
davecotter
|
Environment:
• macOS: 26.3 (25D125)
• Xcode: Version 26.3 (17C529)
• LLDB: lldb-1703.0.236.103
• Hardware: Apple M4 Max (Apple Silicon)
Summary:
When stepping through code in a complex multithreaded C++ application, LLDB frequently halts on a system thread unrelated to the one being stepped. Occurs in both Xcode and standalone command-line lldb. Minimal or single-threaded programs do not reproduce.
Primary Symptom:
• Stepping (next / step over) on Thread A halts on Thread B
• Thread B is typically a system thread (libdispatch, pthread, runtime internals)
• Stop reason appears unrelated to the stepping target
• Thread focus switches unpredictably
• Repeated stepping produces nondeterministic thread behavior
Reproduction Conditions:
• Application must be heavily multithreaded
• Large / symbol-heavy binary
• Actively executing background work
• Built with debug symbols
Steps to Reproduce:
1. Open terminal or command-line.
2. Run lldb ./MyApp (your mulitthread complex app).
3. Set a breakpoint in or on a background thread:
4. Launch the app: (lldb) run.
5. hit breakpoint, then step over a line: (lldb) next.
6. Observe that LLDB stops on an unrelated system thread (intermittent but 90% of the time)
7. Repeat in Xcode by setting a breakpoint and stepping in a multithreaded app.
Expected Result:
• Stepping remains on the selected thread
• Other threads remain stopped unless explicitly continued
• Debugger focus does not switch unexpectedly
Actual Result:
• LLDB stops on unrelated system threads
• Thread focus jumps unpredictably
• Stepping becomes unreliable
• Debug session may appear stalled or hung
Additional Notes:
• Reproduces consistently on Apple Silicon (M4 Max)
• Independent of frameworks (not Qt-specific)
• Minimal examples do not reproduce
• Likely a failure in LLDB’s thread plan coordination or stop-reason arbitration under high concurrency on macOS 26.3
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs