Date: Mon, 11 Sep 2017 11:20:50 +0100 From: Nikolaus Rath <Nikolaus@rath.org> To: freebsd-fs@freebsd.org Subject: Re: umount() taking minutes for FUSE filesystems Message-ID: <87a821a64d.fsf@vostro.rath.org> In-Reply-To: <87lglp6zj8.fsf@vostro.rath.org> (Nikolaus Rath's message of "Fri, 08 Sep 2017 15:22:19 %2B0100") References: <87bmn44ruu.fsf@vostro.rath.org> <87o9qyrbs8.fsf@vostro.rath.org> <CAG6CVpWX1TPtR65dXkC4A_-hiSrh0L524mcPtcQM=K28RM7vWw@mail.gmail.com> <2FAD66DE-031B-4B36-9E85-C7BC6B52B5E6@gmail.com> <29de6425-9f92-3bd8-f446-1c9dded33b15@freebsd.org> <87k21dzdrp.fsf@thinkpad.rath.org> <201709051811.v85IBmbO005440@higson.cam.lispworks.com> <87ingugw2v.fsf@thinkpad.rath.org> <201709081143.v88BhEOn001626@higson.cam.lispworks.com> <87lglp6zj8.fsf@vostro.rath.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 08 2017, Nikolaus Rath <Nikolaus@rath.org> wrote: > On Sep 08 2017, Martin Simmons <martin@lispworks.com> wrote: >>>>>>> On Thu, 07 Sep 2017 21:14:32 +0200, Nikolaus Rath said: >>>=20 >>> On Sep 05 2017, Martin Simmons <martin@lispworks.com> wrote: >>> >> Probably the crucial difference is that the test that takes long exi= ts >>> >> its main loop on its own and then informs the FUSE kernel module abo= ut >>> >> that, while the other tests terminate the main loop because the kern= el >>> >> module tells them to do so. >>> > >>> > What does "informs the FUSE kernel module about that" do to inform it? >>>=20 >>> 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 t= he >> 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 --=20 GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87a821a64d.fsf>