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

keda-operator crashs with SIGSEGV for kafka scaler #688

Closed
flecno opened this issue Mar 17, 2020 · 0 comments · Fixed by #689
Closed

keda-operator crashs with SIGSEGV for kafka scaler #688

flecno opened this issue Mar 17, 2020 · 0 comments · Fixed by #689
Labels
bug Something isn't working

Comments

@flecno
Copy link
Contributor

flecno commented Mar 17, 2020

Expected Behavior

If the offset lag cannot be polled return 0 and do not crash with SIGSEGV.

Actual Behavior

keda-operator crashs with SIGSEGV:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13c43ad]
goroutine 1544 [running]:
github.com/kedacore/keda/pkg/scalers.(*kafkaScaler).getLagForPartition(0xc0008f03c0, 0xc000000017, 0xc000978de0, 0x32)
	keda/pkg/scalers/kafka_scaler.go:281 +0x5d
github.com/kedacore/keda/pkg/scalers.(*kafkaScaler).IsActive(0xc0008f03c0, 0x21c2060, 0xc0017d0200, 0x1, 0x1, 0xc0016d2900)
	keda/pkg/scalers/kafka_scaler.go:168 +0xe0
github.com/kedacore/keda/pkg/handler.(*ScaleHandler).handleScaleDeployment(0xc0008aa630, 0x21c2060, 0xc0017d0200, 0xc000b96340)
	keda/pkg/handler/scale_loop.go:119 +0x11a
github.com/kedacore/keda/pkg/handler.(*ScaleHandler).handleScale(0xc0008aa630, 0x21c2060, 0xc0017d0200, 0xc000b96340)
	keda/pkg/handler/scale_loop.go:45 +0x6b
github.com/kedacore/keda/pkg/handler.(*ScaleHandler).HandleScaleLoop(0xc0008aa630, 0x21c2060, 0xc0017d0200, 0xc000b96340)
	keda/pkg/handler/scale_loop.go:14 +0x1d2
created by github.com/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).startScaleLoop
	keda/pkg/controller/scaledobject/scaledobject_controller.go:333 +0x35f

Steps to Reproduce the Problem

This problem occurs only when a kafka topic partition is not clean and ready to use. I have seen that when a broker as partition leader restarts.

Specifications

  • KEDA Version: 1.2.0
  • Platform & Version: GKE COS
  • Kubernetes Version: v1.14.10-gke.17/v1.15.9-gke.8
  • Scaler(s): kafka
@flecno flecno added the bug Something isn't working label Mar 17, 2020
SpiritZhou pushed a commit to SpiritZhou/keda that referenced this issue Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant