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

avoid panic on shared container data by getting it once #478

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Conversation

matthyx
Copy link
Contributor

@matthyx matthyx commented Feb 7, 2025

No description provided.

@matthyx matthyx requested a review from amitschendel February 7, 2025 21:07
Copy link

github-actions bot commented Feb 7, 2025

Summary:

  • License scan: failure
  • Credentials scan: failure
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: success

Copy link

github-actions bot commented Feb 7, 2025

Summary:

  • License scan: failure
  • Credentials scan: failure
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: success

@matthyx matthyx marked this pull request as draft February 7, 2025 22:21
Copy link

github-actions bot commented Feb 7, 2025

Summary:

  • License scan: failure
  • Credentials scan: failure
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: success

@matthyx matthyx marked this pull request as ready for review February 8, 2025 08:03
Copy link

github-actions bot commented Feb 8, 2025

Summary:

  • License scan: failure
  • Credentials scan: failure
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: success

@amitschendel
Copy link
Collaborator

Did it panic? or you just want to be on the safe side in either case? because the waitForSharedContainerData function returns error if it doesn't find the containerID.

@matthyx
Copy link
Contributor Author

matthyx commented Feb 9, 2025

at least twice in our clusters (reported by Boris):

{"level":"debug","ts":"2025-02-03T12:06:10Z","msg":"RuleManager - start monitor on container","container ID":"307edf170381bbf40cd5a573bdbf14f5524e1d5941abb857a004462c6f50708f","k8s container id":"event-sourcing-be-prod/user-input-ingester-5788f8bc57-h7phl/user-input-ingester"}
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=0x68 pc=0x2abc5fb]

goroutine 32869 [running]:
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
        /go/pkg/mod/go.opentelemetry.io/otel/[email protected]/trace/span.go:467 +0x25
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0xc009d6f2c0, {0x0, 0x0, 0xc009180700?})
        /go/pkg/mod/go.opentelemetry.io/otel/[email protected]/trace/span.go:506 +0xb7b
panic({0x3459de0?, 0x6f5a510?})
        /usr/local/go/src/runtime/panic.go:785 +0x132
github.com/kubescape/node-agent/pkg/networkmanager/v2.(*NetworkManager).startNetworkMonitoring(0xc000f45688, {0x44f57f8, 0xc009152e70}, 0xc008d898c0, {0xc006da3860, 0x51})
        /go/pkg/mod/github.com/kubescape/[email protected]/pkg/networkmanager/v2/network_manager.go:411 +0xa3b
created by github.com/kubescape/node-agent/pkg/networkmanager/v2.(*NetworkManager).ContainerCallback in goroutine 32852
        /go/pkg/mod/github.com/kubescape/[email protected]/pkg/networkmanager/v2/network_manager.go:473 +0x90f

@matthyx matthyx merged commit ee88fa6 into main Feb 9, 2025
32 of 33 checks passed
@matthyx matthyx deleted the panic branch February 9, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants