panic: kernel diagnostic assertion "cpipe->pipe_buffer.cnt == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/sys_pipe.c", line 223 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 479330 53208 0 0 0x4000000 0 syz-executor.0 *317957 53208 0 0 0x4000000 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 __assert(ffffffff81fac4df,ffffffff81f97e38,df,ffffffff81f4ba54) at __assert+0x2e sys/kern/subr_prf.c:159 pipespace(fffffd806fabd698,10000) at pipespace+0x18f sys/kern/sys_pipe.c:219 pipe_write(fffffd8068bfdef8,ffff800023c49388,0) at pipe_write+0x973 sys/kern/sys_pipe.c:472 dofilewritev(ffff800020b50018,4,ffff800023c49388,0,ffff800023c49490) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020b50018,ffff800023c49428,ffff800023c49490) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800023c49500) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023c49500) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(6,0,c,0,3,9bf4dc981b0) at Xsyscall+0x128 end of kernel end trace frame: 0x9c1a6436f30, count: 6 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic kernel diagnostic assertion "cpipe->pipe_buffer.cnt == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/sys_pipe.c", line 223 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 __assert(ffffffff81fac4df,ffffffff81f97e38,df,ffffffff81f4ba54) at __assert+0x2e sys/kern/subr_prf.c:159 pipespace(fffffd806fabd698,10000) at pipespace+0x18f sys/kern/sys_pipe.c:219 pipe_write(fffffd8068bfdef8,ffff800023c49388,0) at pipe_write+0x973 sys/kern/sys_pipe.c:472 dofilewritev(ffff800020b50018,4,ffff800023c49388,0,ffff800023c49490) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020b50018,ffff800023c49428,ffff800023c49490) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800023c49500) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023c49500) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(6,0,c,0,3,9bf4dc981b0) at Xsyscall+0x128 end of kernel end trace frame: 0x9c1a6436f30, count: -9 ddb{1}> show registers rdi 0xffffffff81c0e2c7 db_enter+0x17 rsi 0x3c22 __ALIGN_SIZE+0x2c22 rbp 0xffff800023c49100 rbx 0xffff800023c491b0 rdx 0x3c23 __ALIGN_SIZE+0x2c23 rcx 0xffff800020ffc000 rax 0xffff800020ffc000 r8 0xffffffff8129f2b3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x4fb35d4afd0e601c r12 0x3000000008 r13 0xffff800023c49110 r14 0x100 r15 0x1 rip 0xffffffff81c0e2c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023c490f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=317957 stat=onproc flags process=0 proc=4000000 pri=16, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b51650,0xffffffff823aadc0 process=0xffff800020b7c700 user=0xffff800023c44000, vmspace=0xfffffd807f00b450 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 53208 368312 33608 0 2 0 syz-executor.0 53208 479330 33608 0 7 0x4000000 syz-executor.0 53208 212920 33608 0 2 0x4000000 syz-executor.0 *53208 317957 33608 0 7 0x4000000 syz-executor.0 61576 95061 0 0 3 0x14200 bored sosplice 13895 517693 66581 0 3 0x82 piperd syz-executor.1 33608 309558 66581 0 3 0x82 nanosleep syz-executor.0 66581 38402 52663 0 3 0x82 thrsleep syz-fuzzer 66581 408426 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 189252 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 440236 52663 0 3 0x4000082 kqread syz-fuzzer 66581 324756 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 363462 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 125129 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 132803 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 164954 52663 0 3 0x4000082 thrsleep syz-fuzzer 66581 196190 52663 0 3 0x4000082 thrsleep syz-fuzzer 52663 379231 80348 0 3 0x10008a pause ksh 80348 61951 64259 0 3 0x92 select sshd 74791 376917 1 0 3 0x100083 ttyopn getty 64259 62299 1 0 3 0x80 select sshd 66078 11266 36059 74 3 0x100092 bpf pflogd 36059 39722 1 0 3 0x80 netio pflogd 58658 1339 22018 73 3 0x100090 kqread syslogd 22018 75405 1 0 3 0x100082 netio syslogd 32699 100896 1 77 3 0x100090 poll dhclient 74391 354057 1 0 3 0x80 poll dhclient 42581 296199 0 0 3 0x14200 pgzero zerothread 72065 458668 0 0 3 0x14200 aiodoned aiodoned 42663 142814 0 0 3 0x14200 syncer update 54060 201462 0 0 3 0x14200 cleaner cleaner 14084 299202 0 0 3 0x14200 reaper reaper 34597 143757 0 0 3 0x14200 pgdaemon pagedaemon 80151 443506 0 0 3 0x14200 bored crynlk 65435 396442 0 0 3 0x14200 bored crypto 21879 49037 0 0 3 0x40014200 acpi0 acpi0 60313 231757 0 0 3 0x40014200 idle1 67749 89007 0 0 3 0x14200 bored softnet 12866 352820 0 0 3 0x14200 bored systqmp 23177 135176 0 0 3 0x14200 bored systq 46510 81535 0 0 3 0x40014200 bored softclock 81791 88535 0 0 3 0x40014200 idle0 21411 310767 0 0 3 0x14200 bored smr 1 477951 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 53208 (syz-executor.0) thread 0xffff800020b50018 (317957) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823a5968) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x38f sys/kern/sched_bsd.c:440 #3 sleep_finish+0x113 sys/kern/kern_synch.c:373 #4 tsleep+0x198 sleep_finish_timeout sys/kern/kern_synch.c:397 [inline] #4 tsleep+0x198 sleep_finish_all sys/kern/kern_synch.c:183 [inline] #4 tsleep+0x198 sys/kern/kern_synch.c:152 #5 pipe_write+0x8f0 pipelock sys/kern/sys_pipe.c:286 [inline] #5 pipe_write+0x8f0 sys/kern/sys_pipe.c:471 #6 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #7 sys_write+0x83 sys/kern/sys_generic.c:284 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:554 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9526 6416K 7059K 78643K 13589 0 0 pcb 25 9K 10K 78643K 572 0 0 rtable 111 4K 5K 78643K 531 0 0 ifaddr 62 14K 14K 78643K 210 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1478 0 0 iov 0 0K 17K 78643K 109 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1214 76K 77K 78643K 2310 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 3 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 11 1K 1K 78643K 11 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 1885 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 53 50K 83K 78643K 601 0 0 subproc 32 2K 2K 78643K 34 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 141 0 0 in_multi 33 2K 2K 78643K 85 0 0 ether_multi 1 0K 0K 78643K 12 0 0 mrt 0 0K 0K 78643K 19 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 235 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 99 21K 30K 78643K 5456 0 0 UVM aobj 7 2K 2K 78643K 7 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 102 0 0 NDP 13 0K 0K 78643K 57 0 0 temp 179 2747K 2843K 78643K 8520 0 0 kqueue 0 0K 0K 78643K 10 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 inpcbpl 280 681 0 674 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 49 0 5 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2720 0 2720 2 2 0 1 0 8 0 tcpcb 544 282 0 278 1 0 1 1 0 8 0 rttmr 72 4 0 4 1 0 1 1 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 swfcl 56 8 0 0 1 0 1 1 0 8 0 ppxss 1128 28 0 28 4 4 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 37 0 19 1 0 1 1 0 8 0 pfstkey 112 37 0 19 1 0 1 1 0 8 0 pfstate 328 37 0 19 3 0 3 3 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 48 0 8 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 1 1 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4282 0 2863 47 0 47 47 0 8 0 ffsino 272 4282 0 2863 96 0 96 96 0 8 0 nchpl 144 6740 0 5092 62 0 62 62 0 8 0 uvmvnodes 72 4972 0 0 91 0 91 91 0 8 0 vnodes 200 4972 0 0 262 0 262 262 0 8 0 namei 1024 18037 0 18037 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 20160 0 20160 9 6 3 6 0 8 3 plimitpl 152 146 0 138 1 0 1 1 0 8 0 sigapl 432 2085 0 2070 3 1 2 3 0 8 0 futexpl 56 11807 0 11807 1 0 1 1 0 8 1 knotepl 112 376 0 357 1 0 1 1 0 8 0 kqueuepl 104 305 0 303 1 0 1 1 0 8 0 pipepl 112 364 0 343 2 1 1 1 0 8 0 fdescpl 488 2086 0 2070 3 0 3 3 0 8 0 filepl 152 8040 0 7936 8 3 5 5 0 8 1 lockfpl 104 266 0 265 4 3 1 1 0 8 0 lockfspl 48 90 0 89 4 3 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 20 0 9 1 0 1 1 0 8 0 ucredpl 96 1998 0 1989 1 0 1 1 0 8 0 zombiepl 144 2070 0 2070 3 2 1 1 0 8 1 processpl 896 2102 0 2070 4 0 4 4 0 8 0 procpl 632 4568 0 4524 8 4 4 5 0 8 0 srpgc 64 4 0 4 1 0 1 1 0 8 1 sosppl 128 29 0 29 2 2 0 1 0 8 0 sockpl 384 1161 0 1142 6 3 3 4 0 8 1 mcl64k 65536 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 13 0 0 2 0 2 2 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 120 0 0 14 0 14 14 0 8 0 mtagpl 80 5 0 0 1 0 1 1 0 8 0 mbufpl 256 242 0 0 11 0 11 11 0 8 0 bufpl 256 9348 0 2319 440 0 440 440 0 8 0 anonpl 16 230073 0 224051 71 18 53 56 0 125 28 amapchunkpl 152 10768 0 10675 18 9 9 11 0 158 5 amappl16 192 9952 0 9664 38 16 22 30 0 8 7 amappl15 184 947 0 946 1 0 1 1 0 8 0 amappl14 176 1008 0 1000 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 12 0 10 1 0 1 1 0 8 0 amappl11 152 57 0 41 1 0 1 1 0 8 0 amappl10 144 74 0 68 1 0 1 1 0 8 0 amappl9 136 1503 0 1497 1 0 1 1 0 8 0 amappl8 128 1056 0 1036 1 0 1 1 0 8 0 amappl7 120 34 0 30 1 0 1 1 0 8 0 amappl6 112 61 0 52 1 0 1 1 0 8 0 amappl5 104 140 0 126 1 0 1 1 0 8 0 amappl4 96 2368 0 2337 2 1 1 2 0 8 0 amappl3 88 194 0 184 1 0 1 1 0 8 0 amappl2 80 16700 0 16627 4 2 2 3 0 8 0 amappl1 72 46292 0 45844 26 16 10 20 0 8 0 amappl 80 4898 0 4860 2 0 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 6 0 0 1 0 1 1 0 8 0 uaddrrnd 24 2086 0 2070 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2086 0 2070 1 0 1 1 0 8 0 vmmpekpl 168 15142 0 15115 2 0 2 2 0 8 0 vmmpepl 168 246244 0 244810 114 34 80 81 0 357 13 vmsppl 368 2085 0 2070 2 0 2 2 0 8 0 pdppl 4096 4179 0 4140 7 1 6 6 0 8 1 pvpl 32 679780 0 670592 186 48 138 143 0 265 63 pmappl 232 2085 0 2070 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 598 0 6 17 0 17 17 0 8 0