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

odiglet panics on UnknownProgrammingLanguage #1330

Closed
esara opened this issue Jul 7, 2024 · 0 comments
Closed

odiglet panics on UnknownProgrammingLanguage #1330

esara opened this issue Jul 7, 2024 · 0 comments

Comments

@esara
Copy link
Contributor

esara commented Jul 7, 2024

Describe the bug
odiglet detects the programming language and creates instrumentedapplication cr with lang and env details
but it panic is no lang was detected in any of the container/processes

To Reproduce
Steps to reproduce the behavior:
Enable instrumentation for a namespace, which also contains an application like nginx or redis

$ kubectl logs -f -n odigos-system odiglet-n22fq 
{"level":"info","ts":1720320222.6805646,"caller":"cmd/main.go:29","msg":"Starting odiglet"}
{"level":"info","ts":1720320222.6807983,"caller":"kube/manager.go:36","msg":"Starting reconcileres for runtime details"}
{"level":"info","ts":1720320222.6808596,"caller":"common/pprof.go:14","msg":"Starting pprof server"}
{"level":"info","ts":1720320222.6812441,"caller":"cmd/main.go:91","msg":"Starting device manager"}
{"level":"info","ts":1720320222.6891577,"caller":"server/server.go:21","msg":"Starting opamp server","listenEndpoint":"0.0.0.0:4320"}
{"level":"info","ts":1720320222.6915271,"caller":"instrumentation_ebpf/manager.go:52","msg":"Starting reconcileres for ebpf instrumentation"}
...
{"level":"info","ts":1720320222.7984848,"caller":"controller/controller.go:215","msg":"Starting workers","controller":"deployment","controllerGroup":"apps","controllerKind":"Deployment","worker count":1}
{"level":"info","ts":1720320224.3735461,"caller":"runtime_details/shared.go:99","msg":"unable to detect language for any process","pod":"redis-84b999dd75-6kzdv","container":"redis","namespace":"XXX"}
{"level":"info","ts":1720320224.3735924,"caller":"controller/controller.go:110","msg":"Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference","controller":"odigosconfiguration","controllerGroup":"odigos.io","controllerKind":"OdigosConfiguration","OdigosConfiguration":{"name":"odigos-config","namespace":"odigos-system"},"namespace":"odigos-system","name":"odigos-config","reconcileID":"0499268e-db73-41d0-8fb1-0c1ab5b08701"}
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x18fd794]

goroutine 223 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.4/pkg/internal/controller/controller.go:111 +0x1e5
panic({0x1ae7380?, 0x3011880?})
	/usr/local/go/src/runtime/panic.go:770 +0x132
github.com/odigos-io/odigos/odiglet/pkg/kube/runtime_details.runtimeInspection({0xc0007e4d88, 0x1, 0x0?}, {0xc000726220, 0x1, 0xc0012551d0?})
	/go/src/github.com/odigos-io/odigos/odiglet/pkg/kube/runtime_details/shared.go:106 +0xd54
github.com/odigos-io/odigos/odiglet/pkg/kube/runtime_details.inspectRuntimesOfRunningPods({0x20c46b0, 0xc0012551d0}, 0xc00121bc38, 0xc0012552c0, {0x20d03c0, 0xc0007399e0}, 0xc0001ecee0, {0x20ddb10, 0xc000a5f908})
	/go/src/github.com/odigos-io/odigos/odiglet/pkg/kube/runtime_details/shared.go:47 +0x188

Expected behavior
dont panic :-)

blumamir added a commit that referenced this issue Jul 7, 2024
address #1330

Co-authored-by: esara <esara@causely.io>
Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
@esara esara closed this as completed Jul 8, 2024
NeJan2020 pushed a commit to CloudDetail/odigos that referenced this issue Sep 14, 2024
address odigos-io#1330

Co-authored-by: esara <esara@causely.io>
Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant