From nobody Fri Sep 5 00:14:43 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cHxgN04yQz66lc0; Fri, 05 Sep 2025 00:14:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cHxgM5SScz47gG; Fri, 05 Sep 2025 00:14:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5850Ehs9068289; Fri, 5 Sep 2025 03:14:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5850Ehs9068289 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5850EhhN068288; Fri, 5 Sep 2025 03:14:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2025 03:14:43 +0300 From: Konstantin Belousov To: obiwac Cc: freebsd-current@freebsd.org, freebsd-fs@freebsd.org, alan.somers@freebsd.org Subject: Re: Fuse issue with attr caching expecting write lock Message-ID: References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cHxgM5SScz47gG On Fri, Sep 05, 2025 at 01:36:39AM +0200, obiwac wrote: > Hi! > > When trying to access a large file with sshfs (on fuse), I get a > kernel panic because fuse_internal_cache_attrs is asserting a write > lock when it is sometimes being called from fuse_internal_do_getattr, > which only asserts a read lock. > > To me (i.e. someone who has never touched VFS or fuse code) this code > looks wrong, and fuse_internal_do_getattr should be acquiring a write > lock around its call to fuse_internal_cache_attrs, but clearly it has > been working just fine for a while now as this code hasn't changed > super recently so I could be missing something. It is only the assertions that were enabled recently. Mark merged DEBUG_VFS_LOCKS option into INVARIANTS.