slydiman wrote:

Of course lldb waits for the vFile:close response before sending the vRun 
packet and lldb-server actually closes the file handle (all of them). No any 
leaks. Otherwise this workaround wouldn't work. 

The behavior is the same on Linux and Windows targets. I launched 100 
connections and 200 processes simultaneously on Windows (lldb-server gdbserver 
+ a test app). I got 3..10 fails because of  the error ERROR_SHARING_VIOLATION. 
After this patch I got 0..3 fails for 100 connections and 0 fails for 50 
connections. After closing the copied file probably the system may cache it 
some time per process. The file may be blocked by the built-in antivirus for 
some time. It is hard to figure out the exact reason.

We have a buildbot to run cross API tests in 8 threads with Linux Aarch64 
target. All tests are green with the current (single thread) lldb-server. But 
we got randomly failed 50..60 tests with the multithreading version of 
lldb-server. Probably it is just little bit faster and system did not unlock 
the executable. We noticed that usually failed tests use simple and tiny 
executables. But this fact does not help to explain the reason of the problem. 
We got 100% green tests after this patch.

https://github.com/llvm/llvm-project/pull/100659
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to