Nil pointer dereference exception in libbeat/processors/add_kubernetes_metadata/kubernetes.go:161


(Okke Formsma) #1

I am seeing an issue in Filebeat 6.2.2. I'm running libbeat in a container on Kubernetes. Every other hour, the process will crash with the following stack trace:

panic: runtime error: invalid memory address or nil pointer dereference
	March 11th 2018, 11:51:44.107	167,691	[signal SIGSEGV: segmentation violation code=0x1 addr=0x158 pc=0x13dd8ba]

goroutine 76 [running]:
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*ContainerIndexer).GetIndexes(0xc42040a1f0, 0x0, 0xc4203ec900, 0xc4204bd620, 0xc4204bd560)
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/indexers.go:161 +0x3a
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*Indexers).GetIndexes(0xc4203ec900, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/indexers.go:76 +0x230
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*kubernetesAnnotator).removePod(0xc42018e620, 0x0)
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:188 +0x3d
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*kubernetesAnnotator).(github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.removePod)-fm(0x0)
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:159 +0x34
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.processEvent(0xc4205bded0, 0xc420956060)
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:175 +0x78
github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.(*kubernetesAnnotator).worker(0xc42018e620)
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:159 +0x26f
created by github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata.newKubernetesAnnotator
/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:113 +0x9f7

The offending line of code is the following:

Any clue to why this might happen?


(Carlos PĂ©rez Aradros) #2

Hi @okke-formsma,

Thank you for reporting this! Actually this was a known issue that was recently fixed: https://github.com/elastic/beats/issues/6372

Next version (6.2.3) will be released soon, and it will pack a fix for this!

Best regards


(Okke Formsma) #3

Hi @exekias,

Thanks for the reply! I hadn't seen that github issue.

Regards

Okke


(system) #4

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