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
Request for information: How to proper cleanup on eBPF program termination/panic. #838
Comments
What kernel are you running on? Newer kernels (>= 5.9) will unload xdp programs when the creating process terminates, older kernels won't. |
I'm on 6.1
|
Odd, can you run your userspace program under strace -e bpf and paste the output? |
|
It is using |
Thank you for the pointers. Let me get familiar with aya tests as well as kernel behavior. |
Quick follow up question, re: BPF_LINK_CREATE, is this the step after which a file is created in
(iirc correctly from other articles, guides, some files should exists there during the program execution. Update: I think I'm mixing this with 'pinning'. If so, please ignore this. |
Correct, it’s pinning that creates files in bpffs |
Tried running integration tests, with fresh
|
what kernel are you running on and what command did you run to run the tests? |
I'm on 6.1, and ran tests as:
|
Hi Team,
Thank you for a very handy library. I'm new to aya and eBPF in general. I'm trying to figure out whether my observations are expected, or I am missing some chunk of code that would properly cleanup after program termination. I created a project from the aya template and implemented an xdp program following the guide in the aya book. The program was executed several times, and it either got terminated by me, or panic'd. When I run
bpftool prog
I keep seeing entries for all of the times the program was run.Is this expected? My impression is that this command would be showing only currently active programs. If the above is a sign of not properly cleaning up program's resources, could you point me to how cleanup is generally done with aya?
Any bit of information is appreciated. Thank you.
The text was updated successfully, but these errors were encountered: