Repository navigation
Description
Versions v0.12.1 & v0.12.2 docker images crash.
Earlier version v.0.12.0 works OK!
A clear and concise description of what the bug is.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x11d159f]
To Reproduce
Steps to reproduce the behavior:
-
use the file "cloudprober.cfg' with contents:
surfacer {
type: FILE
}
probe {
name: "http_yahoo"
type: HTTP
targets {
host_names: "www.yahoo.com"
}
interval_msec: 10000 # Probe every 10s
timeout_msec: 1000
} -
Run the command
docker run -v /path-to-folder/cloudprober.cfg:/etc/cloudprober.cfg cloudprober/cloudprober -
See error
Additional context
I0126 00:52:18.343862 1 prober.go:111] [cloudprober.global] Creating a HTTP probe: http_yahoo
I0126 00:52:18.343950 1 http.go:240] [cloudprober.http_yahoo] Targets update interval: 1m0s
I0126 00:52:18.344089 1 probestatus.go:192] [cloudprober.probestatus] Initialized status surfacer at the URL: probesstatus
I0126 00:52:18.344403 1 sysvars.go:185] [cloudprober.sysvars] 1674694338 labels=ptype=sysvars,probe=sysvars hostname="8cd958312c86" start_timestamp="1674694338" version="v0.12.2"
I0126 00:52:18.883305 1 prober.go:295] [cloudprober.global] Starting probe: http_yahoo
I0126 00:52:18.883394 1 http.go:544] [cloudprober.http_yahoo] Probe(http_yahoo) targets updated: map[www.yahoo.com_0:ADD]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x11d173f]
goroutine 69 [running]:
github.com/cloudprober/cloudprober/probes/http.(*Probe).httpRequestForTarget(0xc0005de0d0, {{0xc0001ca2e0, 0xd}, 0x0, {0x0, 0x0, 0x0}, 0x0, {0x0, 0x0, ...}})
/home/runner/work/cloudprober/cloudprober/probes/http/request.go:98 +0xff
github.com/cloudprober/cloudprober/probes/http.(*Probe).startForTarget(0xc0005de0d0, {0x1b045b0, 0xc0005bc500}, {{0xc0001ca2e0, 0xd}, 0x0, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
/home/runner/work/cloudprober/cloudprober/probes/http/http.go:487 +0x125
github.com/cloudprober/cloudprober/probes/http.(*Probe).updateTargetsAndStartProbes.func2({{0xc0001ca2e0, 0xd}, 0x0, {0x0, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0}}, ...)
/home/runner/work/cloudprober/cloudprober/probes/http/http.go:582 +0x155
created by github.com/cloudprober/cloudprober/probes/http.(*Probe).updateTargetsAndStartProbes
/home/runner/work/cloudprober/cloudprober/probes/http/http.go:578 +0x674
Activity
manugarg commentedon Jan 26, 2023
Ah, it seems my change in #223 didn't really fix #219. I've re-opened #219.