Bug 187261 - [fusefs] FUSE kernel panic when using socket / bind
Summary: [fusefs] FUSE kernel panic when using socket / bind
Status: Closed DUPLICATE of bug 195000
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
Depends on:
Reported: 2014-03-04 18:10 UTC by Kris Moore
Modified: 2017-12-04 01:03 UTC (History)
2 users (show)

See Also:

file.shar (8.03 KB, text/plain)
2014-03-04 18:10 UTC, Kris Moore
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kris Moore 2014-03-04 18:10:00 UTC
I've run across an interesting bug in our fuse implementation. It looks like whenever a program running on the FUSE layer tries to create a socket() and then use bind(), it will immediately trigger a kernel panic. 

This is very likely the source of a number of fuse related kernel panics.

Fix: The kernel panic messages refer to fuse_vnop_create() being the culprit, located in sys/fs/fuse/fuse_vnops.c

Patch attached with submission follows:
How-To-Repeat: I've attached an example to let you trigger this bug. Extract the archive and then compile "fusexmp.c" and socktest.c

% cc -Wall `pkg-config fuse --cflags --libs` fusexmp.c -o fusexmp
% cc socktest.c -o socktest

Now mount the fuse passthrough filesystem, chroot and run the socktest program. You should see an immediate kernel panic. 

# ./fusexmp /mnt
# chroot /mnt
# cd <pathtosock>
# ./socktest
Comment 1 Kris Moore 2014-03-04 18:35:37 UTC
You can download the text-dump from the system below.


Kris Moore
PC-BSD Software
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2014-03-05 03:25:57 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Comment 3 Henry Hu 2015-02-12 21:33:52 UTC
I've submitted bug 195000 which seems to be closely related to this bug, and I've provided a temporary fix. Please try that patch and check if it works.
It's triggered through rsync, but it's also related to socket, and it also crashes in fuse_vnop_create.
Comment 4 Henry Hu 2017-12-04 00:42:15 UTC
bug 195000 has been closed, and all the fixes are committed. I think that this bug should have been fixed.
Comment 5 Conrad Meyer freebsd_committer 2017-12-04 01:03:25 UTC

*** This bug has been marked as a duplicate of bug 195000 ***