panic: leaf should be empty

Alan Somers asomers at freebsd.org
Tue Apr 9 00:57:34 UTC 2019


I'm trying to use cache_enter_timeout to set a timeout on a lookup cache
entry.  I have code that works with cache_enter, but when I modify it to
use cache_enter_timeout I get this panic message on a subsequent lookup.
Does anybody know the magic incantation to using lookup cache timeouts?
The panic message is not very helpful.

Stack trace:
panic: leaf should be empty
cpuid = 2
time = 1554770500
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
0xfffffe0031c745f0
vpanic() at vpanic+0x19d/frame 0xfffffe0031c74640
panic() at panic+0x43/frame 0xfffffe0031c746a0
lookup() at lookup+0xe69/frame 0xfffffe0031c74740
namei() at namei+0x4e9/frame 0xfffffe0031c74830
kern_accessat() at kern_accessat+0x106/frame 0xfffffe0031c74990
amd64_syscall() at amd64_syscall+0x276/frame 0xfffffe0031c74ab0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0031c74ab0
--- syscall (33, FreeBSD ELF64, sys_access), rip = 0x80051696a, rsp =
0x7fffffffe5e8, rbp = 0x7fffffffe780 ---

Steps to Reproduce:
1) Build and install a kernel and tests from the projects/fuse2 branch at
r346046 or later
2) cd /usr/tests/sys/fs/fusefs
3) ./lookup --gtest_filter=Lookup.entry_cache -vv # This should work
4) sudo sysctl vfs.fusefs.lookup_cache_expire=1
5) ./lookup --gtest_filter=Lookup.entry_cache -vv # This should panic

The offending code is in sys/fs/fuse/fuse_node.c at line 308.

Grateful for any help,
-Alan


More information about the freebsd-hackers mailing list