Open swift-ci opened 5 years ago
Comment by Sarvesh Tamba (JIRA)
Iam invoking the toolchain and the tests using the following command:-
{{ ./swift/utils/build-toolchain srtbundle --test}}
I assume this creates a release build, where source files are compiled without any debug information.
So in that case the binaries(a.out and others) might not really help in debugging with lldb, hence the tests fail. Could this be the case here?
Comment by Sarvesh Tamba (JIRA)
Looks like the tests are built with g option:
I tried manually debugging the test binary, and here is the output:-
sar@e2641fd15168:\~$ /home/sar/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/bin/lldb
(lldb) target create /home/sar/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/lang/swift/anytype_array/lldbsuite.test.lldbtest.test_dwarf/a.out Current executable set to '/home/sar/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/lang/swift/anytype_array/lldbsuite.test.lldbtest.test_dwarf/a.out' (powerpc64le).
(lldb) breakpoint set -f /home/sar/swift-source/lldb/packages/Python/lldbsuite/test/lang/swift/anytype_array/main.swift -l 14 Breakpoint 1: where = a.out`main + 28 at main.swift:14:9, address = 0x0000000000000dbc
(lldb) b main Breakpoint 2: 2 locations.
(lldb) run Process 5911 launched: '/home/sar/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/lang/swift/anytype_array/lldbsuite.test.lldbtest.testdwarf/a.out' (powerpc64le) Process 5911 stopped * thread #1, name = 'a.out', stop reason = breakpoint 1.1 2.1 frame #0: 0x0000000020000dbc a.out`main at main.swift:14:9 11 return 0 //%self.expect('frame variable -d run – patatino', substrs=['Any.Type', '3 values', 'String', 'Int', 'Float']) 12 } 13 -> 14 let \ = main() Target 0: (a.out) stopped.
(lldb) bt all * thread #1, name = 'a.out', stop reason = breakpoint 1.1 2.1 * frame #0: 0x0000000020000dbc a.out`main at main.swift:14:9 frame #1: 0x00003fffb737309c libc.so.6 frame #2: 0x00003fffb7373298 libc.so.6`__libc_start_main + 184
(lldb) image list [ 0] 6A70B8E5-8978-24E2-B6FB-CD2EA250BA58-77496103 0x0000000020000000 /home/sar/swift-source/build/buildbot_linux/lldb-linux-powerpc64le/lldb-test-build.noindex/lang/swift/anytype_array/lldbsuite.test.lldbtest.test_dwarf/a.out [ 1] 79B77F3A-F49D-6F75-0840-5120D5968CA9-0145C43B 0x00003fffb7fa0000 /lib/powerpc64le-linux-gnu/ld-2.23.so [ 2] 8FF97540-619C-F153-7002-5627A4A87181-B9D1C08F 0x00003fffb7f80000 [vdso] (0x00003fffb7f80000) [ 3] 3870E4E4 0x00003fffb7f00000 /home/sar/swift-source/build/buildbot_linux/swift-linux-powerpc64le/lib/swift/linux/libswiftSwiftOnoneSupport.so [ 4] A8C44F75 0x00003fffb7860000 /home/sar/swift-source/build/buildbot_linux/swift-linux-powerpc64le/lib/swift/linux/libswiftCore.so [ 5] 704EB228-6146-630E-7C5D-DE01D9FC81A4-02C264CE 0x00003fffb7640000 /usr/lib/powerpc64le-linux-gnu/libstdc++.so.6 [ 6] 88162EB5-0FAB-9455-1A1F-DA0D4804EE49-DDB88487 0x00003fffb7550000 /lib/powerpc64le-linux-gnu/libm.so.6 [ 7] 214936BC-5342-4FA4-02F8-0A9BDD696868-C8FAE57E 0x00003fffb7520000 /lib/powerpc64le-linux-gnu/libgcc_s.so.1 [ 8] 3201796D-D0A0-95E1-1FCC-32539807A6EF-D37B1F01 0x00003fffb7350000 /lib/powerpc64le-linux-gnu/libc.so.6 [ 9] 6B35AAA8-FB77-6536-3D47-C5FBFCA1D41F-DCB55B14 0x00003fffb7310000 /lib/powerpc64le-linux-gnu/libpthread.so.0 [ 10] A6DD345B-37DB-0CD4-1028-8C3E113AA9A7-6B3BD3ED 0x00003fffb72e0000 /usr/lib/powerpc64le-linux-gnu/libatomic.so.1 [ 11] 7AE2513B-2B12-9C1E-4E48-3869012B5849-9A7CCA93 0x00003fffb72b0000 /lib/powerpc64le-linux-gnu/libdl.so.2 [ 12] 1B52A2A3-E49D-38E7-05C6-1CED403ADFB1-15D6EDE6 0x00003fffb6f10000 /home/sar/swift-source/build/buildbot_linux/swift-linux-powerpc64le/lib/swift/linux/powerpc64le/libicui18nswift.so.61 [ 13] FC86F283-3712-3F13-DD26-CDD76B292E4B-ED2D3629 0x00003fffb6cc0000 /home/sar/swift-source/build/buildbot_linux/swift-linux-powerpc64le/lib/swift/linux/powerpc64le/libicuucswift.so.61 [ 14] BDAFEB7C-12EF-60B4-F753-765C2B2EBA12-0900EA0A 0x00003fffb5300000 /home/sar/swift-source/build/buildbot_linux/swift-linux-powerpc64le/lib/swift/linux/powerpc64le/libicudataswift.so.61
(lldb) thread list Process 5911 stopped * thread #1: tid = 5911, 0x0000000020000dbc a.out`main at main.swift:14:9, name = 'a.out', stop reason = breakpoint 1.1 2.1
(lldb) continue Process 5911 resuming Process 5911 stopped * thread #1, name = 'a.out', stop reason = breakpoint 2.2 frame #0: 0x0000000020000e10 a.out`main() at main.swift:7:5 4 5 func main() -> Int { 6 let patatino: [Any.Type] = [ -> 7 String.self, 8 Int.self, 9 Float.self, 10 ] Target 0: (a.out) stopped. (lldb) bt all * thread #1, name = 'a.out', stop reason = breakpoint 2.2 * frame #0: 0x0000000020000e10 a.out`main() at main.swift:7:5 frame #1: 0x0000000020000dc0 a.out`main at main.swift:14:9 frame #2: 0x00003fffb737309c libc.so.6 frame #3: 0x00003fffb7373298 libc.so.6`__libc_start_main + 184
(lldb) continue Process 5911 resuming Process 5911 exited with status = 0 (0x00000000)
(lldb)
Not sure what am I missing.
Attachment: Download
Environment
PowerPC64LEAdditional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | LLDB for Swift | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: f6f99bbf642017c17fae98fe7caec1c9Issue Description:
Facing following issues running lldb-Suite test cases while building Apple Swift 5 toolchain on PowerPC64LE.
Around 109 test cases fail with the same error message:-
*\<bound method SBProcess.Kill of \<lldb.SBProcess; proxy of \<Swig Object of type 'lldb::SBProcess ' at 0x3fff8e8d51b0> >>: success
Following is the detailed failure of one of the failing test cases:-