Skip to content

Revert "[lldb][target] Add progress report for wait-attaching to process" #144810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

chelcassanova
Copy link
Contributor

This is breaking TestCreateAfterAttach.py on Ubuntu:

======================================================================
FAIL: test_create_after_attach_dwo (TestCreateAfterAttach.CreateAfterAttachTestCase.test_create_after_attach_dwo)
   Test thread creation after process attach.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1804, in test_method
    return attrvalue(self)
           ^^^^^^^^^^^^^^^
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py", line 36, in test_create_after_attach
    self.runCmd("process attach -p " + str(pid))
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1005, in runCmd
    self.assertTrue(self.res.Succeeded(), msg + output)
AssertionError: False is not true : Command 'process attach -p 1474309' did not return successfully
Error output:
error: attach failed: lost connection

on the buildbots for lldb-remote-linux-ubuntu, lldb-arm-ubuntu, lldb-aarch64-ubuntu, lldb-arm-ubuntu.

@llvmbot llvmbot added the lldb label Jun 18, 2025
@chelcassanova chelcassanova merged commit e0933ab into main Jun 18, 2025
6 of 8 checks passed
@chelcassanova chelcassanova deleted the revert-144768-progress-report-for-wait-attach branch June 18, 2025 22:39
@llvmbot
Copy link
Member

llvmbot commented Jun 18, 2025

@llvm/pr-subscribers-lldb

Author: Chelsea Cassanova (chelcassanova)

Changes

This is breaking TestCreateAfterAttach.py on Ubuntu:

======================================================================
FAIL: test_create_after_attach_dwo (TestCreateAfterAttach.CreateAfterAttachTestCase.test_create_after_attach_dwo)
   Test thread creation after process attach.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1804, in test_method
    return attrvalue(self)
           ^^^^^^^^^^^^^^^
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py", line 36, in test_create_after_attach
    self.runCmd("process attach -p " + str(pid))
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1005, in runCmd
    self.assertTrue(self.res.Succeeded(), msg + output)
AssertionError: False is not true : Command 'process attach -p 1474309' did not return successfully
Error output:
error: attach failed: lost connection

on the buildbots for lldb-remote-linux-ubuntu, lldb-arm-ubuntu, lldb-aarch64-ubuntu, lldb-arm-ubuntu.


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

