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

Add test scripts to test UFFD handler + balloon interactions #4989

Closed

Conversation

maggie-lou
Copy link

@maggie-lou maggie-lou commented Jan 10, 2025

This PR is not intended to be merged - it is just a demonstration of this issue: #4988

This PR adds logging to the UFFD handler example when the it receives a remove event.

Steps to recreate the problem. You will need 3 terminals:

  1. (Only needs to be run once): Prepare rootfs and guest kernel: get_rootfs_guest_kernel.sh
  2. [Terminal A] Run firecracker: run_firecracker.sh
  3. [Terminal B] Initialize a VM with a balloon and snapshot it: snapshot_vm.sh
  4. [Terminal A] You will probably need to kill the former firecracker process and restart it: run_firecracker.sh
  5. [Terminal C] Start the UFFD handler with the snapshot: run_uffd_handler.sh
  • Sometimes there are permissions issues if you previously used sudo tools/devtool build to build a custom firecracker version because the UFFD handler is not run as root. I sudo rm -rf build/cargo_target/debug and use the script to rebuild the artifacts as the current user
  1. [Terminal B] Expand the balloon. We'd expect the UFFD handler to receive EVENT_REMOVE events: trigger_remove_events.sh

On firecracker v1.10.0, the UFFD handler does not receive any EVENT_REMOVE events. With this patch, it will receive REMOVE events

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

Successfully merging this pull request may close these issues.

1 participant