[Lldb-commits] [lldb] [lldb-dap] Addressing the order of events during disconnect to flush output. (PR #128583)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 25 06:37:57 PST 2025
labath wrote:
It looks like it's still flaky: https://lab.llvm.org/buildbot/#/builders/18/builds/11957
I think there's still at least one possible way this can race (return without reading all data):
1. read thread returns from the read call (reads some random data) and gets suspended
2. we begin shutting down: set the flag, and write the sentinel to the pipe
3. read thread wakes up, checks the flag and decides to exit (without reading our sentinel, or any other remaining data)
I think that one way to improve this would be to do a non-blocking read to drain the pipe before returning from the read thread.. which reminds me that I wanted to fix the problem which prevented you from using the Pipe class ~~> #128719
https://github.com/llvm/llvm-project/pull/128583
More information about the lldb-commits
mailing list