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

Random ringbuf reader creation failures: add fd to epoll: bad file descriptor #1714

Open
pawelbeza opened this issue Mar 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@pawelbeza
Copy link

Describe the bug

Hey we're getting randomly errors like this add fd to epoll: bad file descriptor when creating ringbuf reader with NewReader().

Any guidance what we could look into. I'd love to contribute fix or improve error messaging:)

How to reproduce

That's tough as it pops up quite randomly:/

I think that might happen when underlying ebpf program got ungracefully detached (for example we attach ebpf to network interface -> interface gets deleted -> we fail to create new reader). But I'm really not sure as error message is not clear.

Version information

github.com/cilium/ebpf v0.16.1

@pawelbeza pawelbeza added the bug Something isn't working label Mar 7, 2025
@florianl
Copy link
Contributor

florianl commented Mar 7, 2025

Hey @pawelbeza 👋

Could you try to narrow down the issue a bit more? The ring buffer and eBPF program should be loaded before it gets attached to a network interface. Deleting a network interface should therefore not have an effect on the ring buffer.

Could you provide a minimal reproducer that shows how you use the ring buffer?

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

No branches or pull requests

2 participants