[Lldb-commits] [lldb] r366850 - [lldb] Fix occasional hangs of VSCode testcases
Jan Kratochvil via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 23 13:45:03 PDT 2019
Author: jankratochvil
Date: Tue Jul 23 13:45:03 2019
New Revision: 366850
URL: http://llvm.org/viewvc/llvm-project?rev=366850&view=rev
Log:
[lldb] Fix occasional hangs of VSCode testcases
On slower machines the vscode testcases were sometimes hanging:
1910 ? Sl 0:00 | \_ /usr/bin/python .../llvm/tools/lldb/test/dotest.py ... -p TestVSCode_setBreakpoints.py
2649 ? Sl 0:00 | \_ .../build/bin/lldb-vscode
2690 ? S 0:00 | \_ .../build/bin/lldb-server gdbserver --fd=9 --native-regs --setsid
2708 ? t 0:00 | \_ .../build/lldb-test-build.noindex/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_functionality/a.out
A reproducer of the racy bug for send_recv():
# self.send_packet(command)
#+ import time
#+ time.sleep(1)
# done = False
I guess `request_continue` was probably originally intended to be synchronous
but then it isn't and this code has been leftover there.
Differential revision: https://reviews.llvm.org/D65163
Modified:
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py?rev=366850&r1=366849&r2=366850&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py Tue Jul 23 13:45:03 2019
@@ -498,13 +498,7 @@ class DebugCommunication(object):
'arguments': args_dict
}
response = self.send_recv(command_dict)
- recv_packets = []
- self.recv_condition.acquire()
- for event in self.recv_packets:
- if event['event'] != 'stopped':
- recv_packets.append(event)
- self.recv_packets = recv_packets
- self.recv_condition.release()
+ # Caller must still call wait_for_stopped.
return response
def request_disconnect(self, terminateDebuggee=None):
More information about the lldb-commits
mailing list