On slower machines the vscode testcases were sometimes hanging:
1910 ? Sl 0:00 | \_ /usr/bin/python /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/test/dotest.py -q --arch=x86_64 -s /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/lldb-test-traces --build-dir /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/lldb-test-build.noindex -S nm -u CXXFLAGS -u CFLAGS --executable /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/./bin/lldb --dsymutil /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/./bin/dsymutil --filecheck /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/./bin/FileCheck -C /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/./bin/clang --env ARCHIVER=/usr/bin/ar --env OBJCOPY=/usr/bin/objcopy --env LLVM_LIBS_DIR=/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/./lib /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint -p TestVSCode_setBreakpoints.py 2649 ? Sl 0:00 | \_ /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/bin/lldb-vscode 2690 ? S 0:00 | \_ /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/bin/lldb-server gdbserver --fd=9 --native-regs --setsid 2708 ? t 0:00 | \_ /home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/build/lldb-test-build.noindex/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_functionality/a.out
Here is also a reproducer of the racy bug.
I guess request_continue was probably originally intended to be synchronous but then it isn't and this code has been leftover there.
I think it is an obvious fix but I have requested a review.