fuse returns ENOENT to openat() for symlink probabilistically

胡玮文 sehuww at mail.scut.edu.cn
Thu Jan 21 21:12:33 AEDT 2021


Hi all,

I'm working on setting up CI service to run tests automatically. Now I have got
tests with kernel mount succeeded. But some tests with fuse fails
probabilistically. Here are my discoveries:

* if I run fssum in tests/src from experimental-tests branch multiple times, it
returns different checksums for the same image and same erofsfuse process.

* if I run "diff -r" on the source and the mounted directories, all file
content matches. but sometimes, diff reports "diff:
test-mount/lib/.libs/liberofs.la: No such file or directory". This file is a
symlink to "../liberofs.la". Then I use strace to confirm that openat() system
call to this path returned ENOENT incorrectly. strace outputs:

openat(AT_FDCWD, "test-mount/lib/.libs/liberofs.la", O_RDONLY) = -1 ENOENT (No such file or directory)

* However, If I just do "cat test-mount/lib/.libs/liberofs.la" several hundreds
of times, I cannot trigger this issue.

* I can reproduce this on both compressed and uncompressed images.

There seems a race condition, but I cannot figure it out. I'm not familiar with
fuse. But I would like to debug further if someone can provide me any advice or
guidance.

Thanks,
Hu Weiwen



More information about the Linux-erofs mailing list