syzbot


panic: interface conversion: kernfs.Inode is nil, not *mqfs.rootInode

Status: fixed on 2021/10/27 00:49
Fix commit: 763d7e6e396d Obtain ref on root dentry in mqfs.GetFilesystem.
First crash: 1130d, last: 1127d

Sample crash report:
panic: interface conversion: kernfs.Inode is nil, not *mqfs.rootInode

goroutine 293482 [running]:
panic(0x1233020, 0xc00e38e6f0)
	GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc001ae1900 sp=0xc001ae1838 pc=0x437c65
runtime.panicdottypeE(...)
	GOROOT/src/runtime/iface.go:261
runtime.panicdottypeI(0x0, 0x13cbfc0, 0x131e280)
	GOROOT/src/runtime/iface.go:271 +0xcc fp=0xc001ae1928 sp=0xc001ae1900 pc=0x40b2ec
gvisor.dev/gvisor/pkg/sentry/fsimpl/mqfs.(*RegistryImpl).lookup(0xc0009451b8, 0x15aa460, 0xc00e356000, 0xc006914600, 0x9c, 0x2f, 0xffffffffffffffff, 0x0, 0x0)
	pkg/sentry/fsimpl/mqfs/registry.go:161 +0x12a fp=0xc001ae1980 sp=0xc001ae1928 pc=0x8c868a
gvisor.dev/gvisor/pkg/sentry/fsimpl/mqfs.(*RegistryImpl).Get(0xc0009451b8, 0x15aa460, 0xc00e356000, 0xc006914600, 0x9c, 0x0, 0x80001ae1a01, 0xa69a85, 0x15aa460, 0xc001ae1a40, ...)
	pkg/sentry/fsimpl/mqfs/registry.go:92 +0x65 fp=0xc001ae19e0 sp=0xc001ae1980 pc=0x8c7de5
gvisor.dev/gvisor/pkg/sentry/kernel/mq.(*Registry).FindOrCreate(0xc000218580, 0x15aa460, 0xc00e356000, 0xc006914600, 0x9c, 0x0, 0x10000, 0x440000, 0x0, 0x0, ...)
	pkg/sentry/kernel/mq/mq.go:182 +0x24b fp=0xc001ae1a88 sp=0xc001ae19e0 pc=0x8c242b
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.MqOpen(0xc00e356000, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x857f00000000, ...)
	pkg/sentry/syscalls/linux/vfs2/mq.go:64 +0x236 fp=0xc001ae1ba8 sp=0xc001ae1a88 pc=0xf2e2b6
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc00e356000, 0xf0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x13ddd80, ...)
	pkg/sentry/kernel/task_syscall.go:115 +0x1b9 fp=0xc001ae1c68 sp=0xc001ae1ba8 pc=0xa66619
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc00e356000, 0xf0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	pkg/sentry/kernel/task_syscall.go:290 +0x70 fp=0xc001ae1cf0 sp=0xc001ae1c68 pc=0xa678f0
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00e356000, 0xf0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf9416c, 0xc0053d7488)
	pkg/sentry/kernel/task_syscall.go:237 +0xb4 fp=0xc001ae1d50 sp=0xc001ae1cf0 pc=0xa673d4
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc00e356000, 0x2, 0xc00e356000)
	pkg/sentry/kernel/task_syscall.go:204 +0x198 fp=0xc001ae1e20 sp=0xc001ae1d50 pc=0xa66cb8
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc00e356000, 0x157e4a0, 0x0)
	pkg/sentry/kernel/task_run.go:327 +0xe15 fp=0xc001ae1f60 sp=0xc001ae1e20 pc=0xa59b75
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc00e356000, 0x2f59)
	pkg/sentry/kernel/task_run.go:100 +0x1e2 fp=0xc001ae1fd0 sp=0xc001ae1f60 pc=0xa58602
runtime.goexit()
	src/runtime/asm_amd64.s:1371 +0x1 fp=0xc001ae1fd8 sp=0xc001ae1fd0 pc=0x472861
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:380 +0x116

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/25 16:39 gvisor 14f4113924c8 78e5f70a .config console log report info ci-gvisor-ptrace-3-cover panic: interface conversion: kernfs.Inode is nil, not *mqfs.rootInode
2021/10/23 00:41 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-2 panic: interface conversion: kernfs.Inode is nil, not *mqfs.rootInode
* Struck through repros no longer work on HEAD.