syzbot


assert failed: vp->v_usecount != 0

Status: fixed on 2019/03/13 01:47
Reported-by: syzbot+889319cdf91a3d0373a9@syzkaller.appspotmail.com
Fix commit: 713042b84b5e Take a reference on ndp->ni_rootdir and ndp->ni_erootdir.
First crash: 2096d, last: 2080d

Sample crash report:
[  40.3067483] panic: kernel diagnostic assertion "vp->v_usecount != 0" failed: file "/syzkaller/managers/netbsd/kernel/sys/kern/vfs_vnode.c", line 869 
[  40.3067483] cpu1: Begin traceback...
[  40.3178853] vpanic() at netbsd:vpanic+0x214
[  40.3178853] _GLOBAL__sub_D_65535_0_cpu_configure() at netbsd:_GLOBAL__sub_D_65535_0_cpu_configure
[  40.3290028] vref() at netbsd:vref+0x54
[  40.3401324] getcwd_common() at netbsd:getcwd_common+0x118
[  40.3512629] vn_isunder() at netbsd:vn_isunder+0x1e
[  40.3623908] lookup_once() at netbsd:lookup_once+0x23f
[  40.3846529] namei_tryemulroot() at netbsd:namei_tryemulroot+0xba6
[  40.3957792] namei() at netbsd:namei+0x67
[  40.4069159] fd_nameiat.isra.2() at netbsd:fd_nameiat.isra.2+0xd9
[  40.4180391] do_sys_statat() at netbsd:do_sys_statat+0x182
[  40.4291673] sys___stat50() at netbsd:sys___stat50+0x88
[  40.4402996] sys_syscall() at netbsd:sys_syscall+0xe2
[  40.4514272] syscall() at netbsd:syscall+0x32e
[  40.4625565] --- syscall (number 0) ---
[  40.4625565] 7daf8b83f4ca:
[  40.4736854] cpu1: End traceback...

[  40.4736854] dumping to dev 4,1 (offset=0, size=0): not possible
[  40.4848142] rebooting...
SeaBIOS (version 1.8.2-20190204_181744-google)
Total RAM Size = 0x00000001e0000000 = 7680 MiB
CPUs found: 2     Max CPUs supported: 2
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=4194304 = 2048 MiB
drive 0x000f2a00: PCHS=0/0/0 translation=lba LCHS=520/128/63 s=4194304
Booting from Hard Disk 0...

>> NetBSD/x86 BIOS Boot, Revision 5.10 (Tue Jul 17 14:59:51 UTC 2018) (from NetBSD 8.0)
>> Memory: 639/3144640 k

     1. Boot normally
     2. Boot single user
     3. Disable ACPI
     4. Disable ACPI and SMP
     5. Drop to boot prompt
|/-\|/-39066448\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-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\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-+2876592\|/- [1062569\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+1362192-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+1043671-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-]=0x2b4f688
\|/-\|/-\|/-\|/-\|/-\|/-\|/-WARNING: couldn't open /var/db/entropy-file
WARNING: 1 module failed to load
[   1.0000000] pool redzone disabled for 'pdppl'
[   1.0000000] pool redzone disabled for 'kmem-4096'
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 8.99.35 (GENERIC_SYZKALLER) #18: Sat Mar  2 18:43:05 UTC 2019
[   1.0000000] 	root@ci2:/syzkaller/managers/netbsd/kernel/sys/arch/amd64/compile/obj/GENERIC_SYZKALLER
[   1.0000000] total memory = 7679 MB
[   1.0000000] avail memory = 6662 MB
[   1.0000000] pool redzone disabled for 'buf64k'
[   1.0000000] cpu_rng: RDRAND
[   1.0000000] running cgd selftest aes-xts-256 aes-xts-512 done
[   1.0000030] mainbus0 (root)
[   1.0000030] ACPI: RSDP 0x00000000000F2A40 000014 (v00 Google)
[   1.0000030] ACPI: RSDT 0x00000000BFFFDBA0 000038 (v01 Google GOOGRSDT 00000001 GOOG 00000001)
[   1.0000030] ACPI: FACP 0x00000000BFFFFF00 0000F4 (v02 Google GOOGFACP 00000001 GOOG 00000001)
[   1.0000030] ACPI: DSDT 0x00000000BFFFDBE0 0017B2 (v01 Google GOOGDSDT 00000001 GOOG 00000001)
[   1.0000030] ACPI: FACS 0x00000000BFFFFEC0 000040
[   1.0000030] ACPI: SSDT 0x00000000BFFFF590 000930 (v01 Google GOOGSSDT 00000001 GOOG 00000001)
[   1.0000030] ACPI: APIC 0x00000000BFFFF4A0 000076 (v01 Google GOOGAPIC 00000001 GOOG 00000001)
[   1.0000030] ACPI: WAET 0x00000000BFFFF470 000028 (v01 Google GOOGWAET 00000001 GOOG 00000001)
[   1.0000030] ACPI: SRAT 0x00000000BFFFF3A0 0000C8 (v01 Google GOOGSRAT 00000001 GOOG 00000001)
[   1.0000030] ACPI: 2 ACPI AML tables successfully acquired and loaded
[   1.0000030] ioapic0 at mainbus0 apid 0
[   1.0000030] cpu0 at mainbus0 apid 0

