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 244551 15561 0 0 0x4000000 1 syz-executor.1 *289598 15561 0 0 0x4000000 0K syz-executor.1 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(fffffd806e279628,10000) at pipespace+0x18f sys/kern/sys_pipe.c:219 pipe_write(fffffd806cac0e50,ffff800023c4bbc8,0) at pipe_write+0x973 sys/kern/sys_pipe.c:472 dofilewritev(ffff800020afe008,4,ffff800023c4bbc8,0,ffff800023c4bcd0) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020afe008,ffff800023c4bc68,ffff800023c4bcd0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800023c4bd40) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023c4bd40) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(6,0,c,0,3,2320e9a51b0) at Xsyscall+0x128 end of kernel end trace frame: 0x2344640f110, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic kernel diagnostic assertion "cpipe->pipe_buffer.cnt == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/sys_pipe.c", line 223 ddb{0}> 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(fffffd806e279628,10000) at pipespace+0x18f sys/kern/sys_pipe.c:219 pipe_write(fffffd806cac0e50,ffff800023c4bbc8,0) at pipe_write+0x973 sys/kern/sys_pipe.c:472 dofilewritev(ffff800020afe008,4,ffff800023c4bbc8,0,ffff800023c4bcd0) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020afe008,ffff800023c4bc68,ffff800023c4bcd0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800023c4bd40) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023c4bd40) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(6,0,c,0,3,2320e9a51b0) at Xsyscall+0x128 end of kernel end trace frame: 0x2344640f110, count: -9 ddb{0}> show registers rdi 0xffffffff81c0e2c7 db_enter+0x17 rsi 0x37f3 __ALIGN_SIZE+0x27f3 rbp 0xffff800023c4b940 rbx 0xffff800023c4b9f0 rdx 0x37f4 __ALIGN_SIZE+0x27f4 rcx 0xffff80002302a000 rax 0xffff80002302a000 r8 0xffffffff8129f2b3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x95c0b93fd2037040 r12 0x3000000008 r13 0xffff800023c4b950 r14 0x100 r15 0x1 rip 0xffffffff81c0e2c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023c4b930 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=289598 stat=onproc flags process=0 proc=4000000 pri=16, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b30c70,0xffffffff823aadc0 process=0xffff800020b7d500 user=0xffff800023c46000, vmspace=0xfffffd807f00b000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 15561 7485 54831 0 2 0 syz-executor.1 15561 244551 54831 0 7 0x4000000 syz-executor.1 15561 417871 54831 0 2 0x4000000 syz-executor.1 *15561 289598 54831 0 7 0x4000000 syz-executor.1 76826 400129 1 0 3 0x100083 ttyin getty 23569 485589 0 0 3 0x14200 bored sosplice 54831 89273 45104 0 2 0x2 syz-executor.1 54458 150328 45104 0 3 0x82 piperd syz-executor.0 45104 173067 48483 0 3 0x82 thrsleep syz-fuzzer 45104 150172 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 502710 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 250066 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 129311 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 180610 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 227202 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 303932 48483 0 3 0x4000082 thrsleep syz-fuzzer 45104 429082 48483 0 3 0x4000082 kqread syz-fuzzer 45104 211716 48483 0 3 0x4000082 thrsleep syz-fuzzer 48483 128997 82023 0 3 0x10008a pause ksh 82023 461589 1490 0 3 0x92 select sshd 1490 214628 1 0 3 0x80 select sshd 62764 68975 71197 74 3 0x100092 bpf pflogd 71197 360949 1 0 3 0x80 netio pflogd 38537 238607 63425 73 3 0x100090 kqread syslogd 63425 129647 1 0 3 0x100082 netio syslogd 62908 33868 1 77 3 0x100090 poll dhclient 48780 460462 1 0 3 0x80 poll dhclient 66018 155273 0 0 3 0x14200 pgzero zerothread 35686 419536 0 0 3 0x14200 aiodoned aiodoned 60674 143681 0 0 3 0x14200 syncer update 79687 12627 0 0 3 0x14200 cleaner cleaner 36055 138526 0 0 3 0x14200 reaper reaper 80735 242258 0 0 3 0x14200 pgdaemon pagedaemon 45674 132277 0 0 3 0x14200 bored crynlk 45241 181870 0 0 3 0x14200 bored crypto 43570 317096 0 0 3 0x40014200 acpi0 acpi0 32021 62624 0 0 3 0x40014200 idle1 10679 117336 0 0 3 0x14200 bored softnet 3950 112872 0 0 3 0x14200 bored systqmp 85428 199137 0 0 3 0x14200 bored systq 55561 487091 0 0 3 0x40014200 bored softclock 87767 392627 0 0 3 0x40014200 idle0 84476 24255 0 0 3 0x14200 bored smr 1 115480 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 15561 (syz-executor.1) thread 0xffff800020afe008 (289598) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9542 6420K 7699K 78643K 18880 0 0 pcb 25 9K 11K 78643K 1373 0 0 rtable 111 4K 5K 78643K 989 0 0 ifaddr 66 15K 16K 78643K 409 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1495 0 0 iov 0 0K 24K 78643K 207 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1212 76K 77K 78643K 4591 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 71 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 339 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 4883 0 0 sigio 0 0K 0K 78643K 34 0 0 proc 54 51K 83K 78643K 915 0 0 subproc 32 2K 2K 78643K 51 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 371 0 0 in_multi 33 2K 2K 78643K 165 0 0 ether_multi 1 0K 0K 78643K 27 0 0 mrt 0 0K 0K 78643K 115 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 415 0 0 pfkey data 0 0K 4K 78643K 6 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 104 22K 31K 78643K 12812 0 0 UVM aobj 116 3K 3K 78643K 127 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 202 0 0 NDP 14 0K 0K 78643K 106 0 0 temp 186 2748K 3383K 78643K 17385 0 0 kqueue 0 0K 0K 78643K 37 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> 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 1433 0 1426 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 101 0 57 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 66 0 66 9 8 1 1 0 8 1 tcpcb 544 473 0 469 1 0 1 1 0 8 0 rttmr 72 61 0 61 6 6 0 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 ppxss 1128 74 0 74 11 10 1 1 0 8 1 pffrag 232 23 0 23 3 3 0 1 0 482 0 pffrnode 88 23 0 23 3 3 0 1 0 8 0 pffrent 40 78 0 78 3 3 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 126 0 90 1 0 1 1 0 8 0 pfstkey 112 126 0 90 2 0 2 2 0 8 0 pfstate 328 126 0 90 7 3 4 5 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 210 0 22 14 2 12 14 0 8 0 art_table 32 211 0 22 2 0 2 2 0 8 0 art_node 16 91 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 0 1 0 1 1 0 8 0 semapl 112 337 0 327 1 0 1 1 0 8 0 shmpl 112 125 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9228 0 7801 47 0 47 47 0 8 0 ffsino 272 9228 0 7801 96 0 96 96 0 8 0 nchpl 144 15389 0 13754 63 2 61 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 41422 0 41422 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 7 0 7 2 2 0 1 0 8 0 scxspl 192 51227 0 51227 15 14 1 6 0 8 1 plimitpl 152 296 0 288 1 0 1 1 0 8 0 sigapl 432 5082 0 5067 3 1 2 3 0 8 0 futexpl 56 33742 0 33742 1 0 1 1 0 8 1 knotepl 112 840 0 821 1 0 1 1 0 8 0 kqueuepl 104 853 0 851 1 0 1 1 0 8 0 pipepl 112 1192 0 1171 6 5 1 2 0 8 0 fdescpl 488 5083 0 5067 3 0 3 3 0 8 0 filepl 152 19129 0 19025 11 6 5 7 0 8 1 lockfpl 104 826 0 825 11 10 1 1 0 8 0 lockfspl 48 295 0 294 11 10 1 1 0 8 0 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 69 0 58 1 0 1 1 0 8 0 ucredpl 96 4281 0 4272 1 0 1 1 0 8 0 zombiepl 144 5067 0 5067 2 1 1 1 0 8 1 processpl 896 5099 0 5067 4 0 4 4 0 8 0 procpl 632 11775 0 11731 11 7 4 5 0 8 0 srpgc 64 33 0 33 6 6 0 1 0 8 0 sosppl 128 34 0 34 6 5 1 1 0 8 1 sockpl 384 2607 0 2588 9 6 3 4 0 8 1 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 14 0 0 1 0 1 1 0 8 0 mcl8k 8192 25 0 0 4 1 3 3 0 8 0 mcl4k 4096 14 0 0 2 0 2 2 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 157 0 0 12 0 12 12 0 8 0 mtagpl 80 3 0 0 1 0 1 1 0 8 0 mbufpl 256 364 0 0 14 1 13 13 0 8 0 bufpl 256 18197 0 11168 440 0 440 440 0 8 0 anonpl 16 427054 0 422492 94 70 24 46 0 125 4 amapchunkpl 152 21471 0 21377 21 16 5 14 0 158 0 amappl16 192 24019 0 23822 61 47 14 30 0 8 4 amappl15 184 2432 0 2430 1 0 1 1 0 8 0 amappl14 176 2480 0 2474 1 0 1 1 0 8 0 amappl13 168 7 0 7 1 1 0 1 0 8 0 amappl12 160 17 0 15 1 0 1 1 0 8 0 amappl11 152 2484 0 2466 1 0 1 1 0 8 0 amappl10 144 75 0 70 1 0 1 1 0 8 0 amappl9 136 595 0 592 1 0 1 1 0 8 0 amappl8 128 167 0 142 1 0 1 1 0 8 0 amappl7 120 36 0 31 1 0 1 1 0 8 0 amappl6 112 2476 0 2468 1 0 1 1 0 8 0 amappl5 104 140 0 126 1 0 1 1 0 8 0 amappl4 96 5361 0 5330 2 1 1 2 0 8 0 amappl3 88 254 0 242 1 0 1 1 0 8 0 amappl2 80 42175 0 42101 3 1 2 3 0 8 0 amappl1 72 95610 0 95174 26 16 10 20 0 8 0 amappl 80 12090 0 12052 1 0 1 1 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 126 0 11 2 0 2 2 0 8 0 uaddrrnd 24 5083 0 5067 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5083 0 5067 1 0 1 1 0 8 0 vmmpekpl 168 25750 0 25711 2 0 2 2 0 8 0 vmmpepl 168 583498 0 582169 146 80 66 81 0 357 4 vmsppl 368 5082 0 5067 2 0 2 2 0 8 0 pdppl 4096 10173 0 10134 6 0 6 6 0 8 1 pvpl 32 1384678 0 1376892 224 146 78 122 0 265 15 pmappl 232 5082 0 5067 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 602 0 8 18 1 17 18 0 8 0