Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
llvm self-tests looping(?)
Hi,
I decided it might be a good idea to run the self-tests in llvm
5.0.1 on powerpc. However, after the test and utilities are
built, it appears to spin while doing the first test. The run
log shows:
[100%] Built target LLVMHello_exports
[100%] Built target LLVMHello
Scanning dependencies of target check-llvm
[100%] Running the LLVM regression tests
-- Testing: 21465 tests, 1 threads --
Testing: 0 ..
and the process is spinning consuming CPU (well, it's stopped in
the debugger here):
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
0 root 126 0 0K 22M pgdaemon 600:47 0.00% 0.00% [system]
19597 root 28 4 43M 15M STOP 306:27 0.00% 0.00% SupportTests
and the debugger points towards libexecinfo:
ambrosia# gdb -q ./work/build/unittests/Support/SupportTests
Reading symbols from ./work/build/unittests/Support/SupportTests...(no debugging symbols found)...done.
(gdb) attach 19597
Attaching to program: /usr/pkgsrc/lang/llvm/work/build/unittests/Support/SupportTests, process 19597
Couldn't get registers: Device busy.
Couldn't get registers: Device busy.
(gdb) Reading symbols from /usr/lib/libpthread.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so...(no debugging symbols found)...done.
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libexecinfo.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libterminfo.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libstdc++.so.7...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libgcc_s.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libedit.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libelf.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols found)...done.
[Switching to LWP 1]
0xfc1d3fcc in ?? () from /usr/lib/libexecinfo.so.0
(gdb) where
#0 0xfc1d3fcc in ?? () from /usr/lib/libexecinfo.so.0
#1 0xfc1d4514 in ?? () from /usr/lib/libexecinfo.so.0
#2 0xfc1d53e0 in _Unwind_Backtrace () from /usr/lib/libexecinfo.so.0
#3 0xfc1d128c in backtrace () from /usr/lib/libexecinfo.so.0
#4 0xfc673ac4 in llvm::sys::PrintStackTrace(llvm::raw_ostream&) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#5 0xfc673e4c in PrintStackTraceSignalHandler(void*) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#6 0xfc671c08 in llvm::sys::RunSignalHandlers() ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#7 0xfc671e88 in SignalHandler(int) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#8 0xfbe2af58 in opendir () from /usr/lib/libc.so.12
Backtrace stopped: frame did not save the PC
(gdb) i thread
Id Target Id Frame
* 1 LWP 1 0xfbeb4c4c in memcpy () from /usr/lib/libc.so.12
(gdb)
and an earlier backtrace of the same process gave
(gdb) where
#0 0xfbeb4c4c in memcpy () from /usr/lib/libc.so.12
#1 0xfc1d2c20 in ?? () from /usr/lib/libexecinfo.so.0
#2 0xfc1d3470 in ?? () from /usr/lib/libexecinfo.so.0
#3 0xfc1d52e8 in _Unwind_Backtrace () from /usr/lib/libexecinfo.so.0
#4 0xfc1d128c in backtrace () from /usr/lib/libexecinfo.so.0
#5 0xfc673ac4 in llvm::sys::PrintStackTrace(llvm::raw_ostream&) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#6 0xfc673e4c in PrintStackTraceSignalHandler(void*) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#7 0xfc671c08 in llvm::sys::RunSignalHandlers() ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#8 0xfc671e88 in SignalHandler(int) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#9 0xfbe2af58 in opendir () from /usr/lib/libc.so.12
Backtrace stopped: frame did not save the PC
(gdb)
Setting a breakpoint on the next instruction in backtrace():
(gdb) x/i 0xfc1d128c
0xfc1d128c <backtrace+60>: lwz r3,16(r1)
(gdb) x/i backtrace
0xfc1d1250 <backtrace>: stwu r1,-48(r1)
(gdb) x/20i
0xfc1d1254 <backtrace+4>: mflr r0
0xfc1d1258 <backtrace+8>: bcl 20,4*cr7+so,0xfc1d125c <backtrace+12>
0xfc1d125c <backtrace+12>: li r9,-1
0xfc1d1260 <backtrace+16>: stw r30,40(r1)
0xfc1d1264 <backtrace+20>: mflr r30
0xfc1d1268 <backtrace+24>: stw r3,8(r1)
0xfc1d126c <backtrace+28>: stw r4,12(r1)
0xfc1d1270 <backtrace+32>: addi r4,r1,8
0xfc1d1274 <backtrace+36>: addis r30,r30,2
0xfc1d1278 <backtrace+40>: stw r9,16(r1)
0xfc1d127c <backtrace+44>: addi r30,r30,-448
0xfc1d1280 <backtrace+48>: stw r0,52(r1)
0xfc1d1284 <backtrace+52>: lwz r3,-32768(r30)
0xfc1d1288 <backtrace+56>:
bl 0xfc1d7320 <00008000.got2.plt_pic32._Unwind_Backtrace>
0xfc1d128c <backtrace+60>: lwz r3,16(r1)
0xfc1d1290 <backtrace+64>: li r9,-3
0xfc1d1294 <backtrace+68>: addi r10,r3,-1
0xfc1d1298 <backtrace+72>: cmplw cr7,r10,r9
0xfc1d129c <backtrace+76>: bgt cr7,0xfc1d12b4 <backtrace+100>
0xfc1d12a0 <backtrace+80>: lwz r8,8(r1)
(gdb)
0xfc1d12a4 <backtrace+84>: rlwinm r9,r10,2,0,29
0xfc1d12a8 <backtrace+88>: li r7,0
0xfc1d12ac <backtrace+92>: mr r3,r10
0xfc1d12b0 <backtrace+96>: stwx r7,r8,r9
0xfc1d12b4 <backtrace+100>: lwz r0,52(r1)
0xfc1d12b8 <backtrace+104>: lwz r30,40(r1)
0xfc1d12bc <backtrace+108>: mtlr r0
0xfc1d12c0 <backtrace+112>: addi r1,r1,48
0xfc1d12c4 <backtrace+116>: blr
...
(gdb) b *0xfc1d128c
Breakpoint 1 at 0xfc1d128c
(gdb) cont
Continuing.
makes it continue to spin and never hit the breakpoint.
So ... is this a lack of robustness in libexecinfo?
load averages: 0.95, 0.65, 0.86; up 116+04:14:37 16:46:06
63 processes: 1 runnable, 61 sleeping, 1 on CPU
CPU states: 0.2% user, 99.0% nice, 0.6% system, 0.2% interrupt, 0.0% idle
Memory: 173M Act, 276M Inact, 8832K Wired, 57M Exec, 271M File, 443M Free
Swap: 1300M Total, 21M Used, 1279M Free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
19597 root 21 4 43M 15M RUN 307:29 92.38% 92.38% SupportTests
0 root 126 0 0K 22M pgdaemon 600:48 0.00% 0.00% [system]
Also, putting a breakpoint in _Unwind_Backtrace also doesn't hit:
0xfc1d53e0 <_Unwind_Backtrace+460>:
b 0xfc1d52dc <_Unwind_Backtrace+200>
0xfc1d53e4 <_Unwind_Backtrace+464>: li r3,5
0xfc1d53e8 <_Unwind_Backtrace+468>:
b 0xfc1d5314 <_Unwind_Backtrace+256>
0xfc1d53ec: stwu r1,-48(r1)
0xfc1d53f0: mflr r0
0xfc1d53f4: stw r31,44(r1)
(gdb) b *0xfc1d53e4
Breakpoint 2 at 0xfc1d53e4
(gdb) where
#0 0xfc1d3558 in ?? () from /usr/lib/libexecinfo.so.0
#1 0xfc1d52e8 in _Unwind_Backtrace () from /usr/lib/libexecinfo.so.0
#2 0xfc1d128c in backtrace () from /usr/lib/libexecinfo.so.0
#3 0xfc673ac4 in llvm::sys::PrintStackTrace(llvm::raw_ostream&) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#4 0xfc673e4c in PrintStackTraceSignalHandler(void*) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#5 0xfc671c08 in llvm::sys::RunSignalHandlers() ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#6 0xfc671e88 in SignalHandler(int) ()
from /usr/pkgsrc/lang/llvm/work/build/lib/libLLVM-5.0.so
#7 0xfbe2af58 in opendir () from /usr/lib/libc.so.12
Backtrace stopped: frame did not save the PC
(gdb) cont
Continuing.
...and no drop to gdb again.
And some of the internal functions in libexecinfo are apparently
static, so not present in the symbol table for display in the
debugger, making debugging all that much harder.
Sigh!
Hints, anyone?
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index