panic: kernel diagnostic assertion "cpipe->pipe_buffer.cnt == 0" failed: file "/syzkaller/managers/main/kernel/sys/kern/sys_pipe.c", line 223 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *278780 42504 0 0 0x4000000 0 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(ffffffff81f8ad79,ffffffff81f99791,df,ffffffff81f2c9d6) at __assert+0x2e sys/kern/subr_prf.c:159 pipespace(fffffd803617c3f8,10000) at pipespace+0x16f sys/kern/sys_pipe.c:219 pipe_write(fffffd802fe40f10,ffff8000159eaa48,0) at pipe_write+0x952 sys/kern/sys_pipe.c:472 dofilewritev(ffff800016bda018,4,ffff8000159eaa48,0,ffff8000159eab50) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800016bda018,ffff8000159eaae8,ffff8000159eab50) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff8000159eabb0) at syscall+0x508 Xsyscall(6,0,c,0,3,ebb1f6af1b0) at Xsyscall+0x128 end of kernel end trace frame: 0xebd3d64a060, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic kernel diagnostic assertion "cpipe->pipe_buffer.cnt == 0" failed: file "/syzkaller/managers/main/kernel/sys/kern/sys_pipe.c", line 223 ddb> 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(ffffffff81f8ad79,ffffffff81f99791,df,ffffffff81f2c9d6) at __assert+0x2e sys/kern/subr_prf.c:159 pipespace(fffffd803617c3f8,10000) at pipespace+0x16f sys/kern/sys_pipe.c:219 pipe_write(fffffd802fe40f10,ffff8000159eaa48,0) at pipe_write+0x952 sys/kern/sys_pipe.c:472 dofilewritev(ffff800016bda018,4,ffff8000159eaa48,0,ffff8000159eab50) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800016bda018,ffff8000159eaae8,ffff8000159eab50) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff8000159eabb0) at syscall+0x508 Xsyscall(6,0,c,0,3,ebb1f6af1b0) at Xsyscall+0x128 end of kernel end trace frame: 0xebd3d64a060, count: -9 ddb> show registers rdi 0xffffffff81c87f67 db_enter+0x17 rsi 0x3cb9 __ALIGN_SIZE+0x2cb9 rbp 0xffff8000159ea7c0 rbx 0xffff8000159ea870 rdx 0x3cba __ALIGN_SIZE+0x2cba rcx 0xffff800016fe7000 rax 0xffff800016fe7000 r8 0xffff8000159ea780 r9 0x1 r10 0xffff800000997ec0 r11 0x1ac606add2a8d325 r12 0x3000000008 r13 0xffff8000159ea7d0 r14 0x100 r15 0x1 rip 0xffffffff81c87f68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159ea7b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=278780 stat=onproc flags process=0 proc=4000000 pri=16, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800016bdb3d8,0xffffffff822b9170 process=0xffff8000ffff7b10 user=0xffff8000159e5000, vmspace=0xfffffd803f013ee0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 42504 347807 62671 0 3 0x80 nanosleep syz-executor.0 42504 491802 62671 0 2 0x4000000 syz-executor.0 42504 484272 62671 0 2 0x4000000 syz-executor.0 *42504 278780 62671 0 7 0x4000000 syz-executor.0 12405 486854 0 0 3 0x14200 bored sosplice 62671 130775 2459 0 2 0x482 syz-executor.0 53754 299274 2459 0 3 0x82 piperd syz-executor.1 2459 137145 21510 0 3 0x82 thrsleep syz-fuzzer 2459 112920 21510 0 3 0x4000082 thrsleep syz-fuzzer 2459 85212 21510 0 3 0x4000082 thrsleep syz-fuzzer 2459 196724 21510 0 3 0x4000082 kqread syz-fuzzer 2459 97402 21510 0 3 0x4000082 thrsleep syz-fuzzer 2459 34400 21510 0 3 0x4000082 thrsleep syz-fuzzer 2459 464549 21510 0 3 0x4000082 thrsleep syz-fuzzer 21510 341605 61007 0 3 0x10008a pause ksh 61007 78659 31091 0 3 0x92 select sshd 96857 345064 1 0 3 0x100083 ttyin getty 31091 18373 1 0 3 0x80 select sshd 25705 176166 62143 73 3 0x100090 kqread syslogd 62143 202725 1 0 3 0x100082 netio syslogd 55523 86470 1 77 3 0x100090 poll dhclient 75415 378011 1 0 3 0x80 poll dhclient 91944 128705 0 0 3 0x14200 pgzero zerothread 1630 332218 0 0 3 0x14200 aiodoned aiodoned 66031 135486 0 0 3 0x14200 syncer update 45123 500768 0 0 3 0x14200 cleaner cleaner 6190 75750 0 0 3 0x14200 reaper reaper 94991 400418 0 0 3 0x14200 pgdaemon pagedaemon 40709 182768 0 0 3 0x14200 bored crynlk 1784 200963 0 0 3 0x14200 bored crypto 5882 59675 0 0 3 0x40014200 acpi0 acpi0 17379 266168 0 0 3 0x14200 bored softnet 56756 468618 0 0 3 0x14200 bored systqmp 71757 442808 0 0 3 0x14200 bored systq 18234 508848 0 0 3 0x40014200 bored softclock 3243 438925 0 0 3 0x40014200 idle0 47053 62694 0 0 2 0x14200 smr 1 62464 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9480 6450K 6958K 78643K 11177 0 0 pcb 23 9K 10K 78643K 125 0 0 rtable 108 3K 4K 78643K 228 0 0 ifaddr 45 11K 11K 78643K 59 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 25 0 0 iov 0 0K 12K 78643K 19 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 77K 78643K 1422 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 22 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 241 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 41 30K 54K 78643K 371 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 8 0 0 in_multi 33 2K 2K 78643K 37 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 188 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 85 20K 21K 78643K 1364 0 0 UVM aobj 8 2K 2K 78643K 12 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 12 0 0 NDP 8 0K 0K 78643K 16 0 0 temp 112 2715K 2781K 78643K 3726 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> 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 118 0 111 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1202 0 1202 1 1 0 1 0 8 0 tcpcb 544 42 0 38 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 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 44 0 4 1 0 1 1 0 8 0 semapl 112 20 0 10 1 0 1 1 0 8 0 shmpl 112 10 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1800 0 384 46 0 46 46 0 8 0 ffsino 240 1800 0 384 84 0 84 84 0 8 0 nchpl 144 2335 0 695 62 0 62 62 0 8 0 uvmvnodes 72 1979 0 0 36 0 36 36 0 8 0 vnodes 200 1979 0 0 105 0 105 105 0 8 0 namei 1024 6350 0 6350 3 2 1 1 0 8 1 scxspl 192 5972 0 5972 8 7 1 6 0 8 1 plimitpl 152 30 0 23 1 0 1 1 0 8 0 sigapl 432 412 0 399 2 0 2 2 0 8 0 futexpl 56 3465 0 3465 1 0 1 1 0 8 1 knotepl 112 92 0 73 1 0 1 1 0 8 0 kqueuepl 104 60 0 58 1 0 1 1 0 8 0 pipepl 112 208 0 187 2 1 1 1 0 8 0 fdescpl 424 413 0 399 2 0 2 2 0 8 0 filepl 120 2144 0 2045 4 0 4 4 0 8 1 lockfpl 104 49 0 48 2 1 1 1 0 8 0 lockfspl 48 21 0 20 2 1 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 261 0 254 1 0 1 1 0 8 0 zombiepl 144 399 0 399 3 2 1 1 0 8 1 processpl 864 428 0 399 4 0 4 4 0 8 0 procpl 632 693 0 655 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 210 0 193 3 0 3 3 0 8 1 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 16 0 16 2 1 1 1 0 8 1 mcl2k 2048 49564 0 49523 17 9 8 15 0 8 2 mtagpl 80 4 0 2 2 1 1 1 0 8 0 mbufpl 256 79384 0 79307 13 5 8 10 0 8 0 bufpl 256 5988 0 1487 282 0 282 282 0 8 0 anonpl 16 48068 0 37579 60 2 58 58 0 62 15 amapchunkpl 152 1866 0 1762 11 5 6 9 0 158 1 amappl16 192 1828 0 1250 41 0 41 41 0 8 12 amappl15 184 2 0 0 1 0 1 1 0 8 0 amappl14 176 56 0 51 1 0 1 1 0 8 0 amappl13 168 105 0 103 2 1 1 1 0 8 0 amappl12 160 11 0 9 1 0 1 1 0 8 0 amappl11 152 52 0 41 1 0 1 1 0 8 0 amappl10 144 60 0 59 2 1 1 1 0 8 0 amappl9 136 657 0 653 1 0 1 1 0 8 0 amappl8 128 230 0 217 1 0 1 1 0 8 0 amappl7 120 31 0 27 1 0 1 1 0 8 0 amappl6 112 53 0 46 1 0 1 1 0 8 0 amappl5 104 155 0 144 1 0 1 1 0 8 0 amappl4 96 631 0 602 2 1 1 2 0 8 0 amappl3 88 171 0 161 1 0 1 1 0 8 0 amappl2 80 2507 0 2440 4 2 2 3 0 8 0 amappl1 72 16781 0 16361 26 17 9 19 0 8 0 amappl 80 919 0 883 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 11 0 4 1 0 1 1 0 8 0 uaddrrnd 24 413 0 399 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 413 0 399 1 0 1 1 0 8 0 vmmpekpl 168 6658 0 6633 2 0 2 2 0 8 0 vmmpepl 168 54848 0 53223 112 27 85 86 0 357 9 vmsppl 272 412 0 399 2 1 1 2 0 8 0 pdppl 4096 832 0 798 6 1 5 6 0 8 0 pvpl 32 155942 0 142485 152 8 144 144 0 265 35 pmappl 200 412 0 399 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 431 0 21 12 0 12 12 0 8 0