Closed
Description
What version of Go are you using (go version
)?
$ go version go version devel go1.18-f430bda258 Fri Oct 8 19:30:58 2021 +0000 linux/amd64
Does this issue reproduce with the latest release?
It reproduces with the latest master.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/alejandro/.cache/go-build" GOENV="/home/alejandro/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/alejandro/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/alejandro/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/alejandro/tmp/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/alejandro/tmp/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="devel go1.18-f430bda258 Fri Oct 8 19:30:58 2021 +0000" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2311224222=/tmp/go-build -gno-record-gcc-switches"
What did you do?
git clone [email protected]:golang/go.git
cd go/src
./all.bash
What did you expect to see?
I expected all the tests to pass.
What did you see instead?
TestGdbPythonCgo
failed. See the details below:
Failed test:
--- FAIL: TestGdbPythonCgo (4.03s) runtime-gdb_test.go:76: gdb version 11.1 runtime-gdb_test.go:265: gdb output: Dwarf Error: wrong unit_type in compilation unit header (is 0xdf, should be one of: DW_UT_compile, DW_UT_skeleton, DW_UT_split_compile, DW_UT_type or DW_UT_split_type) [in module /tmp/TestGdbPythonCgo1508114694/001/a.exe] Loading Go Runtime support. Loading Go Runtime support. No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". hi map[a:[b c d] e:[f g h]], 99, spongepants [Inferior 1 (process 540128) exited normally] BEGIN info goroutines Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 449, in invoke for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END BEGIN print mapvar No symbol table is loaded. Use the "file" command. END BEGIN print slicemap No symbol table is loaded. Use the "file" command. END BEGIN print strvar No symbol table is loaded. Use the "file" command. END BEGIN print chanint No symbol table is loaded. Use the "file" command. END BEGIN print chanstr No symbol table is loaded. Use the "file" command. END BEGIN info locals No frame selected. END BEGIN goroutine 1 bt Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 543, in invoke self.invoke_per_goid(goid, cmd) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 546, in invoke_per_goid pc, sp = find_goroutine(goid) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 474, in find_goroutine for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END BEGIN goroutine all bt Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 537, in invoke for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] The program is not being run. BEGIN goroutine 1 bt at the end Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 543, in invoke self.invoke_per_goid(goid, cmd) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 546, in invoke_per_goid pc, sp = find_goroutine(goid) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 474, in find_goroutine for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END runtime-gdb_test.go:284: package testing source file: /home/alejandro/tmp/go/src/runtime/runtime-gdb_test.go runtime-gdb_test.go:285: failed to load Go runtime support: Dwarf Error: wrong unit_type in compilation unit header (is 0xdf, should be one of: DW_UT_compile, DW_UT_skeleton, DW_UT_split_compile, DW_UT_type or DW_UT_split_type) [in module /tmp/TestGdbPythonCgo1508114694/001/a.exe] Dwarf Error: wrong unit_type in compilation unit header (is 0xdf, should be one of: DW_UT_compile, DW_UT_skeleton, DW_UT_split_compile, DW_UT_type or DW_UT_split_type) [in module /tmp/TestGdbPythonCgo1508114694/001/a.exe] Loading Go Runtime support. Loading Go Runtime support. No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". hi map[a:[b c d] e:[f g h]], 99, spongepants [Inferior 1 (process 540128) exited normally] BEGIN info goroutines Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 449, in invoke for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END BEGIN print mapvar No symbol table is loaded. Use the "file" command. END BEGIN print slicemap No symbol table is loaded. Use the "file" command. END BEGIN print strvar No symbol table is loaded. Use the "file" command. END BEGIN print chanint No symbol table is loaded. Use the "file" command. END BEGIN print chanstr No symbol table is loaded. Use the "file" command. END BEGIN info locals No frame selected. END BEGIN goroutine 1 bt Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 543, in invoke self.invoke_per_goid(goid, cmd) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 546, in invoke_per_goid pc, sp = find_goroutine(goid) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 474, in find_goroutine for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END BEGIN goroutine all bt Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 537, in invoke for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] The program is not being run. BEGIN goroutine 1 bt at the end Traceback (most recent call last): File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 543, in invoke self.invoke_per_goid(goid, cmd) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 546, in invoke_per_goid pc, sp = find_goroutine(goid) File "/home/alejandro/tmp/go/src/runtime/runtime-gdb.py", line 474, in find_goroutine for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): gdb.error: 'runtime.allgs' has unknown type; cast it to its declared type Error occurred in Python: 'runtime.allgs' has unknown type; cast it to its declared type END FAIL FAIL runtime 156.682s
Not sure if related to #39204, but opening a new one because the last comment there is from March. In any case, we can close this if it is considered duplicated and I can add a comment in #39204 to include this case.