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

go build: nil pointer dereference, http, time #37777

Closed
pierrre opened this issue Mar 10, 2020 · 2 comments
Closed

go build: nil pointer dereference, http, time #37777

pierrre opened this issue Mar 10, 2020 · 2 comments

Comments

@pierrre
Copy link

@pierrre pierrre commented Mar 10, 2020

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

$ go version
go version go1.14 linux/amd64

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="amd64"
GOBIN=""
GOCACHE="/home/pierre/.cache/go-build"
GOENV="/home/pierre/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/pierre/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/pierre/.gimme/versions/go1.14.src"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/pierre/.gimme/versions/go1.14.src/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/pierre/gosrc/github.com/xxx/yyy/go.mod"
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-build013449314=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I'm building a project inside a Docker image (FROM golang:1.14.0-buster).

#13 0.448 go build -v -ldflags="-s -w -X main.version=c2aac494c4755c5efe9f5a8fd10d3c2a3294feb0" -o build ./cmd/...
#13 1.711 go: downloading github.com/xxx/zzz v1.77.2
#13 1.715 go: downloading go.mongodb.org/mongo-driver v1.3.1
#13 1.716 go: downloading github.com/elastic/go-elasticsearch/v7 v7.6.0
#13 1.717 go: downloading github.com/segmentio/kafka-go v0.3.5
#13 1.967 go: downloading github.com/gorilla/mux v1.7.4
#13 1.989 go: downloading gopkg.in/DataDog/dd-trace-go.v1 v1.22.0
#13 1.989 go: downloading github.com/davecgh/go-spew v1.1.1
#13 1.992 go: downloading github.com/opentracing/opentracing-go v1.1.0
#13 1.995 go: downloading github.com/getsentry/raven-go v0.2.0
#13 2.031 go: downloading github.com/pkg/errors v0.9.1
#13 2.057 go: downloading github.com/certifi/gocertifi v0.0.0-20200211180108-c7c1fbc02894
#13 2.178 go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
#13 2.180 go: downloading github.com/tinylib/msgp v1.1.1
#13 2.195 go: downloading github.com/DataDog/datadog-go v3.4.0+incompatible
#13 2.198 panic: runtime error: invalid memory address or nil pointer dereference
#13 2.198 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45375d]
#13 2.198 
#13 2.198 goroutine 354 [running]:
#13 2.198 time.stopTimer(0xc0000b10e8, 0x0)
#13 2.198 	/usr/local/go/src/runtime/time.go:224 +0x2b
#13 2.198 time.(*Timer).Stop(...)
#13 2.198 	/usr/local/go/src/time/sleep.go:78
#13 2.198 net/http.(*http2ClientConn).roundTrip(0xc000082780, 0xc0005b2200, 0x0, 0x0, 0x0, 0x0)
#13 2.198 	/usr/local/go/src/net/http/h2_bundle.go:7480 +0x9f
#13 2.198 net/http.(*http2Transport).RoundTripOpt(0xc0000a4060, 0xc0005b2200, 0x9a1500, 0xc0000962a0, 0xc000855140, 0x5)
#13 2.198 	/usr/local/go/src/net/http/h2_bundle.go:6948 +0x16f
#13 2.198 net/http.(*http2Transport).RoundTrip(...)
#13 2.198 	/usr/local/go/src/net/http/h2_bundle.go:6909
#13 2.198 net/http.http2noDialH2RoundTripper.RoundTrip(0xc0000a4060, 0xc0005b2200, 0xb2e0a0, 0xc0000a4060, 0x0)
#13 2.199 	/usr/local/go/src/net/http/h2_bundle.go:9103 +0x3e
#13 2.199 net/http.(*Transport).roundTrip(0xebee00, 0xc0005b2200, 0xc0002ca600, 0xc000c9a9e8, 0x40e388)
#13 2.199 	/usr/local/go/src/net/http/transport.go:515 +0xd94
#13 2.199 net/http.(*Transport).RoundTrip(0xebee00, 0xc0005b2200, 0xebee00, 0x0, 0x0)
#13 2.199 	/usr/local/go/src/net/http/roundtrip.go:17 +0x35
#13 2.199 net/http.send(0xc0005b2200, 0xb2d3c0, 0xebee00, 0x0, 0x0, 0x0, 0xc0007fa030, 0x203000, 0x1, 0x0)
#13 2.199 	/usr/local/go/src/net/http/client.go:252 +0x43e
#13 2.199 net/http.(*Client).send(0xeb6520, 0xc0005b2200, 0x0, 0x0, 0x0, 0xc0007fa030, 0x0, 0x1, 0xc0005b2200)
#13 2.200 	/usr/local/go/src/net/http/client.go:176 +0xfa
#13 2.200 net/http.(*Client).do(0xeb6520, 0xc0005b2200, 0x0, 0x0, 0x0)
#13 2.200 	/usr/local/go/src/net/http/client.go:699 +0x44a
#13 2.200 net/http.(*Client).Do(...)
#13 2.200 	/usr/local/go/src/net/http/client.go:567
#13 2.200 cmd/go/internal/web.get.func1(0xc0006dc000, 0xc0006dc000, 0x0, 0x0, 0x97a6c0)
#13 2.200 	/usr/local/go/src/cmd/go/internal/web/http.go:96 +0x115
#13 2.200 cmd/go/internal/web.get(0x1, 0xc0001b0fe8, 0x2, 0xc0002ca500, 0x3f)
#13 2.200 	/usr/local/go/src/cmd/go/internal/web/http.go:111 +0x19a
#13 2.200 cmd/go/internal/web.Get(...)
#13 2.200 	/usr/local/go/src/cmd/go/internal/web/api.go:183
#13 2.200 cmd/go/internal/modfetch.(*proxyRepo).getBody(0xc000355e20, 0xc0004aa080, 0x1a, 0xc000368100, 0x13, 0xa3658c, 0x4)
#13 2.201 	/usr/local/go/src/cmd/go/internal/modfetch/proxy.go:266 +0x17d
#13 2.201 cmd/go/internal/modfetch.(*proxyRepo).Zip(0xc000355e20, 0xb2d620, 0xc0007fa020, 0xc000368100, 0x13, 0x0, 0x0)
#13 2.201 	/usr/local/go/src/cmd/go/internal/modfetch/proxy.go:416 +0x1d7
#13 2.201 cmd/go/internal/modfetch.(*cachingRepo).Zip(0xc0000b0b90, 0xb2d620, 0xc0007fa020, 0xc000368100, 0x13, 0xc0000b0b90, 0x0)
#13 2.201 	/usr/local/go/src/cmd/go/internal/modfetch/cache.go:242 +0x5c
#13 2.201 cmd/go/internal/modfetch.downloadZip.func2(0xa477b4, 0x18, 0xb2d100, 0xc00002c100)
#13 2.201 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:214 +0xbd
#13 2.201 cmd/go/internal/modfetch.TryProxies(0xc0001b1360, 0x3d, 0xc00085511e)
#13 2.201 	/usr/local/go/src/cmd/go/internal/modfetch/proxy.go:171 +0x9e
#13 2.201 cmd/go/internal/modfetch.downloadZip(0xc0003b1700, 0x1d, 0xc000368100, 0x13, 0xc000aaca20, 0x55, 0x0, 0x0)
#13 2.202 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:209 +0x2b8
#13 2.202 cmd/go/internal/modfetch.DownloadZip.func1(0x0, 0x0)
#13 2.202 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:173 +0x2b3
#13 2.202 cmd/go/internal/par.(*Cache).Do(0xec79a0, 0x9d7ac0, 0xc00024c220, 0xc000c9b538, 0xb2e260, 0xe77640)
#13 2.202 	/usr/local/go/src/cmd/go/internal/par/work.go:128 +0xf3
#13 2.202 cmd/go/internal/modfetch.DownloadZip(0xc0003b1700, 0x1d, 0xc000368100, 0x13, 0xb2d680, 0xc000688c00, 0x3f, 0x3f)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:144 +0xd3
#13 2.205 cmd/go/internal/modfetch.download(0xc0003b1700, 0x1d, 0xc000368100, 0x13, 0xc00041eec0, 0x3f, 0xb2d680, 0xc000688c00)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:71 +0xca
#13 2.205 cmd/go/internal/modfetch.Download.func1(0xec7960, 0x9d7ac0)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:52 +0xa2
#13 2.205 cmd/go/internal/par.(*Cache).Do(0xec7960, 0x9d7ac0, 0xc00024c1e0, 0xc000c9b878, 0x746e496e694d090a, 0x312d203d20203436)
#13 2.205 	/usr/local/go/src/cmd/go/internal/par/work.go:128 +0xf3
#13 2.205 cmd/go/internal/modfetch.Download(0xc0003b1700, 0x1d, 0xc000368100, 0x13, 0x0, 0x0, 0x4f2587, 0xc0004c1111)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modfetch/fetch.go:47 +0xef
#13 2.205 cmd/go/internal/modload.fetch(0xc0003b1700, 0x1d, 0xc000368100, 0x13, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modload/load.go:1343 +0xfb
#13 2.205 cmd/go/internal/modload.Import(0xc0004c1111, 0x24, 0x3, 0x0, 0xffffffffffffffff, 0xc0002f68a1, 0xc, 0x8, 0x0, 0x0)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modload/import.go:157 +0x1b6f
#13 2.205 cmd/go/internal/modload.(*loader).doPkg(0xc000066480, 0x9a58e0, 0xc0004039a0)
#13 2.205 	/usr/local/go/src/cmd/go/internal/modload/load.go:770 +0x3c2
#13 2.205 cmd/go/internal/par.(*Work).runner(0xc000406400)
#13 2.205 	/usr/local/go/src/cmd/go/internal/par/work.go:101 +0x157
#13 2.205 created by cmd/go/internal/par.(*Work).Do
#13 2.205 	/usr/local/go/src/cmd/go/internal/par/work.go:67 +0x9b
#13 2.208 make: *** [Makefile-project.mk:17: build] Error 2
#13 ERROR: executor failed running [/bin/sh -c make github-auth build]: runc did not terminate sucessfully

I can't reproduce this error.
After restarting my build, it worked.

What did you expect to see?

It should build my application.

What did you see instead?

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Mar 10, 2020

Duplicate of #37449

@bcmills bcmills marked this as a duplicate of #37449 Mar 10, 2020
@bcmills bcmills closed this Mar 10, 2020
@pierrre

This comment has been minimized.

Copy link
Author

@pierrre pierrre commented Mar 10, 2020

ooops, sorry, I didn't find it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.