Skip to content

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