Article View: muc.lists.freebsd.bugs
Article #501[Bug 300857] [fusefs] Requests to a slow fuse daemon can snowball, leading to extreme memory usage in fuse_msgbuf
From: bugzilla-noreply
Date: Tue, 17 Nov 2026 23:35
Date: Tue, 17 Nov 2026 23:35
78 lines
4669 bytes
4669 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300857
Bug ID: 300857
Summary: [fusefs] Requests to a slow fuse daemon can snowball,
leading to extreme memory usage in fuse_msgbuf
Product: Base System
Version: 15.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: asomers@FreeBSD.org
BUG
===
If a fuse daemon cannot answer requests as fast as a process can make them,
they might start to time out, leading to a snowball situation where millions of
requests get queued and eventually all RAM is exhausted.
DIAGNOSTICS
===========
* A large value for the vfs.fusefs.stats.ticket_count sysctl. Normally this
should be in the dozens. If it's in the millions, that's a problem.
* A large amount of memory in the fuse_msgbuf zone, as shown by "vmstat -m",
approaching all of the system's RAM.
WORKAROUND
==========
Killing the userspace process that's accessing the fuse file system is not
sufficient. The file system must be forcibly unmounted with "umount -f".
Doing that will successfully deallocate the memory.
ANALYSIS
========
The fusefs file system has a timeout that defaults to 60s. If the daemon fails
to respond to a request in that time, the request will fail with ETIMEDOUT.
However, fusefs doesn't actually remove that request from the request queue.
So the daemon still has the burden of processing it, even though the client
process will never get the answer. That can lead to poor performance. It
could even be a correctness issue; for example, the daemon might complete a
write that the client thinks failed. Worse, the client might retry the
request. Our own `namei` function for example will retry VOP_LOOKUP in
response to ETIMEDOUT. Combined with the lack-of-removal-from-the-queue that
creates positive feedback: if the daemon is too slow to respond to all of its
requests in timely fashion then it gets even more work to do, causing it to
fall even further behind. It can snowball badly.
STEPS TO REPRODUCE
==================
I have seen this bug triggered multiple times by running a command like `find .
-ls` on a slow ntfs-3g file system (from filesystems/ntfs) in ports. I don't
yet have a minimal reproducer.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-300857-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 300857] [fusefs] Requests to a slow fuse daemon can snowball, leading to extreme memory usage in fuse_msgbuf Date: Tue, 17 Nov 2026 23:35:39 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-300857-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="85080"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794958539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oyuI+w4QRvdpOWXTpDv5YfqKNT3B0b6TyjY0BRkUsVc=; b=SlH9/SvmL95uWE6npOQ5mAW1RG0u/47QkkgBQLptIe86akJvqa8dn7GenDHl1VgKL3gpPf nkdaBQmrtdEhCJS6OQo5SZ2TJ+mTIT8YTu/so/kyIs/Pl70W1vBp7yKx433fwQPKPgyjGP hhPcmNWD01L6//n9/aK09fkirl1Qnc6dHbbgD6aUkMU3nA83/qajPzhaOf2jHKs/ACsxX9 zhoL5oZRxlUBfEJcSFvSmQUzqJpBarUIE8v4joHTEO+Dp7g+niq7JgpxRUYtpIb1UO+eP+ ehBQRpOItP5P3sfXzdt9ltKFtZRpBr9R6/nlg370QAZq8ukT5xA4G0s22rTxNA== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes