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: SIGSEGV in log.(*Logger).formatHeader #49262

Open
vkatopod opened this issue Nov 1, 2021 · 4 comments
Open

runtime: SIGSEGV in log.(*Logger).formatHeader #49262

vkatopod opened this issue Nov 1, 2021 · 4 comments

Comments

@vkatopod
Copy link

@vkatopod vkatopod commented Nov 1, 2021

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

$ go version
go version go1.16.5 linux/amd64

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

go env Output
$ go env
go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="*.nokia.com"
GOOS="linux"
GOPATH="/go/"
GOPRIVATE=""
GOPROXY="https://repo.lab.pl.alcatel-lucent.com/gocenter"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org https://repo.lab.pl.alcatel-lucent.com/sum-golang-org/"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17.1"
GCCGO="gccgo"
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-build4210459107=/tmp/go-build -gno-record-gcc-switches"

What did you do?

The process is running inside a container with base image centos-micro:7.9-22.0,
by calling:

/opt/health/healthClient <port_number>

What did you expect to see?

To create a client connection:

[HOME]/src/health/healthClient/main.go:21
conn, err := grpc.Dial(port, grpc.WithInsecure())
if err != nil {
l4g.Fatal("did not connect: %s", err)
}

What did you see instead?

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x46e0e8]

goroutine 1 [running]:
log.(*Logger).formatHeader(0xc000132140, 0xc000132170, 0xc04c9a9734a8c319, 0x600dae8, 0xc09120, 0x0, 0x0, 0x0)
/usr/local/go/src/log/log.go:105 +0x16e5
log.(*Logger).Output(0xc000132140, 0x2, 0xc000028560, 0x19, 0x0, 0x0)
/usr/local/go/src/log/log.go:179 +0x18d
log.(*Logger).Println(0xc000132140, 0xc0000205c0, 0x2, 0x2)
/usr/local/go/src/log/log.go:200 +0x6a
google.golang.org/grpc/grpclog.(*loggerT).Infoln(0xc0000200e0, 0xc0000205c0, 0x2, 0x2)
[HOME]/pkg/mod/google.golang.org/grpc@v1.36.0/grpclog/loggerv2.go:153 +0x58
google.golang.org/grpc/internal/grpclog.InfoDepth(0x2, 0xc0000205c0, 0x2, 0x2)
[HOME]/pkg/mod/google.golang.org/grpc@v1.36.0/internal/grpclog/grpclog.go:37 +0xa6
google.golang.org/grpc/grpclog.(*componentData).InfoDepth(0xc000112770, 0x1, 0xc000113c90, 0x1, 0x2)
[HOME]/pkg/mod/google.golang.org/grpc@v1.36.0/grpclog/component.go:36 +0x177
google.golang.org/grpc/internal/channelz.Infof(0x978298, 0xc000112770, 0x0, 0x8eba25, 0x11, 0xc000293950, 0x1, 0x1)
[HOME]/pkg/mod/google.golang.org/grpc@v1.36.0/internal/channelz/logging.go:50 +0x1a8
google.golang.org/grpc.DialContext(0x972a10, 0xc00002e058, 0x7ffc25c5a8f2, 0xe, 0xc000293f18, 0x1, 0x1, 0x0, 0x0, 0x0)
[HOME]/pkg/mod/google.golang.org/grpc@v1.36.0/clientconn.go:251 +0x996
google.golang.org/grpc.Dial(...)
[HOME]/pkg/mod/google.golang.org/grpc@v1.36.0/clientconn.go:105
main.main()
[HOME]/src/health/healthClient/main.go:21 +0xf8

@thanm
Copy link
Contributor

@thanm thanm commented Nov 1, 2021

It is not clear to me why this would be a Go problem as opposed to a grpc problem. Have you filed this issue with grpc first?

Loading

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 1, 2021

Please confirm that you are not actually running Go 1.6.5, a release that never existed and would be long out of support if it did exist.

Loading

@thanm
Copy link
Contributor

@thanm thanm commented Nov 1, 2021

The "go env" blurb cited above includes this:

GOVERSION="go1.17.1"

so I hopefully the 1.6.5 is just a typo.

Loading

@vkatopod
Copy link
Author

@vkatopod vkatopod commented Nov 1, 2021

Sorry it was actually a typo. The version was go 1.16.5.
The code build is part of Jenkins pipeline and the go version has been updated. The go version is the only change regarding the go env variables.

Loading

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
3 participants