-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime: linux/arm64 runtime.Breakpoint times out #14875
Comments
What is the output of "thread apply all bt" in gdb?
|
$ gdb ./testprog Thread 7 (LWP 13293): Thread 6 (LWP 13292): ---Type to continue, or q to quit--- Thread 4 (LWP 13290): Thread 3 (LWP 13289): Thread 2 (LWP 13288): |
@minux Any clues from that backtrace? |
I didn't see anything special in the backtrace. Somehow the BKPT
instruction doesn't trigger a SIGTRAP signal and make program stuck.
|
We have a builder for arm64 GNU/Linux, and it is running the tests, and is not showing any problem. That said, according to https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02228.html we should be using Could you try running this C program with and without an argument and tell us the output and exit status for each case? Thanks.
|
FWIW, I can't reproduce this on a pine64 board running linux/arm64. Using tip @ c83e6f5, linux jessie, GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1. I did: $ cd src/runtime/testdata/testprog
$ go build
$ gdb ./testprog
// ...
(gdb) r Breakpoint
Program received signal SIGTRAP, Trace/breakpoint trap.
runtime.breakpoint () at /home/debian/go/src/runtime/asm_arm64.s:97
97 BRK In addition to trying the C program from @ianlancetaylor, you might also try manually sending a SIGTRAP ( |
fyi - not able to reproduce it on my Odroid-C2 Using tip @ a65a96, UbuntuMate, GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11 $ gdb ./testprog This GDB was configured as "aarch64-linux-gnu". (gdb) r Breakpoint Thread 1 "testprog" received signal SIGTRAP, Trace/breakpoint trap. |
Thanks for trying. @9nut I'm going to close this issue until we get more information about your system. See questions above. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go 1.6 and current tip (go version devel +fc6bcde Fri Mar 18 23:26:36 2016 +0000 linux/arm64)
go env
)?GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/odroid/go"
GOTOOLDIR="/home/odroid/go/pkg/tool/linux_arm64"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build271441235=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Using a bootstrap environment built on linux/amd64, built Go from sources on linux/arm64.
ALL TESTS PASSED
runtime.Breakpoint test times out. all other tests succeed. as minux suggested, here's the gdb backtrace of runtime/testdata/testprog Breakpoint when it hangs:
$ pwd
/home/odroid/go/src/runtime/testdata/testprog
$ go version
go version devel +fc6bcde Fri Mar 18 23:26:36 2016 +0000 linux/arm64
$ gdb ./testprog
GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./testprog...done.
warning: File "/home/odroid/go/src/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/odroid/go/src/runtime/runtime-gdb.py
line to your configuration file "/home/odroid/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/odroid/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) r Breakpoint
Starting program: /home/odroid/go/src/runtime/testdata/testprog/testprog Breakpoint
[New LWP 23014]
[New LWP 23015]
[New LWP 23017]
[New LWP 23016]
[LWP 23011 exited]
^C
Thread 2 "testprog" received signal SIGINT, Interrupt.
[Switching to LWP 23014]
runtime.usleep () at /home/odroid/go/src/runtime/sys_linux_arm64.s:141
141 SVC
(gdb) bt
#0 runtime.usleep () at /home/odroid/go/src/runtime/sys_linux_arm64.s:141
#1 0x00000000000432c8 in runtime.mstart1 ()
#2 0x0000000000000001 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
The text was updated successfully, but these errors were encountered: