panic: pool_do_get: shmpl free list modified: page 0xfffffd80628cf000; item addr 0xfffffd80628cf328; offset 0x40=0x68b39214 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 108602 46568 32767 0x10 0 0 syz-executor *214719 46568 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b0f8) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c52f8,1,ffff80003c46aff8) at pool_do_get+0x5df pool_get(ffffffff839c52f8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c458028,ffff80003c46b250,14,ffff80003c46b1a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c458028,ffff80003c46b250,ffff80003c46b1a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b250) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b250) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9d4cf6e72a0, count: 7 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 *cpu1: pool_do_get: shmpl free list modified: page 0xfffffd80628cf000; item addr 0xfffffd80628cf328; offset 0x40=0x68b39214 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b0f8) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c52f8,1,ffff80003c46aff8) at pool_do_get+0x5df pool_get(ffffffff839c52f8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c458028,ffff80003c46b250,14,ffff80003c46b1a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c458028,ffff80003c46b250,ffff80003c46b1a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b250) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b250) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9d4cf6e72a0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c46ae20 rbx 0xffff8000299eeddf rdx 0 rcx 0xffff80003c458028 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb4b86353cb853e3b r11 0x7aabd2cfe37f6c14 r12 0xffff8000299eebe0 r13 0 r14 0 r15 0x1 rip 0xffffffff8219ac05 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c46ae10 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=214719 pid=46568 tcnt=4 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=82, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c458a88,0xffff80003c459cc0 process=0xffff80003c454ea0 user=0xffff80003c466000, vmspace=0xfffffd806bae8b98 estcpu=32, cpticks=3, pctcpu=0.1, user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 30377 46334 6970 32767 2 0x10 syz-executor 30377 202110 6970 32767 3 0x4000090 ttyretype syz-executor 17437 354346 32364 32767 2 0x10 syz-executor 17437 79241 32364 32767 2 0x4000010 syz-executor 21175 172804 85512 32767 2 0x10 syz-executor 21175 365572 85512 32767 3 0x4000090 fsleep syz-executor 46568 108602 82862 32767 7 0x10 syz-executor *46568 214719 82862 32767 7 0x4000010 syz-executor 46568 507717 82862 32767 3 0x4000090 fsleep syz-executor 46568 5103 82862 32767 3 0x4000090 fsleep syz-executor 35775 154889 79938 32767 2 0x10 syz-executor 35775 247107 79938 32767 3 0x4000090 fsleep syz-executor 35775 16157 79938 32767 3 0x4000090 fsleep syz-executor 56577 257363 64775 32767 3 0x90 nanoslp syz-executor 56577 373170 64775 32767 3 0x4000090 msgwait syz-executor 56577 267659 64775 32767 3 0x4000090 fsleep syz-executor 77456 300211 81571 32767 3 0x90 nanoslp syz-executor 77456 184840 81571 32767 3 0x4000090 kqread syz-executor 77456 140426 81571 32767 3 0x4000090 fsleep syz-executor 63318 490410 0 0 3 0x14200 bored sosplice 85512 329009 55349 32767 3 0x90 nanoslp syz-executor 32364 140432 28522 32767 3 0x90 nanoslp syz-executor 81571 501610 25946 32767 3 0x90 nanoslp syz-executor 82862 296001 82258 32767 3 0x90 nanoslp syz-executor 64775 456024 83816 32767 3 0x90 nanoslp syz-executor 79938 488190 88883 32767 3 0x90 nanoslp syz-executor 6970 444319 45892 32767 3 0x90 nanoslp syz-executor 83816 499040 11987 0 3 0x82 wait syz-executor 25946 60919 11987 0 3 0x82 wait syz-executor 82258 131729 11987 0 3 0x82 wait syz-executor 88883 417949 11987 0 3 0x82 wait syz-executor 28522 5177 11987 0 3 0x82 wait syz-executor 55349 328347 11987 0 3 0x82 wait syz-executor 45892 243819 11987 0 3 0x82 wait syz-executor 35047 124059 11987 0 3 0x82 wait syz-executor 11987 272229 80119 0 3 0x82 kqread syz-executor 80119 257543 3542 0 3 0x10008a sigsusp ksh 3542 259600 89291 0 3 0x98 kqread sshd-session 89291 489648 60974 0 3 0x92 kqread sshd-session 18547 427331 1 0 3 0x100083 ttyin getty 60974 90517 1 0 3 0x88 kqread sshd 30585 34507 10545 73 3 0x1100090 kqread syslogd 10545 142246 1 0 3 0x100082 sbwait syslogd 41683 143466 1 0 3 0x100080 kqread resolvd 90217 64135 7117 77 3 0x100092 kqread dhcpleased 8125 253675 7117 77 3 0x100092 kqread dhcpleased 7117 891 1 0 3 0x80 kqread dhcpleased 65928 376058 0 0 3 0x14200 bored smr 1680 40541 0 0 2 0x14200 zerothread 5284 404195 0 0 3 0x14200 aiodoned aiodoned 73546 480265 0 0 3 0x14200 syncer update 96182 332883 0 0 3 0x14200 cleaner cleaner 60285 401909 0 0 3 0x14200 reaper reaper 67559 344197 0 0 3 0x14200 pgdaemon pagedaemon 97361 431912 0 0 3 0x14200 bored viomb 99016 355589 0 0 3 0x40014200 acpi0 acpi0 72162 377415 0 0 3 0x40014200 idle1 97244 135401 0 0 3 0x14200 bored softnet7 97222 315530 0 0 3 0x14200 bored softnet6 26129 212004 0 0 3 0x14200 bored softnet5 74358 364423 0 0 3 0x14200 bored softnet4 98236 457090 0 0 3 0x14200 bored softnet3 56025 490087 0 0 3 0x14200 bored softnet2 4165 242520 0 0 3 0x14200 bored softnet1 54024 448367 0 0 3 0x14200 bored softnet0 34616 176746 0 0 3 0x14200 bored systqmp 97905 119767 0 0 3 0x14200 bored systq 8571 241705 0 0 3 0x14200 tmoslp softclockmp 92618 411875 0 0 3 0x40014200 tmoslp softclock 54602 492194 0 0 3 0x40014200 idle0 1 427909 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex shmpl r = 0 (0xffffffff839c5310) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x124 sys/kern/subr_pool.c:581 #4 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 #7 Xsyscall+0x128 Process 46568 (syz-executor) thread 0xffff80003c458028 (214719) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83870bd0) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] #1 syscall+0xaf4 sys/arch/amd64/amd64/trap.c:746 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839c5310) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x124 sys/kern/subr_pool.c:581 #4 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10202 10957K 10968K 166960K 11280 0 pcb 17 16K 18K 166960K 21 0 rtable 219 6K 6K 166960K 310 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 4 1K 9K 166960K 9 0 counters 68 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 40 0 iov 0 0K 16K 166960K 90 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1336 84K 84K 166960K 1601 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 13K 166960K 20 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 42 0 dirhash 12 2K 3K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 25 93K 129K 166960K 629 0 sigio 0 0K 0K 166960K 10 0 proc 58 99K 147K 166960K 560 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 162 0 in_multi 99 7K 7K 166960K 112 0 ether_multi 1 0K 0K 166960K 2 0 mrt 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 115 519K 519K 166960K 115 0 exec 0 0K 1K 166960K 423 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 254 160K 178K 166960K 7391 0 UVM aobj 127 4K 5K 166960K 132 0 pinsyscall 46 92K 110K 166960K 1686 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 33 0 NDP 11 0K 2K 166960K 27 0 temp 56 8647K 8711K 166960K 5979 0 kqueue 16 24K 36K 166960K 136 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 26 0 0 1 0 1 1 0 8 0 rtpcb 120 152 0 148 1 0 1 1 0 8 0 rtentry 176 111 0 10 5 0 5 5 0 8 0 unpcb 144 485 0 465 6 0 6 6 0 8 5 syncache 336 11 0 11 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 736 567 0 560 10 3 7 10 0 8 6 arp 128 11 0 0 1 0 1 1 0 8 0 ipq 40 3 0 1 1 0 1 1 0 8 0 ipqe 40 6 0 4 1 0 1 1 0 8 0 inpcb 328 1328 0 1316 13 3 10 12 0 8 8 ip6q 72 3 0 1 1 0 1 1 0 8 0 ip6af 40 5 0 3 1 0 1 1 0 8 0 nd6 144 31 0 9 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 469 0 15 29 0 29 29 0 8 0 art_table 40 470 0 15 5 0 5 5 0 8 0 art_node 32 111 0 20 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 13 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 36 0 26 1 0 1 1 0 8 0 shmpl 112 129 0 5 4 0 4 4 0 8 0 pool(0xffffffff839c52f8:shmpl): page inconsistency: page 0xfffffd80628cf000; 15 on list, 19 missing, 35 items per page dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2473 0 960 96 0 96 96 0 8 0 ffsino 296 2473 0 960 117 0 117 117 0 8 0 nchpl 144 3353 0 1668 63 0 63 63 0 8 0 uvmvnodes 80 2554 0 0 53 0 53 53 0 8 0 vnodes 216 2554 0 0 142 0 142 142 0 8 0 namei 1024 11028 0 11028 1 0 1 1 0 8 1 percpumem 16 49 0 0 1 0 1 1 0 8 0 kstatmem 264 24 0 0 2 0 2 2 0 8 0 scxspl 216 10782 0 10782 10 4 6 8 1 8 6 plimitpl 152 221 0 194 2 0 2 2 0 8 0 sigapl 424 921 0 861 8 0 8 8 0 8 0 knotepl 120 399 0 0 13 0 13 13 0 8 0 kqueuepl 224 353 0 339 5 2 3 5 0 8 2 pipepl 344 138 0 111 3 0 3 3 0 8 0 fdescpl 528 898 0 861 4 0 4 4 0 8 0 filepl 160 5973 0 5742 22 4 18 21 0 8 8 lockfpl 104 111 0 109 1 0 1 1 0 8 0 lockfspl 48 47 0 45 1 0 1 1 0 8 0 sessionpl 144 26 0 10 1 0 1 1 0 8 0 pgrppl 48 42 0 18 1 0 1 1 0 8 0 ucredpl 104 1366 0 1347 1 0 1 1 0 8 0 zombiepl 144 862 0 861 1 0 1 1 0 8 0 processpl 1232 921 0 861 7 1 6 6 0 8 0 procpl 664 1766 0 1694 7 0 7 7 0 8 0 sockpl 752 1978 0 1942 25 13 12 17 0 8 8 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 108 0 0 14 0 14 14 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 23 0 0 3 0 3 3 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 289 0 0 19 0 19 19 0 8 0 bufpl 280 3638 0 119 252 0 252 252 0 8 0 anonpl 32 13347 0 0 108 0 108 108 0 246 0 amapchunkpl 152 26153 0 25583 41 2 39 39 0 158 14 amappl16 200 3684 0 3656 26 15 11 22 0 8 8 amappl15 192 9 0 8 1 0 1 1 0 8 0 amappl14 184 118 0 108 1 0 1 1 0 8 0 amappl13 176 16 0 16 1 1 0 1 0 8 0 amappl12 168 1514 0 1477 2 0 2 2 0 8 0 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 17 0 17 1 1 0 1 0 8 0 amappl9 144 260 0 260 1 1 0 1 0 8 0 amappl8 136 26 0 25 1 0 1 1 0 8 0 amappl7 128 101 0 91 1 0 1 1 0 8 0 amappl6 120 184 0 180 1 0 1 1 0 8 0 amappl5 112 115 0 109 1 0 1 1 0 8 0 amappl4 104 289 0 272 1 0 1 1 0 8 0 amappl3 96 4076 0 3967 4 0 4 4 0 8 0 amappl2 88 1167 0 1088 2 0 2 2 0 8 0 amappl1 80 11152 0 10574 14 0 14 14 0 8 0 amappl 88 6625 0 6435 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 131 0 5 3 0 3 3 0 8 0 uaddrrnd 24 898 0 861 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 898 0 861 1 0 1 1 0 8 0 vmmpekpl 168 8910 0 8878 2 0 2 2 0 8 0 vmmpepl 168 63934 0 61802 109 0 109 109 0 357 12 vmsppl 488 897 0 861 7 1 6 6 0 8 1 rwobjpl 80 22750 0 19212 73 0 73 73 0 8 0 pdppl 4096 1803 0 1722 115 32 83 99 0 8 2 pvpl 32 18785 0 0 154 2 152 152 0 265 0 pmappl 256 897 0 861 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 302 0 38 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83868ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff838709c8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff838709c8) at __mp_lock+0x192 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:847 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7eae4c012110, count: 8 ddb{0}> trace x86_ipi_db(ffffffff83868ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff838709c8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff838709c8) at __mp_lock+0x192 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:847 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7eae4c012110, count: -7 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b0f8) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c52f8,1,ffff80003c46aff8) at pool_do_get+0x5df pool_get(ffffffff839c52f8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c458028,ffff80003c46b250,14,ffff80003c46b1a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c458028,ffff80003c46b250,ffff80003c46b1a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b250) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b250) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9d4cf6e72a0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b0f8) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c52f8,1,ffff80003c46aff8) at pool_do_get+0x5df pool_get(ffffffff839c52f8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c458028,ffff80003c46b250,14,ffff80003c46b1a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c458028,ffff80003c46b250,ffff80003c46b1a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b250) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b250) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9d4cf6e72a0, count: -8