swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.12k stars 332 forks source link

[SR-9517] LLDB test timeout: test_dsym (lang/swift/foundation/TestSwiftFoundation.py) #4348

Open belkadan opened 5 years ago

belkadan commented 5 years ago
Previous ID SR-9517
Radar rdar://problem/52194055
Original Reporter @belkadan
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | LLDB for Swift | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 3528a622fb81fe4b177cc0e900397a9b

Issue Description:

Sometimes (but not always), some of the LLDB tests have been timing out on PR tests, forcing a retest to see if it's really an issue. These tests are probably just on the timeout border, but…what are they doing that takes so much time?

https://ci.swift.org/job/swift-PR-osx/9795/

Command invoked: /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/test/dotest.py --executable /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/CustomSwift-Release/lldb --server /Applications/Xcode.app/Contents/Developer/../SharedFrameworks/LLDB.framework/Resources/debugserver --out-of-tree-debugserver --test-subdir lang/swift --skip-category=watchpoint --skip-category=dwo -C /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/llvm-macosx-x86_64/bin/clang --filecheck /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/llvm-macosx-x86_64/bin/FileCheck --build-dir /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex -t -E  -s 2018-12-13-20_04_38 --results-port 54219 -S fnmac --inferior -p TestSwiftFoundation.py /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation --event-add-entries worker_index=20:int

Configuration: arch=x86_64 compiler=/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/llvm-macosx-x86_64/bin/clang-7
----------------------------------------------------------------------
Collected 4 tests

Change dir to: /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation
runCmd: settings set symbols.clang-modules-cache-path "/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-lldb"
output: None

runCmd: settings set symbols.enable-external-lookup false
output: None

os command: make VPATH=/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation -C /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/foundation/lldbsuite.test.lldbtest.test_dsym -I /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation -f /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation/Makefile MAKE_DSYM=YES ARCH=x86_64  CC=/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/llvm-macosx-x86_64/bin/clang-7 SWIFTC=/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/swift-macosx-x86_64/bin/swiftc all 
with pid: 21615
stdout: ### Compiling /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation/main.swift
/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/swift-macosx-x86_64/bin/swift -frontend -c -primary-file /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation/main.swift \
       \
      -g -Onone -serialize-debugging-options -module-cache-path /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-clang -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -framework Foundation -framework CoreGraphics -module-name a -emit-module-path \
      /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/foundation/lldbsuite.test.lldbtest.test_dsym/main.partial.swiftmodule \
      -o /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/foundation/lldbsuite.test.lldbtest.test_dsym/main.o
### Merging swift modules for a
/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/swift-macosx-x86_64/bin/swift -frontend -g -Onone -serialize-debugging-options -module-cache-path /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-clang -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -framework Foundation -framework CoreGraphics -merge-modules \
      -emit-module main.partial.swiftmodule \
      -parse-as-library -sil-merge-partial-modules \
      -disable-diagnostic-passes -disable-sil-perf-optzns \
      -module-name a \
      -o /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/foundation/lldbsuite.test.lldbtest.test_dsym/a.swiftmodule
### Linking a.out
/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/swift-macosx-x86_64/bin/swiftc   \
      -Xlinker -add_ast_path -Xlinker /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/foundation/lldbsuite.test.lldbtest.test_dsym/a.swiftmodule main.o \
       -Onone -Xfrontend -serialize-debugging-options   -module-cache-path /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-clang -sdk "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" -framework Foundation -framework CoreGraphics -o "a.out"
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil"  -o "a.out.dSYM" "a.out"

stderr: /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation/main.swift:17:7: warning: variable 'point' was never mutated; consider changing to 'let' constant
  var point = NSPoint(x: 23, y: 42)
  ~~~ ^
  let

retcode: 0

[TestSwiftFoundation.py FAILED] (TIMEOUT)
Command invoked: /usr/bin/python /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/test/dotest.py --executable /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/CustomSwift-Release/lldb --server /Applications/Xcode.app/Contents/Developer/../SharedFrameworks/LLDB.framework/Resources/debugserver --out-of-tree-debugserver --test-subdir lang/swift --skip-category=watchpoint --skip-category=dwo -C /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/llvm-macosx-x86_64/bin/clang --filecheck /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/llvm-macosx-x86_64/bin/FileCheck --build-dir /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex -t -E  -s 2018-12-13-20_04_38 --results-port 54219 -S fnmac --inferior -p TestSwiftFoundation.py /Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/lldb/packages/Python/lldbsuite/test/lang/swift/foundation --event-add-entries worker_index=20:int
belkadan commented 5 years ago

cc friss (JIRA User)

swift-ci commented 5 years ago

Comment by Fred Riss (JIRA)

I don't actually know what the timeout is, but on an unloaded machine, this test takes 30s to run. @adrian-prantl do you happen to know what the timeout is?

adrian-prantl commented 5 years ago

Depending on how the tests are run, there are multiple levels of timeouts. dotest.py has a timeout (shown in the log above) and lit.py also does, and Jenkins jobs usually also have a global timeout. Finally, the few remaining pexpect tests have their own individual timeouts.

The dotest.py timeout is controlled by LLDB_TEST_TIMEOUT. I couldn't immediately find if/where we set it.

adrian-prantl commented 5 years ago

@swift-ci create