From: Miklos S. <mi...@sz...> - 2011-10-14 16:25:33
|
Michael Berlin <mic...@go...> writes: > Hi, > > We are using Fuse to develop our XtreemFS client and it works very well :-) > > I'm also using the interruption support of Fuse to allow interrupting > the retry of blocked operations. Therefore I did register my signal > handler on SIGUSR1 and it works as excepted for all commands except the > read() command: If a read() is interrupted, the signal handler does not > get called while the program performing the read() itself (for instance > a "cat ~/mnt/_Readme.txt") is properly interrupted. As the read() is > still running in the background and retrying, the release() on the file > is also delayed until the read() finally returned. > > I installed Fuse 2.8.5 with enabled debug symbols on my system and tried > to narrow down the issue: > > find_interrupted() in fuse_lowlevel.c fails to find the active read() > request: In particular, the check in line 1005 does not succeed: > if (curr->unique == req->u.i.unique) { > as the value for curr->unique is always off by one (compared to the > value in req->u.i.unique), for instance 293 != 294. > > Are you aware of any other projects which use the Fuse interruption > support? So far I could not find a popular example where I could verify > my findings. Therefore, I also included instructions how to reproduce > the error for further debugging using our XtreemFS client at the end of > this mail. I'm not aware of any project using interrupts. > What about interruption of read ahead in Fuse in general? Are interrupt > requests sent to the Fuse library for every pending read()? From the > current experiences I guess that's not the case. You are correct, not all interrupt of read(2) will reach the library. And the cause is indeed read-ahead or read by an unrelated process. Have you tried the 'direct_io' option? That should help, but it has side effects (no caching, no mmap, ...). It depends on your case whether you prefer to do 'direct_io' or not. Thanks, Miklos |