Crashes (108):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/03 02:29 netbsd 9e59b38ee44e 1c0e457a console log report syz C ci2-netbsd
2019/03/01 14:31 netbsd 460c3fbc4281 8845b00e console log report syz C ci2-netbsd
2019/02/26 09:33 netbsd 5eba7b0ad839 8022bafd console log report syz C ci2-netbsd
2019/03/13 00:16 netbsd b0eb203687ca a71bfb62 console log report ci2-netbsd
2019/03/12 21:51 netbsd b0eb203687ca a71bfb62 console log report ci2-netbsd
2019/03/12 20:06 netbsd b0eb203687ca a71bfb62 console log report ci2-netbsd
2019/03/12 12:15 netbsd 75e70cab4926 12365b99 console log report ci2-netbsd
2019/03/12 10:49 netbsd 75e70cab4926 12365b99 console log report ci2-netbsd
2019/03/12 09:38 netbsd 75e70cab4926 12365b99 console log report ci2-netbsd
2019/03/12 07:47 netbsd 75e70cab4926 12365b99 console log report ci2-netbsd
2019/03/12 06:35 netbsd 75e70cab4926 12365b99 console log report ci2-netbsd
2019/03/12 00:47 netbsd 2ce7e4bdda91 12365b99 console log report ci2-netbsd
2019/03/11 23:21 netbsd 2ce7e4bdda91 12365b99 console log report ci2-netbsd
2019/03/11 12:36 netbsd bfb2085108a3 12365b99 console log report ci2-netbsd
2019/03/11 10:13 netbsd bfb2085108a3 12365b99 console log report ci2-netbsd
2019/03/11 08:12 netbsd bfb2085108a3 12365b99 console log report ci2-netbsd
2019/03/11 06:43 netbsd bfb2085108a3 12365b99 console log report ci2-netbsd
2019/03/11 05:17 netbsd bfb2085108a3 12365b99 console log report ci2-netbsd
2019/03/11 03:52 netbsd 5e72195e84e2 12365b99 console log report ci2-netbsd
2019/03/10 23:43 netbsd 5e72195e84e2 12365b99 console log report ci2-netbsd
2019/03/10 18:50 netbsd 5e72195e84e2 12365b99 console log report ci2-netbsd
2019/03/10 17:48 netbsd 5e72195e84e2 12365b99 console log report ci2-netbsd
2019/03/10 16:37 netbsd 5e72195e84e2 12365b99 console log report ci2-netbsd
2019/03/10 03:09 netbsd 0ac2086e7161 12365b99 console log report ci2-netbsd
2019/03/10 02:51 netbsd 0ac2086e7161 12365b99 console log report ci2-netbsd
2019/03/09 19:43 netbsd 5e8a8f92e33b 12365b99 console log report ci2-netbsd
2019/03/09 12:46 netbsd 5e8a8f92e33b 12365b99 console log report ci2-netbsd
2019/03/09 10:48 netbsd 3ecbc4785bd9 12365b99 console log report ci2-netbsd
2019/03/09 07:43 netbsd 3ecbc4785bd9 12365b99 console log report ci2-netbsd
2019/03/09 06:06 netbsd 3ecbc4785bd9 12365b99 console log report ci2-netbsd
2019/03/09 00:57 netbsd 3ecbc4785bd9 12365b99 console log report ci2-netbsd
2019/03/08 15:55 netbsd 57a2d3217659 12365b99 console log report ci2-netbsd
2019/03/08 14:08 netbsd 57a2d3217659 12365b99 console log report ci2-netbsd
2019/03/08 12:56 netbsd 57a2d3217659 12365b99 console log report ci2-netbsd
2019/03/08 11:41 netbsd 57a2d3217659 12365b99 console log report ci2-netbsd
2019/03/07 21:57 netbsd 7cec0f5bb8dc 4b69c3cb console log report ci2-netbsd
2019/03/07 10:01 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 06:20 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/06 18:00 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 15:59 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 13:52 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 09:28 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 01:19 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/05 20:12 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/05 19:11 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/05 14:15 netbsd 465ec24dbfce bb91cf81 console log report ci2-netbsd
2019/03/05 07:26 netbsd 465ec24dbfce bb91cf81 console log report ci2-netbsd
2019/03/05 05:41 netbsd 8287ae29e052 7c693b52 console log report ci2-netbsd
2019/02/25 04:37 netbsd 11eef5b2ee47 7a06e792 console log report ci2-netbsd
* Struck through repros no longer work on HEAD.