Skip to content

Conversation

royitaqi
Copy link
Contributor

@royitaqi royitaqi commented Sep 10, 2025

See #156803 (comment) for full context.

Summary:

PASS: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_multiple_sessions (TestDAP_server.TestDAP_server.test_connection_timeout_multiple_sessions)
FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_long_debug_session (TestDAP_server.TestDAP_server.test_connection_timeout_long_debug_session)
FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_at_server_start (TestDAP_server.TestDAP_server.test_connection_timeout_at_server_start)
  • The error is that process.wait(timeout) timed out during the teardown of the tests.
  • The above suggests that maybe the root cause is that the timeout is set too strictly (and that maybe the server termination on Debian is slower than the other Linux distribution for some reason).
  • This patch loosens that timeout from 2s to 5s. Let's see if this works.
  • FWIW, I cannot verify the root cause, because I don't have a Debian machine.

@llvmbot
Copy link
Member

llvmbot commented Sep 10, 2025

@llvm/pr-subscribers-lldb

Author: Roy Shi (royitaqi)

Changes

See #156803 (comment) for full context.

TL;DR

  • In [lldb-dap] Add command line option --connection-timeout #156803, we see a builtbot failure for TestDAP_server.py on Debian. Note that macOS and other Linux distributions (like CentOS) seem to pass the tests (verified by buildbot in the PR and my local tests).
  • In the 3 newly added tests, the most complex test case passed, while the other easier ones failed.
PASS: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_multiple_sessions (TestDAP_server.TestDAP_server.test_connection_timeout_multiple_sessions)
FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_long_debug_session (TestDAP_server.TestDAP_server.test_connection_timeout_long_debug_session)
FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_at_server_start (TestDAP_server.TestDAP_server.test_connection_timeout_at_server_start)
  • The failure is that the process.wait() timed out.
  • The above suggested that maybe the root cause is that the timeout is set too strictly (and that maybe the server termination on Debian is slower than the other Linux distribution for some reason).
  • This patch loosens that timeout from 2s to 5s. Let's see if this works.

Full diff: https://github.com/llvm/llvm-project/pull/157924.diff

1 Files Affected:

  • (modified) lldb/test/API/tools/lldb-dap/server/TestDAP_server.py (+3-3)
diff --git a/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py b/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
index 2ab6c7ed24710..12b321cf42778 100644
--- a/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
+++ b/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py
@@ -127,7 +127,7 @@ def test_connection_timeout_at_server_start(self):
         self.start_server(
             connection="listen://localhost:0",
             connection_timeout=1,
-            wait_seconds_for_termination=2,
+            wait_seconds_for_termination=5,
         )
 
     @skipIfWindows
@@ -139,7 +139,7 @@ def test_connection_timeout_long_debug_session(self):
         (_, connection) = self.start_server(
             connection="listen://localhost:0",
             connection_timeout=1,
-            wait_seconds_for_termination=2,
+            wait_seconds_for_termination=5,
         )
         # The connection timeout should not cut off the debug session
         self.run_debug_session(connection, "Alice", 1.5)
@@ -153,7 +153,7 @@ def test_connection_timeout_multiple_sessions(self):
         (_, connection) = self.start_server(
             connection="listen://localhost:0",
             connection_timeout=1,
-            wait_seconds_for_termination=2,
+            wait_seconds_for_termination=5,
         )
         time.sleep(0.5)
         # Should be able to connect to the server.

@royitaqi
Copy link
Contributor Author

royitaqi commented Sep 10, 2025

I'm thinking the change is small and safe enough that I will merge without any approval, in the hope that the buildbot will be fixed sooner. I'm open to feedback if this is not a suitable case for such merge.

EDIT: Latest update: It seems this patch has fixed the buildbot - it is green now.

@royitaqi royitaqi merged commit 11a4f5b into llvm:main Sep 10, 2025
12 checks passed
JDevlieghere pushed a commit to swiftlang/llvm-project that referenced this pull request Oct 14, 2025
See
llvm#156803 (comment)
for full context.

Summary:
* In llvm#156803, we see a builtbot
failure for `TestDAP_server.py` on Debian. Note that macOS and other
Linux distributions (like CentOS, or whatever Linux the [required
buildbot](https://github.com/llvm/llvm-project/actions/runs/17594257911/job/49982560193#logs)
uses) seem to pass the tests.
* In the 3 newly added tests, the most complex test case passed, while
the other easier ones failed.
```
PASS: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_multiple_sessions (TestDAP_server.TestDAP_server.test_connection_timeout_multiple_sessions)
FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_long_debug_session (TestDAP_server.TestDAP_server.test_connection_timeout_long_debug_session)
FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_at_server_start (TestDAP_server.TestDAP_server.test_connection_timeout_at_server_start)
```
* The error is that `process.wait(timeout)` timed out during the
teardown of the tests.
* The above suggests that maybe the root cause is that the timeout is
set too strictly (and that maybe the server termination on Debian is
slower than the other Linux distribution for some reason).
* This patch loosens that timeout from 2s to 5s. Let's see if this
works.
* FWIW, I cannot verify the root cause, because I don't have a Debian
machine.

(cherry picked from commit 11a4f5b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants