-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Guest process reads stale data from shared memory region instead of latest host updates #5037
Comments
HI @Nafug22,
Where do you reopen it? Did you modify Firecracker to do it or do you reopen it in the guest process reading from the device? Considering you are using a Overall it seems you are trying to implement some version of |
Thank you for your help! After modifying I reopen the file descriptor in the guest process without modifying Firecracker. This happens right before the guest process reads the data. The entire process is as follows:
Without reopening the file descriptor in the third step, the guest continues to read stale data. If this helps, the host actually cannot normally read data written by the guest. I need to call |
Ok, interesting, are you |
Describe the bug
The guest process continues to read stale data instead of the latest updates written by the host in the shared memory region.
To Reproduce
Expected behaviour
The guest process should read the updated data instead of a stale version.
Environment
6.8.0-52-generic
for host;4.14.174
for guestAdditional context
I discovered that reopening the file descriptor resolves the issue. However, due to the associated overhead, I would prefer a solution that avoids reopening.
This issue may be related to the read() function caching the file upon opening, preventing it from detecting changes made by the host until the file is reopened.
I'm unsure if this behavior is intentional for isolation purposes. I attempted to use
O_DIRECT
as a custom flag and also triedlseek
, but both resulted in the microVM shutting down.Checks
The text was updated successfully, but these errors were encountered: