umount() taking minutes for FUSE filesystems

Nikolaus Rath Nikolaus at rath.org
Mon Sep 11 10:20:55 UTC 2017


On Sep 08 2017, Nikolaus Rath <Nikolaus at rath.org> wrote:
> On Sep 08 2017, Martin Simmons <martin at lispworks.com> wrote:
>>>>>>> On Thu, 07 Sep 2017 21:14:32 +0200, Nikolaus Rath said:
>>> 
>>> On Sep 05 2017, Martin Simmons <martin at lispworks.com> wrote:
>>> >> Probably the crucial difference is that the test that takes long exits
>>> >> its main loop on its own and then informs the FUSE kernel module about
>>> >> that, while the other tests terminate the main loop because the kernel
>>> >> module tells them to do so.
>>> >
>>> > What does "informs the FUSE kernel module about that" do to inform it?
>>> 
>>> It calls unmount.
>>> https://github.com/libfuse/libfuse/blob/master/lib/mount_bsd.c#L127
>>
>> It seems to me that the following occurs:
>>
>> 1. The user program exits the main loop.
>> 2. The user program sends unmount to the kernel.
>> 3. The kernel sends FUSE_DESTROY to the user program.
>> 4. The kernel waits for the user program to respond to FUSE_DESTROY.
>> 5. The user program does not respond because it has exited the main loop.
>> 6. The kernel wait times out after 60 seconds.
>>
>> Perhaps the solution is to close the fd before calling unmount(), like the
>> Linux code in https://github.com/libfuse/libfuse/blob/master/lib/mount.c#L275
>> does?
>
> That sounds reasonable, will give it a shot.

This indeed fixed the problem. Thanks!

Best,
-Nikolaus

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


More information about the freebsd-fs mailing list