Comments (15)
thanks for your report. This is an interesting trace. It shows that it's calling fusermount
despite specifying DirectMount
. This is because there is a fallback; did you try using StrictDirectMount ?
Subprocessing with FUSE is a known source of deadlocks, see https://pkg.go.dev/github.com/hanwen/go-fuse/v2/fs#hdr-Deadlocks. Obviously, the umount
operation should work, but if you force direct mounting, I think the problem will go away.
I'll try to have a detailed look later this week.
from go-fuse.
Switching to DirectMountStrict: true
indeed fixes things. Thanks!
from go-fuse.
Some debugging:
- problem is related to the subprocess for the mount; the unmount seems OK
- problem goes away if we disable the poll hack
from go-fuse.
found a trace here:
syscall.Syscall6(0x100c000143818?, 0x7f7bbc608718?, 0xc0000cc4e0?, 0xc000034000?, 0x47e970?, 0xc0000b5bb0?, 0xc0000b5c28?)
/usr/lib/golang/src/syscall/syscall_linux.go:91 +0x30 fp=0xc0000b5b70 sp=0xc0000b5ae8 pc=0x47e970
syscall.Syscall6(0x10f, 0xc0000b5ce0, 0x1, 0xc0000b5c90, 0x0, 0x0, 0x0)
<autogenerated>:1 +0x3d fp=0xc0000b5bb8 sp=0xc0000b5b70 pc=0x47eefd
golang.org/x/sys/unix.ppoll(0xc0000225c0?, 0x38?, 0x38?, 0xc0000225c0?)
/home/hanwen/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_linux.go:124 +0x57 fp=0xc0000b5c38 sp=0xc0000b5bb8 pc=0x5391f7
golang.org/x/sys/unix.Ppoll({0xc0000b5ce0?, 0x0?, 0xc0000225c0?}, 0x0?, 0xffffffffffffff9c?)
/home/hanwen/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:148 +0x38 fp=0xc0000b5c68 sp=0xc0000b5c38 pc=0x539078
golang.org/x/sys/unix.Poll({0xc0000b5ce0?, 0xc0000225c0?, 0xc000067438?}, 0x10?)
/home/hanwen/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:157 +0x8d fp=0xc0000b5cb0 sp=0xc0000b5c68 pc=0x53914d
github.com/hanwen/go-fuse/v2/fuse.pollHack({0xc0000203c0?, 0xc00012aac0?})
/home/hanwen/vc/go-fuse/fuse/poll_linux.go:22 +0xaf fp=0xc0000b5d18 sp=0xc0000b5cb0 pc=0x543ecf
github.com/hanwen/go-fuse/v2/fuse.(*Server).WaitMount(0xc000161ba0)
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
if len(fds) == 0 {
return ppoll(nil, 0, timeout, sigmask)
}
return ppoll(&fds[0], len(fds), timeout, sigmask)
}
if ppoll has special support for nonblocking i/o again, we are hosed again.
from go-fuse.
This is probably the scenario that involves dup3 documented at https://pkg.go.dev/github.com/hanwen/go-fuse/v2/fs#hdr-Deadlocks
When writing that section, I didn´t realize that fusermount itself uses inherited file descriptors.
from go-fuse.
further detail of why the pollhack is involved: consider 2 threads (t1, t2). If t1 initiates the pollhack, it might get fd 3 for the poll hack. Then, if t2 calls fusermount, the mechanism above causes a FLUSH on the pollhack fd.
from go-fuse.
see https://review.gerrithub.io/c/hanwen/go-fuse/+/1186976
from go-fuse.
Posting on Gerrithub failed for some obscure reason [1] so posting here:
I tested https://review.gerrithub.io/c/hanwen/go-fuse/+/1186976 . TestParallelMount passes with the init() change and hangs without it. LGTM.
[1]:
An error occurred
Error submitting review Error: selector 'gr-label-scores' did not match anything'
from go-fuse.
PS: gocryptfs already has something similar for different reasons. It's so things don't completely explode when fds 0,1,2 are not open.
from go-fuse.
thanks, I wonder what is up with gerrithub. I couldnt add you to the review yesterday.
the "collapse" button on the reply dialog is also broken.
from go-fuse.
fixed in 36b3591
from go-fuse.
i've tagged v2.5.1 for this.
from go-fuse.
The open question is: why doesn't DirectMount work? I looked at the code and I don't see how this can do the wrong thing.
from go-fuse.
not an open question. I think the tests were run as a normal user, so DirectMount fails with permission error. Then we fallback to fusermount.
from go-fuse.
from go-fuse.
Related Issues (20)
- panic: XTIMES (80000000) overlaps with INIT_RESERVED (80000000) in v2.4.2 on darwin HOT 1
- Error when build gocryptfs with 2.4.2 release HOT 1
- What's the detail limitations on macOS?
- loopbackfs encountered 'utimensat' error when using `cp` HOT 6
- opcode POLL HOT 8
- panic: LARGEFILE (8000) overlaps with LARGEFILE (8000) HOT 2
- Loopback fs could no be used inside a tree HOT 1
- Should Inode.Forgotten() return true if Inode.changeCounter == 0? HOT 6
- Error message when using `DirectMount: true`: writer: Write/Writev failed, err: 2=no such file or directory. opcode: RELEASE HOT 4
- Support for linux FUSE_SETXATTR_EXT HOT 1
- FUSE Passthrough Support
- Support for fuse_custom_io feature HOT 2
- Implementing Loopback FS - memory access error in path() function HOT 3
- Issues when unmounting on linux/ darwin HOT 15
- Changing filesize in Getattr Loopback HOT 2
- conflicting values on mipsel64 HOT 1
- macFUSE + LoopbackFS copying files through Finder not working HOT 7
- darwin: go-fuse/fuse.CAP_RENAME_SWAP has value 1<<25 while VFS_RENAME_SWAP has value 0x00000002
- how to use go-fuse HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-fuse.