From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:58379 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbeLZWbC (ORCPT ); Wed, 26 Dec 2018 17:31:02 -0500 From: Nikolaus Rath To: Miklos Szeredi Cc: Miklos Szeredi , fuse-devel , linux-fsdevel@vger.kernel.org, Sahitya Tummala , David Sheets , Tahsin Erdogan , Al Viro Subject: Re: [fuse-devel] Reading from fuse pipe fails with EBADFD References: <8736rmb728.fsf@vostro.rath.org> <875zw97jfv.fsf@thinkpad.rath.org> <87k1kpxghk.fsf@vostro.rath.org> Date: Wed, 26 Dec 2018 22:30:56 +0000 In-Reply-To: (Miklos Szeredi's message of "Mon, 10 Dec 2018 10:19:07 +0100") Message-ID: <87lg4bncnz.fsf@vostro.rath.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Dec 10 2018, Miklos Szeredi wrote: > On Tue, Dec 4, 2018 at 8:02 PM Nikolaus Rath wrote: >> >> On Dec 04 2018, Miklos Szeredi wrote: >> > On Tue, Dec 4, 2018 at 10:03 AM Nikolaus Rath wrot= e: >> >> >> >> Hi, >> >> >> >> Really no one any suggestion for debugging this? >> >> >> >> (Adding some more people who recently worked on fs/fuse) >> >> >> >> Best, >> >> -Nikolaus >> >> >> >> On Nov 27 2018, Nikolaus Rath wrote: >> >> > Hi, >> >> > >> >> > When testing FUSE under heavy load, I am occasionally getting EBADFD >> >> > errors when reading from the fuse pipe. >> > >> > EBADFD or EBADF? >> >> EBADF ("Bad file descriptor"), sorry. > > Can you run the thing with "strace -f ..."? Apologies for the delayed response. I have been trying to reproduce this but have instead run into another problem: the *client* getting spurious EBADF warnings. I am not sure if this is related or unrelated, and it has been hard to debug because it does not happen under strace: $ find mnt > /dev/null find: =E2=80=98mnt/modules/4.18.0-0.bpo.3-amd64/kernel/net/8021q=E2=80=99: = Bad file descriptor find: =E2=80=98mnt/modules/4.18.0-0.bpo.3-amd64/kernel/drivers/net/ethernet= /natsemi=E2=80=99: Bad file descriptor This happens in roughly 1 in 2 runs, and the affected directory entries are always different. Disabling readdirplus does not make a difference. $ strace -o log find mnt > /dev/null never gave in error in roughly 20 attempts. Similarly, enabling fuse debug logging also makes the problem go away. I also found some odd warnings in dmesg: [24472.435256] fuse: trying to steal weird page [24472.435261] page=3D00000000b5b89670 index=3D0 flags=3D17fffc0000000ad,= count=3D1, mapcount=3D0, map ..happens a lot (and I just wrote another email about it), and=20 [24473.170110] VFS: Lookup of '4.18.0-0.bpo.1-amd64' in fuse fuse would hav= e caused loop happened only a few times (and the `fuse` string is indeed duplicated). When this happens, `find` complains that: $ find mnt > /dev/null find: File system loop detected; =E2=80=98mnt/modules/4.18.0-0.bpo.1-amd64/= kernel/drivers/w1=E2=80=99 is part of the same file system loop as =E2=80= =98mnt/modules=E2=80=99 Does this ring any bells with anyone? 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