Source: gcc-6 Version: 6.3.0-2 X-Debbugs-Cc: debian-...@lists.debian.org User: debian-...@lists.debian.org Usertags: kfreebsd
Some testcases such as guality_check15612.exe hang during the build. The underlying issue is that gdb is invoked by the test program, some commands are sent to it, but when told to attach to the test program (itself), it experiences some error. (This may potentially be a bug in the gdb implementation on kfreebsd, not the gcc testsuite's fault). | $ export GUALITY_GDB='/usr/bin/gdb -nx -nw --quiet' Setting that env-var makes the GDB stdout/stderr visible; by default they are piped to /dev/null and the errors would be hidden from us. | $ /home/stevenc/gcc-6-6.3.0/build/gcc/testsuite/gcc1/guality_check15612.exe | Reading symbols from /home/stevenc/gcc-6-6.3.0/build/gcc/testsuite/gcc1/guality_check15612.exe...done. | (gdb) (gdb) SIGINT is used by the debugger. | Are you sure you want to change it? (y or n) [answered Y; input not from terminal] | Signal Stop Print Pass to program Description | SIGINT No Yes Yes Interrupt | (gdb) Signal Stop Print Pass to program Description | SIGTERM No Yes Yes Terminated | (gdb) Signal Stop Print Pass to program Description | SIGSEGV No Yes Yes Segmentation fault | (gdb) Signal Stop Print Pass to program Description | SIGBUS No Yes Yes Bus error | (gdb) Attaching to program: /home/stevenc/gcc-6-6.3.0/build/gcc/testsuite/gcc1/guality_check15612.exe, process 89081 | Couldn't get registers: Device or resource busy. ptrace() PT_ATTACH succeeds, but PT_GETREGS fails: | | 85528 gdb GIO fd 1 wrote 111 bytes | | "Attaching to program: /home/stevenc/gcc-6-6.3.0/build/gcc/testsuite/gcc1/guality_check15612.exe, process\ | | 85526 | | " | | 85528 gdb RET write 111/0x6f | | 85528 gdb CALL ptrace(PT_ATTACH,0x14e16,0,0) | | 85528 gdb RET ptrace 0 | | 85528 gdb CALL sigaction(SIGINT,0x7fffffffdea0,0x7fffffffdec0) | | 85528 gdb RET sigaction 0 | | 85528 gdb CALL ptrace(PT_GETREGS,0x14e16,0x7fffffffdaf0,0) | | 85528 gdb RET ptrace -1 errno 16 Device or resource busy | | 85528 gdb CALL _umtx_op(0x18aeb10,UMTX_OP_WAKE_PRIVATE,0x7fffffff,0,0) | | 85528 gdb RET _umtx_op 0 | | 85528 gdb CALL ioctl(0x1,0x2000745e,0x1b82d80) | | 85528 gdb RET ioctl -1 errno 25 Inappropriate ioctl for device | | 85528 gdb CALL write(0x2,0x1b8bf40,0x30) | | 85528 gdb GIO fd 2 wrote 48 bytes | | "Couldn't get registers: Device or resource busy." Further instructions to gdb fail after this. "set guality_attached = 1" fails, therefore the test program does not know gdb has attached yet. | Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Cannot access memory at address 0x400906 | Couldn't get registers: Device or resource busy. | (gdb) Continuing. | Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Bottom (innermost) frame selected; you cannot go down. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Couldn't get registers: Device or resource busy. | (gdb) Continuing. | Couldn't get registers: Device or resource busy. | (gdb) Although, gdb has really attached to the test program. When the test program has waited too long for guality_attached to be set, it throws SIGSTOP, and gdb traps this, awaiting instructions. And its stdin is connected to the stopped process... | Program received signal SIGSTOP, Stopped (signal). | [Switching to LWP 100749 of process 89081] | 0x0000000000400d47 in guality_check (name=0x401275 "varl", value=6, unknown_ok=0) | at | /home/stevenc/gcc-6-6.3.0/src/gcc/testsuite/gcc.dg/guality/guality.h:335 | 335 while (--timeout && !guality_attached) | Reading symbols from /lib/x86_64-kfreebsd-gnu/libm.so.1...(no debugging symbols found)...done. | Reading symbols from /lib/x86_64-kfreebsd-gnu/libc.so.0.1...(no debugging symbols found)...done. | Reading symbols from /lib/ld-kfreebsd-x86-64.so.1...(no debugging symbols found)...done. | | Program received signal SIGSTOP, Stopped (signal). | 0x0000000000400d47 in guality_check (name=0x401275 "varl", value=6, unknown_ok=0) | at /home/stevenc/gcc-6-6.3.0/src/gcc/testsuite/gcc.dg/guality/guality.h:335 | 335 while (--timeout && !guality_attached) For reference, the instructions that were sent to gdb are: | | 85526 guality_check15612. GIO fd 4 wrote 172 bytes | | "set height 0 | | handle SIGINT pass nostop | | handle SIGTERM pass nostop | | handle SIGSEGV pass nostop | | handle SIGBUS pass nostop | | attach 85526 | | set guality_attached = 1 | | b 351 | | continue | | " | | | | 85526 guality_check15612. GIO fd 4 wrote 282 bytes | | "up | | set $value1 = 0 | | set $value1 = (varl) | | set $value2 = -1 | | set $value2 = (varl) | | set $value3 = $value1 - 1 | | set $value4 = $value1 + 1 | | set $value3 = (varl)++ | | set $value4 = --(varl) | | down | | set xvalue = $value1 | | set unavailable = $value1 != $value2 ? -1 : $value3 != $value4 ? 1 : 0 | | continue | | " pid 85526 is seen telling gdb to attach to pid 85526. That seems odd, but I think that really is intended. Thanks, Regards, -- Steven Chamberlain ste...@pyro.eu.org
signature.asc
Description: Digital signature