[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: panic: leaf should be empty
From:       Konstantin Belousov <kostikbel () gmail ! com>
Date:       2019-04-09 8:32:34
Message-ID: 20190409083234.GP1923 () kib ! kiev ! ua
[Download RAW message or body]

On Mon, Apr 08, 2019 at 06:51:23PM -0600, Alan Somers wrote:
> 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?
There is no magic incantation.  Also there is no lookup cache timeouts,
vfs_cache only saves timestamps and ticks.  Look at nfs client how this is
used.

> The panic message is not very helpful.
The panic message is very explicit and the condition under which it
appears is obvious. If VOP_LOOKUP() method returns error, it must not
set ndp->ni_vp.

> 
> 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
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic