Date: Tue, 9 Apr 2019 11:32:34 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Alan Somers <asomers@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: panic: leaf should be empty Message-ID: <20190409083234.GP1923@kib.kiev.ua> In-Reply-To: <CAOtMX2jM4HFpRgRe8s7g0Pi2jHu-7S_1oA=fLbC9Z6a0SO2_PA@mail.gmail.com> References: <CAOtMX2jM4HFpRgRe8s7g0Pi2jHu-7S_1oA=fLbC9Z6a0SO2_PA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190409083234.GP1923>