-
Notifications
You must be signed in to change notification settings - Fork 118
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
nova error with some pwrite calls #102
Comments
Here's another example we found that exhibits more clearly buggy behavior. Here's a zip file with two programs that reproduce it: programs.zip. fuzzer.c was generated by our fuzzer and simpler.c is a slightly simplified version of the same program. Here's the contents of the programs in pseudocode. In the programs,
We tried removing some of the extra After running this program on NOVA, running Thanks! |
It looks to me that since the pwrite() specifies a large count, NOVA allocates the required NVMM data pages, and hence run out of log pages, as they share the NVMM space. Is that the case? Is write/pwrite with count larger than the buffer size an undefined behavior? |
Apologies for the delayed response. I believe what you describe is correct, where NOVA allocates the number of requested pages and runs out of space. It's not immediately clear to me whether calling write/pwrite with a count larger than the buffer size is undefined behavior here. POSIX does define what should occur when a I did a bit more experimentation with the example and found that file0 ends up having a size that is the same size as the provided buffer, eg. using a buffer of 15000 bytes makes file0 have size 15000. This seems potentially incorrect based on the POSIX spec combined with the fact that the NVMM device doesn't have any free space. It would make sense to me if the file just ended up being huge and taking up most/all of the NVMM, but that doesn't seem to be what's happening - what's the expected behavior for NOVA in this case? Also, deleting the file does not free up the space; I still can't, e.g. create a new file even after file0 has been deleted. Anyway, I'd be interested in hearing your thoughts on this if you get a chance. Even if this is undefined behavior and legal by POSIX/Linux standards, it seems undesirable. |
I have pushed a commit to cleanup the incomplete write in this case. Try if it helps. |
Hi,
I've encountered some weird behavior in NOVA that can result in
nova error
messages popping up. Unlike the other issues I've raise recently, this is not crash related and appears when we just run NOVA normally. We are working on a fuzzer to generate tests for our crash consistency testing framework and came across this while using the fuzzer.The root of the behavior seems to be calls to
pwrite
where thecount
parameter specifying the length is longer than the provided buffer. When we run a test with such apwrite
call, we usually see something like the following in dmesg after running the program:It's manifested in a couple different ways, some of which cause errors at unmount time or in subsequent system calls. Here's an example workload where I've been able to get it to manifest reliably on a 1-core VM. I am running this example on an empty instance of NOVA.
If I unmount the system immediately after running this, I see
nova error
appear on the terminal and get the following messages in dmesg:Remounting the system seems to go fine and
foo
is present with the expected contents, but we've noticed in the fuzzer that sometimes it seems to cause other issues, like not being able to create a directory following thepwrite
call. We're working on finding some more examples that exhibit more clearly buggy behavior and I'll add them when we do.Thanks!
The text was updated successfully, but these errors were encountered: