llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Xcode 16.2] Failed Tests (1): lldb-api :: functionalities/asan/swift/TestAsanSwift.py

Open shahmishal opened this issue 1 year ago • 1 comments

======================================================================
FAIL: test_asan_swift_dsym (TestAsanSwift.AsanSwiftTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1768, in test_method
    return attrvalue(self)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
    return func(*args, **kwargs)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
    return func(*args, **kwargs)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/test/API/functionalities/asan/swift/TestAsanSwift.py", line 33, in test_asan_swift
    self.do_test_asan()
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/test/API/functionalities/asan/swift/TestAsanSwift.py", line 81, in do_test_asan
    self.expect(
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2474, in expect
    self.fail(log_msg)
AssertionError: Ran command:
"memory history `ptr`"

Got output:

Expecting sub string: "Memory allocated by Thread 1" (was not found)
Config=arm64-/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/build/buildbot_incremental/llvm-macosx-arm64/bin/clang
======================================================================
FAIL: test_asan_swift_dsym (TestAsanSwift.AsanSwiftTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2029, in tearDown
    Base.tearDown(self)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1139, in tearDown
    self.assertEqual(lldb.SBModule.GetNumberAllocatedModules(), 0)
AssertionError: 1 != 0
Config=arm64-/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/build/buildbot_incremental/llvm-macosx-arm64/bin/clang
======================================================================
FAIL: test_asan_swift_dwarf (TestAsanSwift.AsanSwiftTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1768, in test_method
    return attrvalue(self)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
    return func(*args, **kwargs)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
    return func(*args, **kwargs)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/test/API/functionalities/asan/swift/TestAsanSwift.py", line 33, in test_asan_swift
    self.do_test_asan()
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/test/API/functionalities/asan/swift/TestAsanSwift.py", line 81, in do_test_asan
    self.expect(
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2474, in expect
    self.fail(log_msg)
AssertionError: Ran command:
"memory history `ptr`"

Got output:

Expecting sub string: "Memory allocated by Thread 1" (was not found)
Config=arm64-/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/build/buildbot_incremental/llvm-macosx-arm64/bin/clang
======================================================================
FAIL: test_asan_swift_dwarf (TestAsanSwift.AsanSwiftTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2029, in tearDown
    Base.tearDown(self)
  File "/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1139, in tearDown
    self.assertEqual(lldb.SBModule.GetNumberAllocatedModules(), 0)
AssertionError: 1 != 0
Config=arm64-/Users/ec2-user/jenkins/workspace/oss-swift-pr-test-macos-arm64/build/buildbot_incremental/llvm-macosx-arm64/bin/clang
----------------------------------------------------------------------
Ran 6 tests in 30.032s

FAILED (failures=4, skipped=2)

--

********************

shahmishal avatar Feb 12 '25 17:02 shahmishal

The self.assertEqual(lldb.SBModule.GetNumberAllocatedModules(), 0) is a known race condition on teardown of the test-suite. I've summarized it in rdar://140111416

The problem is that occasionally there can still be a ThreadPlan holding onto an lldb::Module when we're trying to orphan the lldb::Modules at the end of the test-suite (when tearing down the debugger).

Michael137 avatar Feb 19 '25 09:02 Michael137