goofys
goofys copied to clipboard
Panic / ForgetInodeOp error: input/output error
Jul 10 08:16:20 pc2worker0039 /usr/local/bin/goofys[1720654]: main.ERROR stacktrace from panic: deref 1 from 0 #012goroutine 47 [running]:#012runtime/debug.Stack(0xce27484b90, 0xf1ab40, 0xd9cbe651f0)#012#011/usr/lib/go-1.13/src/runtime/debug/stack.go:24 +0x9d#012github.com/kahing/goofys/api/common.LogPanic(0xce27484e48)#012#011/root/goofys/api/common/panic_logger.go:32 +0x7c#012panic(0xf1ab40, 0xd9cbe651f0)#012#011/usr/lib/go-1.13/src/runtime/panic.go:679 +0x1b2#012github.com/kahing/goofys/internal.(*Inode).DeRef(0xd6e2a64000, 0x1, 0x73a6106)#012#011/root/goofys/internal/handles.go:290 +0x20b#012github.com/kahing/goofys/internal.(*Goofys).ForgetInode(0xc0004a4000, 0x140e900, 0xd0fa399350, 0xd89d855480, 0x0, 0x0)#012#011/root/goofys/internal/goofys.go:770 +0x14c#012github.com/kahing/goofys/api/common.FusePanicLogger.ForgetInode(0x1429020, 0xc0004a4000, 0x140e900, 0xd0fa399350, 0xd89d855480, 0x0, 0x0)#012#011/root/goofys/api/common/panic_logger.go:61 +0x9d#012github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).handleOp(0xc0006a0140, 0xc0003b45b0, 0x140e900, 0xd0fa399350, 0xee6860, 0xd89d855480)#012#011/root/go/pkg/mod/github.com/kahing/[email protected]/fuseutil/file_system.go:152 +0xa07#012github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).ServeOps(0xc0006a0140, 0xc0003b45b0)#012#011/root/go/pkg/mod/github.com/kahing/[email protected]/fuseutil/file_system.go:120 +0x140#012github.com/jacobsa/fuse.Mount.func1(0x13f6be0, 0xc0006a0140, 0xc0003b45b0, 0xc0006bc330)#012#011/root/go/pkg/mod/github.com/kahing/[email protected]/mount.go:84 +0x3f#012created by github.com/jacobsa/fuse.Mount#012#011/root/go/pkg/mod/github.com/kahing/[email protected]/mount.go:83 +0x4fe#012 Jul 10 08:16:20 pc2worker0039 /usr/local/bin/goofys[1720654]: fuse.ERROR *fuseops.ForgetInodeOp error: input/output error
Do you reproduce the issue ? if true , maybe we can fix it according to the analysis. In internel/goofys.go:768 stale := inode.DeRef(op.N) according to the comments of Inode struct :
// the refcnt is an exception, it's protected by the global lock
// Goofys.mu
refcnt uint64
it looks like that the inode don't be proteded by fs.mu.
I suspose this is rootcause, but I can't verified it .
If you can try this . Tks.
I think that's an outdated comment, since we already use atomic
package when using refcnt
. It's not clear the PR would change anything
this is my conside: stale := inode.DeRef(op.N) /switch to other routine, and operated the inode, so the 'stale' is incorrect/ if stale { ...... } if this is wrong judge, please ignore it .