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 fails on arm w/1.18 #51694

Open
satmandu opened this issue Mar 16, 2022 · 5 comments
Open

runtime: TestGdbPythonCgo fails on arm w/1.18 #51694

satmandu opened this issue Mar 16, 2022 · 5 comments
Labels
NeedsInvestigation
Milestone

Comments

@satmandu
Copy link

@satmandu satmandu commented Mar 16, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18 linux/arm

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output

$ ./go env
GO111MODULE=""
GOARCH="arm"
GOBIN=""
GOCACHE="/home/chronos/user/.cache/go-build"
GOENV="/home/chronos/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/chronos/user/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/chronos/user/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/tmp/crew/go.20220316024607.dir/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/tmp/crew/go.20220316024607.dir/go/pkg/tool/linux_arm"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOARM="7"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/usr/local/tmp/go-build137372635=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go tool dist test

What did you expect to see?

Not a failure!

What did you see instead?

--- FAIL: TestGdbPythonCgo (42.37s)
    runtime-gdb_test.go:76: gdb version 11.2
    runtime-gdb_test.go:265: gdb output:
        Loading Go Runtime support.
        Breakpoint 1 at 0x923c8: file /usr/local/tmp/TestGdbPythonCgo3489257781/001/main.go, line 27.
        warning: Error disabling address space randomization: Success
        
        Program received signal SIGILL, Illegal instruction.
        0xf7d390c8 in _dl_debug_state () from /lib/ld-linux-armhf.so.3
        BEGIN info goroutines
        END
        BEGIN print mapvar
        No symbol "mapvar" in current context.
        END
        BEGIN print slicemap
        No symbol "slicemap" in current context.
        END
        BEGIN print strvar
        No symbol "strvar" in current context.
        END
        BEGIN print chanint
        No symbol "chanint" in current context.
        END
        BEGIN print chanstr
        No symbol "chanstr" in current context.
        END
        BEGIN info locals
        No symbol table info available.
        END
        BEGIN goroutine 1 bt
        No such goroutine:  1
        END
        BEGIN goroutine all bt
        END
        No break
point at main.go:15.
        Breakpoint 2 at 0x924ec: file /usr/local/tmp/TestGdbPythonCgo3489257781/001/main.go, line 30.
        
        Program terminated with signal SIGILL, Illegal instruction.
        The program no longer exists.
        BEGIN goroutine 1 bt at the end
        No such goroutine:  1
        END
    runtime-gdb_test.go:297: info goroutines failed: END
        BEGIN print mapvar
        No symbol "mapvar" in current context.
FAIL
FAIL	runtime	375.303s

Build log:
go-1.18-armv7l.log

@satmandu satmandu changed the title go 1.18: 'go tool dist test' fails on arm TestGdbPythonCgo fails on arm w/1.18 Mar 16, 2022
@satmandu satmandu changed the title TestGdbPythonCgo fails on arm w/1.18 runtime: TestGdbPythonCgo fails on arm w/1.18 Mar 16, 2022
@heschi heschi added the NeedsInvestigation label Mar 16, 2022
@heschi heschi added this to the Backlog milestone Mar 16, 2022
@heschi
Copy link
Contributor

@heschi heschi commented Mar 16, 2022

cc @golang/runtime, though this seems more likely to be a GDB bug than anything else. Do the tests pass with 1.17?

@satmandu
Copy link
Author

@satmandu satmandu commented Mar 16, 2022

I haven't tried 1.17. The tests did pass with our last version, 1.16.3. This is for the Chromebrew package for go.

If go tool dist test is overkill for making sure the built binaries work ok, that's fine too. (In which case, would you please suggest a sensible post-compile test command line that should pass before we release the binaries?)

@satmandu
Copy link
Author

@satmandu satmandu commented Mar 16, 2022

For what it is worth, we have gdb 11.2 on these armv7l systems.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Mar 16, 2022

The tests should pass.

But this looks like a bug in /lib/ld-linux-armhf.so.3. Why would that get a SIGILL? Is it compiled for a version of ARM that your system does not use? Or as @heschi suggests it could be a problem in the way that gdb was built. Does gdb work on other programs?

@satmandu
Copy link
Author

@satmandu satmandu commented Mar 17, 2022

That ld-linux-armhf.so.3 is from google, so we are stuck with that. gdb appears to work on other programs though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

3 participants