Skip to content
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: TestGdbPythonCgo failure with "'runtime.allgs' has unknown type" on linux/amd64 #48874

Closed
agarciamontoro opened this issue Oct 8, 2021 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@agarciamontoro
Copy link
Contributor

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 git@github.com: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.

@bcmills
Copy link
Contributor

bcmills commented Oct 11, 2021

Duplicate of #35743

@bcmills bcmills marked this as a duplicate of #35743 Oct 11, 2021
@bcmills bcmills closed this as completed Oct 11, 2021
@bcmills
Copy link
Contributor

bcmills commented Oct 11, 2021

Actually, the failure mode here doesn't match #35743. 😞

@bcmills bcmills reopened this Oct 11, 2021
@bcmills bcmills changed the title runtime: TestGdbPythonCgo failing on linux/amd64 runtime: TestGdbPythonCgo failure with "'runtime.allgs' has unknown type" on linux/amd64 Oct 11, 2021
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 11, 2021
@bcmills
Copy link
Contributor

bcmills commented Oct 11, 2021

@agarciamontoro, was this an isolated failure, or is it reproducible for you?

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 11, 2021
@bcmills bcmills added this to the Backlog milestone Oct 11, 2021
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@bcmills
Copy link
Contributor

bcmills commented Nov 11, 2021

As far as I can tell, this failure mode has never occurred in the Go dashboard builders:

greplogs --dashboard -md -l -e '(?ms)FAIL: TestGdb.*has unknown type'

(no output)

This may depend on the specific version of gdb in use; without detailed steps to reproduce I don't think we can make progress on it.

@golang golang locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants