Bug 211674 - sysutils/fusefs-ntfs: fuse_vnode leak/reclamation failure
Summary: sysutils/fusefs-ntfs: fuse_vnode leak/reclamation failure
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
Keywords: needs-qa
Depends on:
Reported: 2016-08-08 17:43 UTC by Mahmoud Al-Qudsi
Modified: 2019-08-09 13:16 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd)


Note You need to log in before you can comment on or make changes to this bug.
Description Mahmoud Al-Qudsi 2016-08-08 17:43:55 UTC

Running on FreeBSD 10.3-RELEASE-p6/i386 with fuse compiled into kernel and with fusefs-ntfs 2016.2.22 installed, there is a fuse_vnode leak (though it seems it may be more of a complete failure to reclaim vnodes) resulting in quick resource exhaustion.


This is easily reproduced with the following:

ntfs-3g /dev/xxx /mnt/yyyy
cd /mnt/yyyy
find . -exec touch {} \;

In another virtual terminal:

vmstat | head -n1; vmstat -m | sed 1d | sort -hk 3,3


fuse_vnode will continuously balloon, and will not be reclaimed until the filesystem is unmounted.

(likewise, fuse_msgbuff also balloons but unlike fuse_vnode, it is never reclaimed. Separate PR?)


fuse_vnode entries should be reclaimed


Here's a snapshot of the fuse-related vmstat entries after this process:

fuse_vnode 36020 9005K - 502349 256
fuse_msgbuf 58141 14895K - 311095 256,512,1024,2048,4096,8192
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-17 10:38:09 UTC
Is this still relevant?
Comment 2 Alan Somers freebsd_committer 2019-04-03 15:04:01 UTC
The fact that fuse_msgbuf is high indicates that the FUSE server isn't responding to some commands.  However, you shouldn't read anything into the fuse_vnode memory.  That doesn't get freed until VOP_RECLAIM, which won't happen unless another file system needs those vnodes.

So I think this is a bug in the port, not the kernel.  However, I will try to reproduce it if you give me some better instructions.  Being unfamiliar with fuse-ntfs3g, I need more detailed reproduction instructions.  Include which packages to install, the command for formatting a new disk, and how to fill the filesystem.