[Filebeat : v7.9.3] Invalid memory address or nil pointer dereference

Filebeat version: 7.9.3

I met some issue about "invalid memory address or nil pointer dereference" which caused a panic. But i cannot figure out why that happened. Below is the stack of the panic.

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

goroutine 182 [running]:
github.com/elastic/beats/v7/libbeat/monitoring/report/log.makeDeltaSnapshot(0xc04faaee10, 0xc04faaee40, 0xc04faaee70, 0xc04faaeea0, 0xc04faaeed0, 0xc00702b950, 0xc00702b980, 0xc00702b9b0, 0xc00702b9e0, 0xc00702ba10, ...)
	/go/src/netease.com/libbeat/monitoring/report/log/log.go:174 +0x452
github.com/elastic/beats/v7/libbeat/monitoring/report/log.(*reporter).snapshotLoop(0xc000a9c660)
	/go/src/netease.com/libbeat/monitoring/report/log/log.go:136 +0x2b6
github.com/elastic/beats/v7/libbeat/monitoring/report/log.MakeReporter.func1(0xc000a9c660)
	/go/src/netease.com/libbeat/monitoring/report/log/log.go:107 +0x50
created by github.com/elastic/beats/v7/libbeat/monitoring/report/log.MakeReporter
	/go/src/netease.com/libbeat/monitoring/report/log/log.go:105 +0x15c

Hi,

could you check if it's reproducible with a newer version of filebeat?

The point is it happens occasionally. Not very often, maybe once a few weeks.
Because the problem happened in our production environment, i cannot update to a newer version of filebeat immediately.

The key code is here:

From the code i don't know under what circumstance the panic could happen

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.