2 Files Affected:

  • (modified) lldb/source/Target/Target.cpp (-1)
  • (modified) lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py (-31)
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 8f8d2ef21cc5f..45a9e1196a049 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -3546,7 +3546,6 @@ llvm::Expected<TraceSP> Target::GetTraceOrCreate() {
 }
 
 Status Target::Attach(ProcessAttachInfo &attach_info, Stream *stream) {
-  Progress attach_progress("Waiting to attach to process");
   m_stats.SetLaunchOrAttachTime();
   auto state = eStateInvalid;
   auto process_sp = GetProcessSP();
diff --git a/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py b/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
index 8198c50a5ff0d..9af53845ca1b7 100644
--- a/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
+++ b/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
@@ -2,7 +2,6 @@
 Test that we are able to broadcast and receive progress events from lldb
 """
 import lldb
-import threading
 
 import lldbsuite.test.lldbutil as lldbutil
 
@@ -17,36 +16,6 @@ def setUp(self):
             self.broadcaster, lldb.SBDebugger.eBroadcastBitProgress
         )
 
-    def test_wait_attach_progress_reporting(self):
-        """Test that progress reports for wait attaching work as intended."""
-        self.build()
-        target = self.dbg.CreateTarget(None)
-
-        # Wait attach to a process, then check to see that a progress report was created
-        # and that its message is correct for waiting to attach to a process.
-        class AttachThread(threading.Thread):
-            def __init__(self, target):
-                threading.Thread.__init__(self)
-                self.target = target
-
-            def run(self):
-                self.target.AttachToProcessWithName(
-                    lldb.SBListener(), "a.out", True, lldb.SBError()
-                )
-
-        thread = AttachThread(target)
-        thread.start()
-
-        event = lldbutil.fetch_next_event(self, self.listener, self.broadcaster)
-        progress_data = lldb.SBDebugger.GetProgressDataFromEvent(event)
-        message = progress_data.GetValueForKey("message").GetStringValue(100)
-        self.assertEqual(message, "Waiting to attach to process")
-
-        # Interrupt the process attach to keep the test from stalling.
-        target.process.SendAsyncInterrupt()
-
-        thread.join()
-
     def test_dwarf_symbol_loading_progress_report(self):
         """Test that we are able to fetch dwarf symbol loading progress events"""
         self.build()

chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Jun 20, 2025
…ess" (llvm#144810)

This relands commit e0933ab. The
original commit was causing the test TestCreateAfterAttach.py to fail on
ARM Ubuntu bots. It's possible that this could've been happening because
the test for wait-attach progress reporting is waiting on a process
named "a.out" which could be too generic as multiple other tests (when
run in parallel on the bots) could also be using processes named
"a.out". This commit changes the wait-attach progress report test to
wait on a unique process name.

Original PR description:

This commit adds a progress report when wait-attaching to a process as
well as a test for this.

Original PR link: llvm#144768
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Jun 24, 2025
…ess" (llvm#144810)

This relands commit e0933ab. The
original commit was causing the test TestCreateAfterAttach.py to fail on
ARM Ubuntu bots. It's possible that this could've been happening because
the test for wait-attach progress reporting is waiting on a process
named "a.out" which could be too generic as multiple other tests (when
run in parallel on the bots) could also be using processes named
"a.out". This commit changes the wait-attach progress report test to
wait on a unique process name.

Original PR description:

This commit adds a progress report when wait-attaching to a process as
well as a test for this.

Original PR link: llvm#144768
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Jun 24, 2025
…ess" (llvm#144810)

This relands commit e0933ab. The
original commit was causing the test TestCreateAfterAttach.py to fail on
ARM Ubuntu bots. It's possible that this could've been happening because
the test for wait-attach progress reporting is waiting on a process
named "a.out" which could be too generic as multiple other tests (when
run in parallel on the bots) could also be using processes named
"a.out". This commit changes the wait-attach progress report test to
wait on a unique process name.

Original PR description:

This commit adds a progress report when wait-attaching to a process as
well as a test for this.

Original PR link: llvm#144768
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Jun 25, 2025
…ess" (llvm#144810)

This relands commit e0933ab. The
original commit was causing the test TestCreateAfterAttach.py to fail on
ARM Ubuntu bots. It's possible that this could've been happening because
the test for wait-attach progress reporting is waiting on a process
named "a.out" which could be too generic as multiple other tests (when
run in parallel on the bots) could also be using processes named
"a.out". This commit changes the wait-attach progress report test to
wait on a unique process name.

Original PR description:

This commit adds a progress report when wait-attaching to a process as
well as a test for this.

Original PR link: llvm#144768
chelcassanova added a commit that referenced this pull request Jun 26, 2025
#145111)

…ess" (#144810)

This relands commit e0933ab. The
original commit was causing the test TestCreateAfterAttach.py to fail on
ARM Ubuntu bots. It's possible that this could've been happening because
the test for wait-attach progress reporting is waiting on a process
named "a.out" which could be too generic as multiple other tests (when
run in parallel on the bots) could also be using processes named
"a.out". This commit changes the wait-attach progress report test to
wait on a unique process name.

Original PR description:

This commit adds a progress report when wait-attaching to a process as
well as a test for this.

Original PR link: #144768
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
llvm#145111)

…ess" (llvm#144810)

This relands commit e0933ab. The
original commit was causing the test TestCreateAfterAttach.py to fail on
ARM Ubuntu bots. It's possible that this could've been happening because
the test for wait-attach progress reporting is waiting on a process
named "a.out" which could be too generic as multiple other tests (when
run in parallel on the bots) could also be using processes named
"a.out". This commit changes the wait-attach progress report test to
wait on a unique process name.

Original PR description:

This commit adds a progress report when wait-attaching to a process as
well as a test for this.

Original PR link: llvm#144768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants