Skip to content

Commit 8693f8f

Browse files
committed
[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 llvm-svn: 366850
1 parent c5b5cc4 commit 8693f8f

File tree

1 file changed

+1
-7
lines changed
  • lldb/packages/Python/lldbsuite/test/tools/lldb-vscode

1 file changed

+1
-7
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,7 @@ def request_continue(self, threadId=None):
498498
'arguments': args_dict
499499
}
500500
response = self.send_recv(command_dict)
501-
recv_packets = []
502-
self.recv_condition.acquire()
503-
for event in self.recv_packets:
504-
if event['event'] != 'stopped':
505-
recv_packets.append(event)
506-
self.recv_packets = recv_packets
507-
self.recv_condition.release()
501+
# Caller must still call wait_for_stopped.
508502
return response
509503

510504
def request_disconnect(self, terminateDebuggee=None):

0 commit comments

Comments
 (0)