This is an archive of the discontinued LLVM Phabricator instance.

Fix occasional hangs of VSCode testcases
ClosedPublic

Authored by jankratochvil on Jul 23 2019, 12:05 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jankratochvil created this revision.Jul 23 2019, 12:05 PM
clayborg accepted this revision.Jul 23 2019, 12:46 PM

If all tests pass, then I am good with this.

This revision is now accepted and ready to land.Jul 23 2019, 12:46 PM
labath accepted this revision.Jul 23 2019, 12:47 PM

Thank you very much for tracking this down. Maybe wait a while to see if @clayborg has any thoughts on this, but otherwise, this looks good to me.

Thank you very much for tracking this down. Maybe wait a while to see if @clayborg has any thoughts on this, but otherwise, this looks good to me.

haha, I already accepted. So good to go.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2019, 1:44 PM

One heisenbug down!