panic: pool_do_get: shmpl free list modified: page 0xfffffd806b463000; item addr 0xfffffd806b463cb0; offset 0x40=0x68aa85cc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 143185 89204 32767 0x10 0 0 syz-executor * 80586 89204 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336a723) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83979f40,1,ffff80003c48ad88) at pool_do_get+0x5df pool_get(ffffffff83979f40,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5a10,ffff80003c48afe0,194,ffff80003c48af30) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5a10,ffff80003c48afe0,ffff80003c48af30) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c48afe0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c48afe0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cdbd5a5a80, 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 0xfffffd806b463000; item addr 0xfffffd806b463cb0; offset 0x40=0x68aa85cc ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336a723) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83979f40,1,ffff80003c48ad88) at pool_do_get+0x5df pool_get(ffffffff83979f40,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5a10,ffff80003c48afe0,194,ffff80003c48af30) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5a10,ffff80003c48afe0,ffff80003c48af30) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c48afe0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c48afe0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cdbd5a5a80, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c48abb0 rbx 0xffff8000299eeddf rdx 0xffff800001464d00 rcx 0xffff80002a2e5a10 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xa10a8af303af8582 r11 0xe8ae75a6b99c1f11 r12 0xffff8000299eebe0 r13 0 r14 0 r15 0x1 rip 0xffffffff81bc8865 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c48aba0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=80586 pid=89204 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=54, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a2e5248,0xffff80002a2e4560 process=0xffff80003c47b050 user=0xffff80003c486000, vmspace=0xfffffd806a64b5e8 estcpu=4, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 50360 235629 67968 32767 2 0x10 syz-executor 56605 184281 35054 32767 2 0x10 syz-executor 89204 143185 42450 32767 7 0x10 syz-executor *89204 80586 42450 32767 7 0x4000010 syz-executor 56254 235817 18149 32767 2 0x10 syz-executor 56254 125120 18149 32767 3 0x4000090 ttyout syz-executor 44913 104588 85652 32767 3 0x90 nanoslp syz-executor 44913 24608 85652 32767 3 0x4000090 msgwait syz-executor 44913 465020 85652 32767 3 0x4000090 fsleep syz-executor 1572 201336 0 0 3 0x14200 bored sosplice 42450 349849 9423 32767 3 0x90 nanoslp syz-executor 48448 247317 45721 32767 3 0x90 nanoslp syz-executor 84866 232918 65282 32767 3 0x90 nanoslp syz-executor 18149 121042 54360 32767 3 0x90 nanoslp syz-executor 85652 148920 58976 32767 3 0x90 nanoslp syz-executor 35054 127832 26697 32767 3 0x90 nanoslp syz-executor 67968 192207 72132 32767 3 0x90 nanoslp syz-executor 69471 133403 52059 32767 3 0x90 nanoslp syz-executor 9423 110450 58983 0 3 0x82 wait syz-executor 54360 28448 58983 0 3 0x82 wait syz-executor 45721 389927 58983 0 3 0x82 wait syz-executor 26697 167944 58983 0 3 0x82 wait syz-executor 72132 303483 58983 0 3 0x82 wait syz-executor 58976 158972 58983 0 3 0x82 wait syz-executor 52059 69218 58983 0 3 0x82 wait syz-executor 65282 24227 58983 0 3 0x82 wait syz-executor 58983 270192 65313 0 3 0x82 kqread syz-executor 65313 88974 41415 0 3 0x10008a sigsusp ksh 41415 120469 98313 0 3 0x98 kqread sshd-session 98313 241190 69049 0 3 0x92 kqread sshd-session 1444 469140 1 0 3 0x100083 ttyin getty 69049 150714 1 0 3 0x88 kqread sshd 29468 440580 18008 73 3 0x1100090 kqread syslogd 18008 365952 1 0 3 0x100082 sbwait syslogd 70726 328588 1 0 3 0x100080 kqread resolvd 83364 73382 82186 77 3 0x100092 kqread dhcpleased 4349 211031 82186 77 3 0x100092 kqread dhcpleased 82186 223389 1 0 3 0x80 kqread dhcpleased 81615 313953 0 0 3 0x14200 bored smr 27319 453452 0 0 3 0x14200 pgzero zerothread 72684 326211 0 0 3 0x14200 aiodoned aiodoned 43955 235226 0 0 3 0x14200 syncer update 82055 200296 0 0 3 0x14200 cleaner cleaner 79039 244740 0 0 3 0x14200 reaper reaper 47951 361859 0 0 3 0x14200 pgdaemon pagedaemon 30305 174943 0 0 3 0x14200 bored viomb 51069 451395 0 0 3 0x40014200 acpi0 acpi0 82261 197953 0 0 3 0x40014200 idle1 25165 78560 0 0 3 0x14200 bored softnet7 19303 255385 0 0 3 0x14200 bored softnet6 96530 363695 0 0 3 0x14200 bored softnet5 99285 341594 0 0 3 0x14200 bored softnet4 18775 50261 0 0 3 0x14200 bored softnet3 41893 403141 0 0 3 0x14200 bored softnet2 21363 149306 0 0 3 0x14200 bored softnet1 49406 175092 0 0 3 0x14200 bored softnet0 64158 141860 0 0 3 0x14200 bored systqmp 78107 464918 0 0 3 0x14200 bored systq 54767 335323 0 0 3 0x14200 tmoslp softclockmp 51011 83351 0 0 3 0x40014200 tmoslp softclock 12160 298682 0 0 3 0x40014200 idle0 1 272888 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 (0xffffffff83979f58) #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:748 #7 Xsyscall+0x128 Process 89204 (syz-executor) thread 0xffff80002a2e5a10 (80586) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839c2350) #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:748 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83979f58) #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:748 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10198 10957K 10968K 166960K 11276 0 pcb 17 12K 12K 166960K 17 0 rtable 213 6K 6K 166960K 262 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 2 1K 9K 166960K 6 0 counters 68 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 64 0 iov 0 0K 24K 166960K 9 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1359 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 8 0K 0K 166960K 12 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 26 97K 121K 166960K 252 0 sigio 0 0K 0K 166960K 6 0 proc 58 99K 147K 166960K 482 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 14 0 in_multi 99 7K 7K 166960K 105 0 ether_multi 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 350 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 244 152K 165K 166960K 3780 0 UVM aobj 6 2K 2K 166960K 7 0 pinsyscall 47 94K 112K 166960K 1264 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 10 0 NDP 11 0K 2K 166960K 27 0 temp 39 8643K 8707K 166960K 4126 0 kqueue 13 20K 25K 166960K 36 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 75 0 72 2 0 2 2 0 8 1 rtentry 176 99 0 1 5 0 5 5 0 8 0 unpcb 144 101 0 82 2 0 2 2 0 8 1 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 64 0 59 2 0 2 2 0 8 1 arp 128 11 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 224 0 215 7 0 7 7 0 8 6 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 144 19 0 0 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 444 0 0 28 0 28 28 0 8 0 art_table 40 445 0 0 5 0 5 5 0 8 0 art_node 32 99 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 5 1 0 1 1 0 8 1 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 9 0 3 1 0 1 1 0 8 0 shmpl 112 4 0 1 1 0 1 1 0 8 0 pool(0xffffffff83979f40:shmpl): page inconsistency: page 0xfffffd806b463000; 31 on list, 3 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1711 0 204 95 0 95 95 0 8 0 ffsino 296 1711 0 204 117 0 117 117 0 8 0 nchpl 144 2048 0 371 63 0 63 63 0 8 0 uvmvnodes 80 1792 0 0 37 0 37 37 0 8 0 vnodes 216 1792 0 0 100 0 100 100 0 8 0 namei 1024 6179 0 6179 2 0 2 2 0 8 2 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 7544 0 7544 3 2 1 2 1 8 1 plimitpl 152 50 0 24 2 0 2 2 0 8 1 sigapl 424 532 0 471 8 0 8 8 0 8 0 knotepl 120 297 0 0 9 0 9 9 0 8 0 kqueuepl 224 64 0 55 2 0 2 2 0 8 1 pipepl 344 107 0 78 3 0 3 3 0 8 0 fdescpl 528 509 0 471 3 0 3 3 0 8 0 filepl 160 2055 0 1824 14 0 14 14 0 8 3 lockfpl 104 78 0 75 1 0 1 1 0 8 0 lockfspl 48 20 0 17 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 31 0 7 1 0 1 1 0 8 0 ucredpl 104 304 0 285 1 0 1 1 0 8 0 zombiepl 144 474 0 471 1 0 1 1 0 8 0 processpl 1232 532 0 471 7 1 6 6 0 8 0 procpl 664 734 0 669 7 0 7 7 0 8 0 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 752 401 0 369 13 1 12 13 0 8 7 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 111 0 0 14 0 14 14 0 8 0 mcl2k 2048 17 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 294 0 0 19 0 19 19 0 8 0 bufpl 280 3143 0 116 217 0 217 217 0 8 0 anonpl 32 7682 0 0 62 0 62 62 0 246 0 amapchunkpl 152 11618 0 11083 33 3 30 30 0 158 4 amappl16 200 2040 0 2017 15 4 11 14 0 8 8 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 108 0 97 1 0 1 1 0 8 0 amappl13 176 31 0 31 1 1 0 1 0 8 0 amappl12 168 1125 0 1089 2 0 2 2 0 8 0 amappl11 160 45 0 35 1 0 1 1 0 8 0 amappl10 152 6 0 6 1 1 0 1 0 8 0 amappl9 144 253 0 253 1 1 0 1 0 8 0 amappl8 136 21 0 19 1 0 1 1 0 8 0 amappl7 128 94 0 84 1 0 1 1 0 8 0 amappl6 120 177 0 174 1 0 1 1 0 8 0 amappl5 112 115 0 108 1 0 1 1 0 8 0 amappl4 104 270 0 253 1 0 1 1 0 8 0 amappl3 96 1964 0 1838 4 0 4 4 0 8 0 amappl2 88 616 0 561 2 0 2 2 0 8 0 amappl1 80 8765 0 8183 14 0 14 14 0 8 0 amappl 88 3136 0 2956 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 6 0 1 1 0 1 1 0 8 0 uaddrrnd 24 509 0 471 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 509 0 471 1 0 1 1 0 8 0 vmmpekpl 168 5709 0 5671 2 0 2 2 0 8 0 vmmpepl 168 39145 0 37002 107 1 106 106 0 357 5 vmsppl 488 508 0 471 7 1 6 6 0 8 0 rwobjpl 80 15418 0 12773 58 0 58 58 0 8 1 pdppl 4096 1026 0 942 110 24 86 96 0 8 2 pvpl 32 15887 0 0 130 1 129 129 0 265 0 pmappl 256 508 0 471 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 287 0 27 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837fcff0) 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(ffffffff839c2148) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff839c2148) 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: 0x726915b1ce80, count: 8 ddb{0}> trace x86_ipi_db(ffffffff837fcff0) 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(ffffffff839c2148) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff839c2148) 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: 0x726915b1ce80, 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(ffffffff8336a723) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83979f40,1,ffff80003c48ad88) at pool_do_get+0x5df pool_get(ffffffff83979f40,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5a10,ffff80003c48afe0,194,ffff80003c48af30) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5a10,ffff80003c48afe0,ffff80003c48af30) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c48afe0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c48afe0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cdbd5a5a80, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336a723) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83979f40,1,ffff80003c48ad88) at pool_do_get+0x5df pool_get(ffffffff83979f40,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5a10,ffff80003c48afe0,194,ffff80003c48af30) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5a10,ffff80003c48afe0,ffff80003c48af30) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c48afe0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c48afe0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2cdbd5a5a80, count: -8