I've come across a bug that manifests in a similar way to #132. I'm running a program that creates a file, calls fallocate() on it with one file descriptor, then opens two new file descriptors and writes to it with one of them. Interestingly it seems that the file needs to open 3 file descriptors in order to trigger the bug. Here's a program that should reproduce it: test8.zip
Here are the steps to reproduce (note that this bug does not require a crash to reproduce:
Mount NOVA with mount -t NOVA -o init /dev/pmem0 /mnt/pmem
Run the attached program. If you run cat /mnt/pmem/file0, it should print out a bunch of 'a's. stat /mnt/pmem/file0 should output the following:
Hi Andiry,
I've come across a bug that manifests in a similar way to #132. I'm running a program that creates a file, calls
fallocate()
on it with one file descriptor, then opens two new file descriptors and writes to it with one of them. Interestingly it seems that the file needs to open 3 file descriptors in order to trigger the bug. Here's a program that should reproduce it: test8.zipHere are the steps to reproduce (note that this bug does not require a crash to reproduce:
mount -t NOVA -o init /dev/pmem0 /mnt/pmem
cat /mnt/pmem/file0
, it should print out a bunch of 'a's.stat /mnt/pmem/file0
should output the following:stat
andcat
file0.stat /mnt/pmem/file0
will give the same output, butcat
will output nothing, i.e., the file's contents are gone/zeroed out.Let me know if you are able to reproduce it. Thanks!