panic: pool_do_get: shmpl free list modified: page 0xfffffd806822f000; item addr 0xfffffd806822fe00; offset 0x40=0x67af8c42 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 345898 29837 32767 0x10 0 1 syz-executor * 7851 29837 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833a44c2) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e7b58,1,ffff80003c575538) at pool_do_get+0x5da pool_get(ffffffff839e7b58,1) at pool_get+0x149 shmget_allocate_segment(ffff80003c502548,ffff80003c575790,20,ffff80003c5756e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003c502548,ffff80003c575790,ffff80003c5756e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c575790) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c575790) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf9c024deb40, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: pool_do_get: shmpl free list modified: page 0xfffffd806822f000; item addr 0xfffffd806822fe00; offset 0x40=0x67af8c42 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833a44c2) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e7b58,1,ffff80003c575538) at pool_do_get+0x5da pool_get(ffffffff839e7b58,1) at pool_get+0x149 shmget_allocate_segment(ffff80003c502548,ffff80003c575790,20,ffff80003c5756e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003c502548,ffff80003c575790,ffff80003c5756e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c575790) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c575790) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf9c024deb40, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c575370 rbx 0xffffffff837a6dc7 cpu_info_full_primary+0x2dc7 rdx 0xffff800001434e40 rcx 0xffff80003c502548 rax 0xffffffff837a5ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xc4f94e4e0f7f4958 r11 0x17e7405317658f0e r12 0xffffffff837a6bc8 cpu_info_full_primary+0x2bc8 r13 0 r14 0 r15 0x1 rip 0xffffffff817d5225 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c575360 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=7851 pid=29837 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=50, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000ffff7730,0xffffffff839b94e0 process=0xffff80003c4fa250 user=0xffff80003c570000, vmspace=0xfffffd806bf66ca0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 29837 345898 15253 32767 7 0x10 syz-executor *29837 7851 15253 32767 7 0x4000010 syz-executor 89653 235838 21876 0 2 0x2 ifconfig 21876 91076 53273 0 3 0x10008a sigsusp sh 26711 24572 28763 32767 2 0x10 syz-executor 4117 98001 31750 32767 2 0x10 syz-executor 4117 338896 31750 32767 3 0x4000090 fsleep syz-executor 84788 72838 93455 32767 2 0x10 syz-executor 84788 180 93455 32767 3 0x4000090 lockf syz-executor 84788 429516 93455 32767 3 0x4000090 fsleep syz-executor 23810 188726 8319 32767 2 0x10 syz-executor 23810 462625 8319 32767 3 0x4000090 fsleep syz-executor 23810 523717 8319 32767 3 0x4000090 fsleep syz-executor 23810 217015 8319 32767 3 0x4000090 fsleep syz-executor 17527 154530 42941 32767 2 0x10 syz-executor 17527 456750 42941 32767 3 0x4000090 lockf syz-executor 17527 66070 42941 32767 3 0x4000090 ttyout syz-executor 8078 165464 9207 32767 2 0x10 syz-executor 8078 65696 9207 32767 3 0x4000090 pipewr syz-executor 8078 516707 9207 32767 3 0x4000090 pipewr syz-executor 8078 132268 9207 32767 2 0x4000010 syz-executor 8319 92485 88952 32767 3 0x90 nanoslp syz-executor 53273 336815 87324 0 3 0x80 wait syz-executor 28763 135900 97382 32767 3 0x90 nanoslp syz-executor 15253 508692 49833 32767 3 0x90 nanoslp syz-executor 93455 509672 57577 32767 3 0x90 nanoslp syz-executor 42941 300478 37609 32767 3 0x90 nanoslp syz-executor 9207 173944 35216 32767 3 0x90 nanoslp syz-executor 31750 509300 94922 32767 3 0x90 nanoslp syz-executor 87324 354096 62090 0 3 0x82 wait syz-executor 94922 352149 62090 0 3 0x82 wait syz-executor 49833 402052 62090 0 3 0x82 wait syz-executor 37609 195560 62090 0 3 0x82 wait syz-executor 35216 144772 62090 0 3 0x82 wait syz-executor 97382 453702 62090 0 3 0x82 wait syz-executor 57577 386349 62090 0 3 0x82 wait syz-executor 88952 339586 62090 0 3 0x82 wait syz-executor 62090 515220 95232 0 3 0x82 kqread syz-executor 95232 381884 46966 0 3 0x10008a sigsusp ksh 46966 84759 84660 0 3 0x98 kqread sshd-session 84660 278283 49492 0 3 0x92 kqread sshd-session 26488 155862 1 0 3 0x100083 ttyin getty 49492 131636 1 0 3 0x88 kqread sshd 38286 425354 78474 73 3 0x1100090 kqread syslogd 78474 225474 1 0 3 0x100082 sbwait syslogd 25123 239351 1 0 3 0x100080 kqread resolvd 33809 32410 56341 77 3 0x100092 kqread dhcpleased 37091 238713 56341 77 3 0x100092 kqread dhcpleased 56341 188411 1 0 3 0x80 kqread dhcpleased 84481 344517 0 0 3 0x14200 bored smr 99830 395717 0 0 2 0x14200 zerothread 44207 459668 0 0 3 0x14200 aiodoned aiodoned 14350 398348 0 0 3 0x14200 syncer update 99557 157331 0 0 3 0x14200 cleaner cleaner 81165 98772 0 0 3 0x14200 reaper reaper 88426 421207 0 0 3 0x14200 pgdaemon pagedaemon 18649 46562 0 0 3 0x14200 bored viomb 40120 481294 0 0 3 0x40014200 acpi0 acpi0 74180 445361 0 0 3 0x40014200 idle1 58033 227336 0 0 3 0x14200 bored softnet3 13603 167008 0 0 3 0x14200 bored softnet2 55417 442570 0 0 3 0x14200 bored softnet1 6741 437233 0 0 3 0x14200 bored softnet0 23279 398784 0 0 3 0x14200 bored systqmp 38544 469511 0 0 3 0x14200 bored systq 33571 268510 0 0 3 0x14200 tmoslp softclockmp 91631 12264 0 0 3 0x40014200 tmoslp softclock 65794 502050 0 0 3 0x40014200 idle0 1 127541 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex shmpl r = 0 (0xffffffff839e7b70) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x10b sys/kern/subr_pool.c:583 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 29837 (syz-executor) thread 0xffff80003c502548 (7851) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83980940) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 syscall+0xae6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #1 syscall+0xae6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839e7b70) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x10b sys/kern/subr_pool.c:583 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10180 10953K 10966K 166960K 11259 0 pcb 17 12K 12K 166960K 17 0 rtable 228 6K 6K 166960K 345 0 pf 31 16K 16K 166960K 31 0 ifaddr 41 7K 7K 166960K 43 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 1K 166960K 1 0 counters 64 36K 36K 166960K 64 0 ioctlops 0 0K 2K 166960K 28 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1333 84K 84K 166960K 1349 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 27 101K 125K 166960K 147 0 sigio 0 0K 0K 166960K 1 0 proc 65 91K 115K 166960K 474 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 95 7K 7K 166960K 95 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 31 148K 148K 166960K 31 0 exec 0 0K 1K 166960K 346 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 249 76K 76K 166960K 2700 0 UVM aobj 3 2K 2K 166960K 4 0 pinsyscall 48 96K 115K 166960K 1174 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 26 2K 2K 166960K 26 0 temp 35 8630K 8694K 166960K 3709 0 kqueue 14 22K 22K 166960K 23 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 41 0 33 1 0 1 1 0 8 0 rtentry 168 108 0 1 5 0 5 5 0 8 0 unpcb 144 33 0 16 1 0 1 1 0 8 0 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 10 0 5 1 0 1 1 0 8 0 arp 120 18 0 0 1 0 1 1 0 8 0 inpcb 376 66 0 53 2 0 2 2 0 8 0 nd6 136 22 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 437 0 0 28 0 28 28 0 8 0 art_table 32 438 0 0 4 0 4 4 0 8 0 art_node 16 107 0 9 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 shmpl 112 1 0 1 1 0 1 1 0 8 1 pool(0xffffffff839e7b58:shmpl): page inconsistency: page 0xfffffd806822f000; 34 on list, 0 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1549 0 47 95 0 95 95 0 8 0 ffsino 280 1549 0 47 108 0 108 108 0 8 0 nchpl 144 1740 0 60 63 0 63 63 0 8 0 uvmvnodes 80 1630 0 0 34 0 34 34 0 8 0 vnodes 216 1630 0 0 91 0 91 91 0 8 0 namei 1024 5101 0 5101 1 0 1 1 0 8 1 percpumem 16 46 0 0 1 0 1 1 0 8 0 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 5704 0 5704 4 1 3 3 1 8 3 plimitpl 152 34 0 10 1 0 1 1 0 8 0 sigapl 424 429 0 372 8 0 8 8 0 8 0 futexpl 64 107 0 102 1 0 1 1 0 8 0 knotepl 120 55 0 0 2 0 2 2 0 8 0 kqueuepl 216 19 0 9 1 0 1 1 0 8 0 pipepl 328 105 0 75 3 0 3 3 0 8 0 fdescpl 504 411 0 372 7 1 6 6 0 8 1 filepl 152 1338 0 1108 9 0 9 9 0 8 0 lockfpl 104 11 0 5 1 0 1 1 0 8 0 lockfspl 48 5 0 2 1 0 1 1 0 8 0 sessionpl 144 21 0 5 1 0 1 1 0 8 0 pgrppl 48 29 0 5 1 0 1 1 0 8 0 ucredpl 104 87 0 69 1 0 1 1 0 8 0 zombiepl 144 372 0 372 1 0 1 1 0 8 1 processpl 1168 429 0 372 5 0 5 5 0 8 0 procpl 656 447 0 378 6 0 6 6 0 8 0 sockpl 688 140 0 102 4 0 4 4 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 112 0 0 14 0 14 14 0 8 0 mcl2k 2048 27 0 0 4 0 4 4 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 238 0 0 15 0 15 15 0 8 0 bufpl 280 2232 0 124 151 0 151 151 0 8 0 anonpl 24 97216 0 93978 23 0 23 23 0 184 3 amapchunkpl 152 8340 0 7569 30 0 30 30 0 158 0 amappl16 200 1950 0 1936 5 0 5 5 0 8 4 amappl15 192 6 0 6 1 0 1 1 0 8 1 amappl14 184 103 0 93 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 0 1 1 0 8 1 amappl12 168 1023 0 984 2 0 2 2 0 8 0 amappl11 160 48 0 37 1 0 1 1 0 8 0 amappl10 152 30 0 30 1 0 1 1 0 8 1 amappl9 144 251 0 250 1 0 1 1 0 8 0 amappl8 136 24 0 22 1 0 1 1 0 8 0 amappl7 128 91 0 81 1 0 1 1 0 8 0 amappl6 120 173 0 168 1 0 1 1 0 8 0 amappl5 112 114 0 107 1 0 1 1 0 8 0 amappl4 104 291 0 277 1 0 1 1 0 8 0 amappl3 96 1246 0 1112 4 0 4 4 0 8 0 amappl2 88 606 0 551 2 0 2 2 0 8 0 amappl1 80 7536 0 6983 14 0 14 14 0 8 0 amappl 88 2355 0 2154 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 3 0 1 1 0 1 1 0 8 0 uaddrrnd 24 411 0 372 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 411 0 372 1 0 1 1 0 8 0 vmmpekpl 168 4877 0 4839 2 0 2 2 0 8 0 vmmpepl 168 31831 0 29816 89 0 89 89 0 357 0 vmsppl 456 410 0 372 7 1 6 6 0 8 1 rwobjpl 64 13806 0 11315 42 0 42 42 0 8 0 pdppl 4096 830 0 744 112 14 98 98 0 8 12 pvpl 32 9259 0 0 76 1 75 75 0 265 0 pmappl 248 410 0 372 4 1 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 291 0 17 8 0 8 8 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833a44c2) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e7b58,1,ffff80003c575538) at pool_do_get+0x5da pool_get(ffffffff839e7b58,1) at pool_get+0x149 shmget_allocate_segment(ffff80003c502548,ffff80003c575790,20,ffff80003c5756e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003c502548,ffff80003c575790,ffff80003c5756e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c575790) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c575790) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf9c024deb40, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029aabff0) 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 end of kernel end trace frame: 0x6fbb49519fa0, count: 12 ddb{1}> trace x86_ipi_db(ffff800029aabff0) 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 end of kernel end trace frame: 0x6fbb49519fa0, count: -3