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

Repeated EAGAIN errors during UFFD handling without balloon device #5056

Open
2 of 3 tasks
ValentaTomas opened this issue Feb 28, 2025 · 2 comments
Open
2 of 3 tasks

Comments

@ValentaTomas
Copy link
Contributor

ValentaTomas commented Feb 28, 2025

Describe the bug

When serving memfile with hugepages via UFFD, I sometimes get EAGAIN errors that are not resolved by retrying (for cca 200ms—4096 retries with minimal 50µs delay).

I’m not using balloon device, so I think the behavior described here and here should not apply, but our UFFD handler is still getting the repeated EAGAINs, even though this get triggered very randomly.

Expected behaviour

There should be either no EAGAINs or they should be resolved after waiting.

Environment

  • Firecracker version: v1.10.1
  • Host and guest kernel versions: 6.8.0-1018-gcp (host), vmlinux-6.1.102 (guest)
  • Architecture: x86_64

Checks

  • Have you searched the Firecracker Issues database for similar problems?
  • Have you read the existing relevant Firecracker documentation?
  • Are you certain the bug being reported is a Firecracker issue?
@ValentaTomas ValentaTomas changed the title Constant EAGAIN errors during UFFD handling without balloon device Repeated EAGAIN errors during UFFD handling without balloon device Feb 28, 2025
@Manciukic
Copy link
Contributor

Hey Tomas,
thanks for opening this issue. Do you have a reproducer for the issue you're describing?
I don't remember seeing any such issue in the past or in our testing. At a quick glance, it seems that -EAGAIN on read is triggered when there is nothing to read on the fd (https://elixir.bootlin.com/linux/v6.8.12/source/fs/userfaultfd.c#L1149).
Are you sure there are events to read on the fd?
I had a quick look at the code you linked and I didn't see a check for it after the poll (ie pollFds[0].Revents & unix.POLLIN != 0).
Thanks

@ValentaTomas
Copy link
Contributor Author

ValentaTomas commented Feb 28, 2025

Thank you @Manciukic, I'll be looking into this as it might be the case!

EDIT: I don't have a quick reproducer.

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

2 participants