kernel: protection fault trap, code=0 Stopped at sys_semop+0x3d5: movzwl 0(%rax),%r15d ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic the kernel did not panic ddb{1}> trace sys_semop(ffff8000fffe8a80,ffff80003c438150,ffff80003c4380a0) at sys_semop+0x3d5 sys/kern/sysv_sem.c:617 syscall(ffff80003c438150) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c438150) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c494324a90, count: -3 ddb{1}> show registers rdi 0 rsi 0 rbp 0xffff80003c438070 rbx 0xdeafbeaddeafbead rdx 0 rcx 0xffff8000fffe8a80 rax 0xdeafbeaddeafbead r8 0x7f7fffffc000 r9 0x1 r10 0xe32deb8b81c74fa5 r11 0xf7b153e03bc6aaaa r12 0 r13 0xfffffd807b921e70 r14 0xffff80003c438150 r15 0 rip 0xffffffff81156eb5 sys_semop+0x3d5 cs 0x8 rflags 0x10246 __ALIGN_SIZE+0xf246 rsp 0xffff80003c437f80 ss 0x10 sys_semop+0x3d5: movzwl 0(%rax),%r15d ddb{1}> show proc PROC (syz-executor) tid=486512 pid=43678 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000fffe87e8,0xffff8000fffe8fc0 process=0xffff8000fffece88 user=0xffff80003c433000, vmspace=0xfffffd806c1ff018 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 43678 97373 73225 0 2 0 syz-executor *43678 486512 73225 0 7 0x4000000 syz-executor 43678 68791 73225 0 3 0x4000080 fsleep syz-executor 43678 79997 73225 0 3 0x4000080 fsleep syz-executor 7133 402878 78298 0 3 0x80 fsleep syz-executor 7133 461636 78298 0 7 0x4000000 syz-executor 76465 180063 41890 0 3 0x80 fsleep syz-executor 76465 412885 41890 0 3 0x4000080 kqread syz-executor 6482 385796 40402 0 3 0x80 fsleep syz-executor 6482 441870 40402 0 3 0x4000080 fifor syz-executor 40402 24888 91041 0 3 0x82 nanoslp syz-executor 19067 51057 74527 0 3 0x80 fsleep syz-executor 19067 340837 74527 0 3 0x4000080 msgwait syz-executor 56298 432645 17816 0 3 0x80 fsleep syz-executor 56298 6688 17816 0 3 0x4000080 sbwait syz-executor 88934 330800 62527 0 3 0x80 fsleep syz-executor 88934 397017 62527 0 3 0x4000080 ttyin syz-executor 15435 434156 0 0 3 0x14200 acct acct 87909 366148 1 0 3 0x100083 ttyin getty 42785 411771 52479 0 3 0x100082 sbwait ndp 52479 120741 13520 0 3 0x10008a sigsusp sh 41890 321972 91041 0 3 0x82 nanoslp syz-executor 73225 280761 91041 0 3 0x82 nanoslp syz-executor 62527 289871 91041 0 3 0x82 nanoslp syz-executor 17816 82906 91041 0 3 0x82 nanoslp syz-executor 74527 511839 91041 0 3 0x82 nanoslp syz-executor 78298 151574 91041 0 3 0x82 nanoslp syz-executor 13520 274951 91041 0 3 0x82 wait syz-executor 91041 222870 70792 0 3 0x82 kqread syz-executor 70792 32472 72752 0 3 0x10008a sigsusp ksh 72752 385956 46646 0 3 0x98 kqread sshd-session 46646 69055 80492 0 3 0x92 kqread sshd-session 80492 476252 1 0 3 0x88 kqread sshd 30430 472896 47418 74 3 0x1100092 bpf pflogd 47418 276722 1 0 3 0x80 sbwait pflogd 98396 109562 22299 73 3 0x1100090 kqread syslogd 22299 421438 1 0 3 0x100082 sbwait syslogd 82079 304993 1 0 3 0x100080 kqread resolvd 14598 196482 2790 77 3 0x100092 kqread dhcpleased 49727 4969 2790 77 3 0x100092 kqread dhcpleased 2790 462432 1 0 3 0x80 kqread dhcpleased 72813 77684 0 0 3 0x14200 bored smr 45707 355858 0 0 3 0x14200 pgzero zerothread 89495 174594 0 0 3 0x14200 aiodoned aiodoned 90541 85757 0 0 3 0x14200 syncer update 39662 476641 0 0 3 0x14200 cleaner cleaner 48761 237526 0 0 3 0x14200 reaper reaper 60160 515965 0 0 3 0x14200 pgdaemon pagedaemon 41302 307046 0 0 3 0x14200 bored viomb 20810 148978 0 0 3 0x40014200 acpi0 acpi0 65212 199102 0 0 3 0x40014200 idle1 4044 93861 0 0 3 0x14200 bored softnet1 56774 286863 0 0 3 0x14200 bored softnet0 59832 128477 0 0 3 0x14200 bored systqmp 55781 143097 0 0 3 0x14200 bored systq 71785 79440 0 0 3 0x14200 tmoslp softclockmp 55806 42285 0 0 3 0x40014200 tmoslp softclock 98636 514949 0 0 3 0x40014200 idle0 1 10981 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb{1}> show all locks Process 43678 (syz-executor) thread 0xffff8000fffe8a80 (486512) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff838e3758) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 __mp_acquire_count+0x58 sys/kern/kern_lock.c:-1 #2 malloc+0xe3 sys/kern/kern_malloc.c:174 #3 sys_semop+0x22f sys/kern/sysv_sem.c:-1 #4 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 #5 Xsyscall+0x128 Process 56298 (syz-executor) thread 0xffff8000397ee2c0 (6688) exclusive rwlock sbufrcv r = 0 (0xffff8000014caa10) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 sblock+0xb6 sys/kern/uipc_socket2.c:536 #3 soreceive+0x27d sys/kern/uipc_socket.c:878 #4 recvit+0x40b sys/kern/uipc_syscalls.c:1078 #5 sys_recvmmsg+0x410 sys/kern/uipc_syscalls.c:969 #6 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:765 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10228 11032K 11560K 166960K 12562 0 pcb 18 14K 16K 166960K 208 0 rtable 253 10K 10K 166960K 562 0 pf 37 18K 21K 166960K 154 0 ifaddr 44 8K 8K 166960K 99 0 ifgroup 57 2K 2K 166960K 170 0 sysctl 4 1K 9K 166960K 12 0 counters 70 37K 38K 166960K 178 0 ioctlops 0 0K 4K 166960K 1726 0 iov 1 4K 16K 166960K 103 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1425 90K 90K 166960K 2067 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 21 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 106 0 dirhash 12 2K 2K 166960K 27 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 19 69K 240K 166960K 931 0 sigio 0 0K 0K 166960K 12 0 proc 72 115K 180K 166960K 647 0 subproc 72 4K 4K 166960K 93 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 133 0 in_multi 95 7K 7K 166960K 156 0 ether_multi 1 0K 0K 166960K 8 0 mrt 2 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 241 1076K 1076K 166960K 241 0 exec 0 0K 1K 166960K 522 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 263 178K 192K 166960K 10298 0 UVM aobj 7 2K 2K 166960K 8 0 pinsyscall 45 90K 107K 166960K 2131 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 75 0 NDP 13 0K 2K 166960K 71 0 temp 68 8657K 8722K 166960K 65855 0 kqueue 15 24K 33K 166960K 168 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 208 0 204 3 2 1 3 0 8 0 rtentry 176 146 0 38 6 0 6 6 0 8 0 unpcb 144 483 0 461 4 2 2 2 0 8 0 syncache 336 5 0 5 2 2 0 1 0 8 0 tcpcb 736 197 0 193 1 0 1 1 0 8 0 arp 136 23 0 4 1 0 1 1 0 8 0 inpcb 328 733 0 724 7 5 2 7 0 8 0 nd6 152 31 0 9 1 0 1 1 0 8 0 pkpcb 40 9 0 9 3 2 1 1 0 8 1 kcovpl 48 10 0 2 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1192 41 0 40 2 1 1 1 0 8 0 pppxif 1504 4 0 4 3 2 1 1 0 8 1 pfstscr 40 5 0 5 1 0 1 1 0 8 1 pffrag 232 9 0 2 1 0 1 1 0 482 0 pffrnode 88 8 0 2 1 0 1 1 0 8 0 pffrent 40 14 0 7 1 0 1 1 0 8 0 pfosfp 40 1429 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1429 0 714 21 0 21 21 0 8 0 pfrktable 1344 1 0 1 1 1 0 1 0 8 0 pfanchor 1288 1 0 1 1 1 0 1 0 8 0 pfstitem 24 70 0 28 1 0 1 1 0 8 0 pfstkey 128 80 0 38 2 0 2 2 0 8 0 pfstate 384 75 0 33 5 0 5 5 0 8 0 pfrule 1344 26 0 20 2 0 2 2 0 8 0 rttmr 136 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 623 0 175 30 2 28 29 0 8 0 art_table 40 627 0 175 5 0 5 5 0 8 0 art_node 32 145 0 47 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 101 0 92 1 0 1 1 0 8 0 shmpl 112 5 0 1 1 0 1 1 0 8 0 dirhash 1024 27 0 10 3 0 3 3 0 8 0 dino2pl 256 3007 0 1499 96 0 96 96 0 8 0 ffsino 296 3007 0 1499 118 0 118 118 0 8 0 nchpl 144 4256 0 2548 64 0 64 64 0 8 0 rtmask 32 5 0 5 2 2 0 1 0 8 0 vnodes 216 3533 0 0 197 0 197 197 0 8 0 namei 1024 15094 0 15094 2 1 1 1 0 8 1 percpumem 16 104 0 54 1 0 1 1 0 8 0 kstatmem 264 104 0 76 4 2 2 3 0 8 0 scsiplug 72 3 0 3 2 2 0 1 0 8 0 scxspl 216 23457 0 23457 7 6 1 5 1 8 1 plimitpl 152 305 0 288 1 0 1 1 0 8 0 sigapl 424 1237 0 1187 7 1 6 7 0 8 0 knotepl 120 707 0 0 22 0 22 22 0 8 0 kqueuepl 224 317 0 305 4 3 1 3 0 8 0 pipepl 344 254 0 227 10 1 9 9 0 8 6 fdescpl 528 1217 0 1184 3 0 3 3 0 8 0 filepl 160 7181 0 6962 18 3 15 15 0 8 4 lockfpl 104 360 0 358 1 0 1 1 0 8 0 lockfspl 48 160 0 158 1 0 1 1 0 8 0 sessionpl 144 25 0 16 1 0 1 1 0 8 0 pgrppl 48 47 0 30 1 0 1 1 0 8 0 ucredpl 104 867 0 854 1 0 1 1 0 8 0 zombiepl 144 1335 0 1335 2 1 1 1 0 8 1 processpl 1232 1237 0 1187 5 0 5 5 0 8 0 procpl 664 2472 0 2413 6 0 6 6 0 8 0 sosppl 176 3 0 3 2 1 1 1 0 8 1 sockpl 752 1454 0 1419 12 7 5 10 0 8 0 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 129 0 0 17 1 16 17 0 8 0 mcl2k 2048 52 0 0 6 0 6 6 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 1142 0 0 72 0 72 72 0 8 0 bufpl 280 9339 0 3202 439 0 439 439 0 8 0 anonpl 32 12047 0 0 98 0 98 98 0 246 0 amapchunkpl 152 33827 0 33243 43 13 30 34 0 158 5 amappl16 200 4066 0 3998 37 21 16 17 0 8 6 amappl15 192 9 0 9 2 2 0 1 0 8 0 amappl14 184 3 0 3 1 1 0 1 0 8 0 amappl13 176 457 0 455 1 0 1 1 0 8 0 amappl12 168 1602 0 1557 3 0 3 3 0 8 0 amappl11 160 3 0 3 1 1 0 1 0 8 0 amappl10 152 50 0 35 1 0 1 1 0 8 0 amappl9 144 247 0 247 1 1 0 1 0 8 0 amappl8 136 30 0 27 1 0 1 1 0 8 0 amappl7 128 110 0 109 1 0 1 1 0 8 0 amappl6 120 307 0 292 1 0 1 1 0 8 0 amappl5 112 80 0 69 1 0 1 1 0 8 0 amappl4 104 460 0 427 1 0 1 1 0 8 0 amappl3 96 5761 0 5668 4 1 3 3 0 8 0 amappl2 88 1333 0 1253 2 0 2 2 0 8 0 amappl1 80 12488 0 11869 16 2 14 16 0 8 0 amappl 88 9375 0 9197 5 0 5 5 0 92 0 uvmvnodes 80 3533 0 0 73 0 73 73 0 8 0 dma65536 65536 1 0 1 1 1 0 1 0 8 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 7 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1217 0 1184 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1217 0 1184 1 0 1 1 0 8 0 vmmpekpl 168 11246 0 11207 3 0 3 3 0 8 0 vmmpepl 168 82396 0 80359 114 14 100 101 0 357 7 vmsppl 488 1216 0 1184 5 0 5 5 0 8 0 rwobjpl 80 27393 0 22845 98 2 96 96 0 8 2 pdppl 4096 2442 0 2368 108 32 76 84 0 8 2 pvpl 32 21352 0 0 173 0 173 173 0 265 0 pmappl 256 1216 0 1184 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 352 0 42 9 0 9 9 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp ddb{0}> trace x86_ipi_db(ffffffff837dbff0) 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(ffffffff838e3550) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff838e3550) at __mp_lock+0x192 sys/kern/kern_lock.c:165 doopenat(ffff8000fffe8d18,ffffff9c,200000000200,200,0,ffff8000327e6230) at doopenat+0x345 sys/kern/vfs_syscalls.c:1138 syscall(ffff8000327e62e0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff8000327e62e0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x246194d7940, count: -7 ddb{0}> machine ddbcpu 1 Stopped at sys_semop+0x3d5: movzwl 0(%rax),%r15d ddb{1}> trace sys_semop(ffff8000fffe8a80,ffff80003c438150,ffff80003c4380a0) at sys_semop+0x3d5 sys/kern/sysv_sem.c:617 syscall(ffff80003c438150) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c438150) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c494324a90, count: -3