maxcnunes / waitforit

Wait until an address become available.
MIT License
172 stars 26 forks source link

segfault on https endpoints on GKE #30

Open nsteinmetz opened 4 years ago

nsteinmetz commented 4 years ago

Hi,

Playing again with waitforit in another context, we spawn kubernetes clusters and wait for their availability.

We see this behaviour when deployed on GKE:

+ /usr/local/bin/waitforit -address https://y11gke114-beta.corp.tld/login -status 200 -retry 5000 -timeout 600 -debug -- echo Environment is ready
2019/11/09 09:29:22 Waiting 600 seconds
2019/11/09 09:29:22 Ping host: y11gke114-beta.corp.tld:443
2019/11/09 09:29:22 Ping host: y11gke114-beta.corp.tldi:443
2019/11/09 09:29:22 Up: y11gke114-beta.saagie.mobi:443
2019/11/09 09:29:22 Ping http address: https://y11gke114-beta.corp.tld:443/login
2019/11/09 09:29:22 Expect HTTP status200
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x639852]

goroutine 5 [running]:
main.pingAddress(0xc00000a340, 0xc000045f80, 0x6dc378, 0x0, 0x0)
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:93 +0x4a2
main.DialConn(0xc00000a340, 0xc00006df80, 0x6dc378, 0x0, 0xc000034737)
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:45 +0x182
main.DialConfigs.func1(0xc00001e2a0, 0x6dc378, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffca9a664d3, 0x28, 0xc8, ...)
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:24 +0x186
created by main.DialConfigs
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:17 +0x127
[Pipeline] }

It's run in a Jenkins pipeline, in a docker container (python:3.7-slim-buster) as we also have some python scripts.

Lines seems matching with #17 to some extend.

Or should there just be a new release with an updated go version ?

Will compare with our other environments to see if it's happenning also.

nsteinmetz commented 4 years ago

I also have still on GKE a change on goroutine 18 and not 5

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

goroutine 18 [running]:
main.pingAddress(0xc000090300, 0xc000073f80, 0x6dc378, 0x0, 0x0)
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:93 +0x4a2
main.DialConn(0xc000090300, 0xc00006df80, 0x6dc378, 0x0, 0xc000034737)
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:45 +0x182
main.DialConfigs.func1(0xc000074120, 0x6dc378, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffdde89c4d3, 0x28, 0xc8, ...)
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:24 +0x186
created by main.DialConfigs
    /Users/maxnunes/Development/go/src/github.com/maxcnunes/waitforit/network.go:17 +0x127
nsteinmetz commented 4 years ago

We have it once only on EKS