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

kprobe panics with no user friendly error if device is not kprobe configured. #23

Open
datariot opened this issue Mar 15, 2023 · 0 comments

Comments

@datariot
Copy link

Situation
If a device is not configured as kprobe at creation time, then there are custom fields that are not associated with it in the configuration.

This will result in the error:

thread 'main' panicked at 'no entry found for key', src/custom.rs:81:26

which is not very helpful for debugging what happened. It looks like there are several tickets that have come up around this issue in the past: https://github.com/search?q=org%3Akentik+%22no+entry+found+for+key%22&type=issues.

Target
kprobe fails with an error that helps people debug the issue.

Proposal
Instead of accessing the map in a way that will cause the panic, capture an error that the field doesn't exist so the device was not setup as a kprobe device.

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