<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/85084>85084</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            LLDB TestConcurrentVFork.py is flaky on Arm and AArch64 Linux
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lldb
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DavidSpickett
      </td>
    </tr>
</table>

<pre>
    `lldb/test/API/functionalities/fork/concurrent_vfork/TestConcurrentVFork.py` sometimes fails with a timeout. I've seen this on AArch64 and Arm Linux.

For example https://lab.llvm.org/buildbot/#/builders/17/builds/50450.
```
TIMEOUT: lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py (2684 of 2684)
******************** TEST 'lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py' FAILED ********************
Script:
--
/usr/bin/python3.8 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/local/bin/llvm-ar --env OBJCOPY=/usr/bin/llvm-objcopy --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/functionalities/fork/concurrent_vfork -p TestConcurrentVFork.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds
Command Output (stdout):
--
lldb version 19.0.0git (https://github.com/llvm/llvm-project.git revision e48d5a838f69e0a8e0ae95a8aed1a8809f45465a)
  clang revision e48d5a838f69e0a8e0ae95a8aed1a8809f45465a
  llvm revision e48d5a838f69e0a8e0ae95a8aed1a8809f45465a
--
```
Inspecting the container afterwards shows that we are using way more PIDs than you'd expect, and we have around 600 processes like:
```
 tcwg-bu+ 4177936       1  0 Mar11 pts/0    00:00:00 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/functionalities/fork/concurrent_vfork/TestConcurrentVFork.test_follow_child_vfork_call_exec/a.out
```

This container persists so this could be the result of the test not cleaning up processes, and them piling up until the system complains, or someone tries to debug the wrong process and gets no response. On AArch64 I have seen it lead to system resource errors as the leftover processes pile up.

I'm going to skip all the tests on these platforms while I look into it.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEV1tv4j4W_zTh5ShRcAKEBx5oaXZZMdvRtP_R7FPl2AfiwbEjX6B8-5VNoO3sjrQz7WgrRPHxudnn53Oh1oqdQlwkk5tkshpR71ptFit6EPyhF2yPzo0azU-LZJpLyZuE1A6tS0i9_LxOSL31ijmhFZXCCbSBos0-ITXTinljULmnw0B6ROtur-SvtTb7rD8l0xys7tCJDi1sqZAWjsK1QCGQtHcZrBMyOyBYRAWuFRa0guXSsHZaAlUclqaDjVD-OUvyVZIvz9-1NoDPtOslQutcb5NimZA6IbWkTSblocu02SWkbryQvNEub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