syzbot


panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (4)

Status: fixed on 2022/03/22 10:24
Reported-by: syzbot+7596cb96fb9f3c9d6f4f@syzkaller.appspotmail.com
Fix commit: 63abc0ec39b5 For multicast and broadcast packets udp_input() traverses the loop of all UDP PCBs. From there it calls udp_sbappend() while holding the UDP table mutex. This ends in sorwakeup() where we finally grab the kernel lock while holding a mutex. Witness detects this misuse. Use the same solution as for PCB notify. Collect the affected PCBs in a temporary list. The list is protected by exclusive net lock. Reported-by: syzbot+7596cb96fb9f3c9d6f4f@syzkaller.appspotmail.com OK sashan@
First crash: 995d, last: 994d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (5) C 104 993d never 3/3 fixed on 2022/03/22 22:28
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (3) C 2 1192d 1195d 3/3 fixed on 2021/09/07 20:47
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock 33 1932d 1936d 3/3 fixed on 2019/08/27 19:45
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (2) C 152 1196d 1917d 3/3 fixed on 2021/09/01 16:54
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (8) C 175 207d 221d 0/3 auto-obsoleted due to no activity on 2024/08/09 07:23
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (6) C 80 993d 993d 3/3 fixed on 2022/03/24 08:53
openbsd panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock (7) syz 9 710d 725d 3/3 fixed on 2023/01/12 22:01

Sample crash report:
login: panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*470996  89265      0           0          0    1  syz-executor3271425245
   4946  47649      0           0          0    0  syz-executor3271425245
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440
panic(ffffffff825a0385) at panic+0x177 sys/kern/subr_prf.c:202
witness_checkorder(ffffffff82b7e900,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
selwakeup(fffffd806d3226d8) at selwakeup+0x16 klist_empty sys/sys/event.h:361 [inline]
selwakeup(fffffd806d3226d8) at selwakeup+0x16 sys/kern/sys_generic.c:885
sorwakeup(fffffd806d3225c0) at sorwakeup+0xc9 sys/kern/uipc_socket.c:1699
rip6_input(ffff800021203c88,ffff800021203c94,85,18) at rip6_input+0x692 sys/netinet6/raw_ip6.c:224
ip_deliver(ffff800021203c88,ffff800021203c94,85,18) at ip_deliver+0x322 sys/netinet/ip_input.c:657
ip6_input_if(ffff800021203c88,ffff800021203c94,29,0,ffff80000019f2a8) at ip6_input_if+0x920
ipv6_input(ffff80000019f2a8,fffffd806d29a200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:169
if_input_local(ffff80000019f2a8,fffffd806d29a200,18) at if_input_local+0x136 sys/net/if.c:778
ip6_output(fffffd806d356a00,ffff800000bc6200,fffffd806f67b900,0,0,fffffd806f67b888) at ip6_output+0xf57
rip6_output(fffffd806d356a00,fffffd806d322200,ffff800021203ff0,0) at rip6_output+0x4ad sys/netinet6/raw_ip6.c:490
rip6_usrreq(fffffd806d322200,9,fffffd806d356a00,0,0,ffff80002115fa40) at rip6_usrreq+0x5d3 sys/netinet6/raw_ip6.c:679
end trace frame: 0xffff800021204170, count: 0
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: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440
panic(ffffffff825a0385) at panic+0x177 sys/kern/subr_prf.c:202
witness_checkorder(ffffffff82b7e900,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
selwakeup(fffffd806d3226d8) at selwakeup+0x16 klist_empty sys/sys/event.h:361 [inline]
selwakeup(fffffd806d3226d8) at selwakeup+0x16 sys/kern/sys_generic.c:885
sorwakeup(fffffd806d3225c0) at sorwakeup+0xc9 sys/kern/uipc_socket.c:1699
rip6_input(ffff800021203c88,ffff800021203c94,85,18) at rip6_input+0x692 sys/netinet6/raw_ip6.c:224
ip_deliver(ffff800021203c88,ffff800021203c94,85,18) at ip_deliver+0x322 sys/netinet/ip_input.c:657
ip6_input_if(ffff800021203c88,ffff800021203c94,29,0,ffff80000019f2a8) at ip6_input_if+0x920
ipv6_input(ffff80000019f2a8,fffffd806d29a200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:169
if_input_local(ffff80000019f2a8,fffffd806d29a200,18) at if_input_local+0x136 sys/net/if.c:778
ip6_output(fffffd806d356a00,ffff800000bc6200,fffffd806f67b900,0,0,fffffd806f67b888) at ip6_output+0xf57
rip6_output(fffffd806d356a00,fffffd806d322200,ffff800021203ff0,0) at rip6_output+0x4ad sys/netinet6/raw_ip6.c:490
rip6_usrreq(fffffd806d322200,9,fffffd806d356a00,0,0,ffff80002115fa40) at rip6_usrreq+0x5d3 sys/netinet6/raw_ip6.c:679
sosend(fffffd806d322200,0,ffff800021204228,0,0,0) at sosend+0x632 sys/kern/uipc_socket.c:582
dofilewritev(ffff80002115fa40,4,ffff800021204228,0,ffff800021204320) at dofilewritev+0x19c sys/kern/sys_generic.c:381
sys_write(ffff80002115fa40,ffff8000212042c8,ffff800021204320) at sys_write+0x83 sys/kern/sys_generic.c:301
syscall(ffff800021204390) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021204390) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffc0ef0, count: -19
ddb{1}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff8000212037a0
rbx               0xffff800020ce9bff
rdx                            0x3fd
rcx                                0
rax                             0x68
r8                 0x101010101010101
r9                0x8080808080808080
r10               0x7beb66679ac2adab
r11               0x80e3a55354da103c
r12               0xffff800020ce9a00
r13                                0
r14                                0
r15                              0x1
rip               0xffffffff81828e88    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800021203790
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor3271425245) pid=470996 stat=onproc
    flags process=0 proc=0
    pri=4, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff80002115fce0,0xffff80002115f7b0
    process=0xffff8000ffffa570 user=0xffff8000211ff000, vmspace=0xfffffd806d553e70
    estcpu=0, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
  2119  340300  98653      0  2           0                syz-executor3271425245
 90848  422240  71733      0  2           0                syz-executor3271425245
 43227  139581  47649      0  2           0                syz-executor3271425245
 38629  358508  24500      0  3           0  netlock       syz-executor3271425245
 31330  140632    443      0  2           0                syz-executor3271425245
 28452  273076  49286      0  2           0                syz-executor3271425245
*89265  470996  15964      0  7           0                syz-executor3271425245
 71733  147071  49286      0  3        0x80  nanoslp       syz-executor3271425245
 98653  520960  49286      0  3        0x80  nanoslp       syz-executor3271425245
   443  179982  49286      0  3        0x80  nanoslp       syz-executor3271425245
 47649    4946  49286      0  7           0                syz-executor3271425245
 65176  329588  10170      0  2           0                syz-executor3271425245
 24500  377022  49286      0  3        0x80  nanoslp       syz-executor3271425245
 15964  209198  49286      0  3        0x80  nanoslp       syz-executor3271425245
 10170  108934  49286      0  3        0x80  nanoslp       syz-executor3271425245
 49286  384835  25534      0  2         0x2                syz-executor3271425245
 25534   63382  78883      0  3    0x10008a  sigsusp       ksh
 78883  452007  85985      0  2        0x12                sshd
 10103  412396      1      0  3    0x100083  ttyin         getty
 85985   77092      1      0  3        0x88  kqread        sshd
 51130  135263  26245     74  3   0x1100092  bpf           pflogd
 26245  282268      1      0  3        0x80  netio         pflogd
 88638   79127  64093     73  3   0x1100090  kqread        syslogd
 64093  279571      1      0  3    0x100082  netio         syslogd
 62827  233001      1      0  3    0x100080  kqread        resolvd
 83842  380355  80994     77  3    0x100092  kqread        dhcpleased
 78606  356584  80994     77  3    0x100092  kqread        dhcpleased
 80994  270038      1      0  3        0x80  kqread        dhcpleased
 29927  464633      0      0  3     0x14200  bored         smr
 50706  518132      0      0  2     0x14200                zerothread
  1749  337510      0      0  3     0x14200  aiodoned      aiodoned
 94532  262275      0      0  3     0x14200  syncer        update
 69886  179742      0      0  3     0x14200  cleaner       cleaner
 62066   14955      0      0  3     0x14200  reaper        reaper
 24447  518225      0      0  3     0x14200  pgdaemon      pagedaemon
  5213  502891      0      0  3     0x14200  bored         viomb
 47411  500058      0      0  3  0x40014200  acpi0         acpi0
  9490  282364      0      0  3  0x40014200                idle1
 42040  277422      0      0  3     0x14200  bored         softnet
  9715   26061      0      0  3     0x14200  bored         systqmp
 81258  477604      0      0  3     0x14200  bored         systq
 85526   17715      0      0  3  0x40014200  bored         softclock
 65091  163113      0      0  3  0x40014200                idle0
     1  100975      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
CPU 1:
exclusive mutex &table->inpt_mtx r = 0 (0xffffffff82b7fb80)
#0  witness_lock+0x44d
#1  mtx_enter_try+0x100
#2  mtx_enter+0x4b sys/kern/kern_lock.c:266
#3  rip6_input+0x1cf
#4  ip_deliver+0x322 sys/netinet/ip_input.c:657
#5  ip6_input_if+0x920
#6  ipv6_input+0x48 sys/netinet6/ip6_input.c:169
#7  if_input_local+0x136 sys/net/if.c:778
#8  ip6_output+0xf57
#9  rip6_output+0x4ad sys/netinet6/raw_ip6.c:490
#10 rip6_usrreq+0x5d3 sys/netinet6/raw_ip6.c:679
#11 sosend+0x632 sys/kern/uipc_socket.c:582
#12 dofilewritev+0x19c sys/kern/sys_generic.c:381
#13 sys_write+0x83 sys/kern/sys_generic.c:301
#14 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#14 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#15 Xsyscall+0x128
Process 89265 (syz-executor3271425245) thread 0xffff80002115fa40 (470996)
exclusive rwlock netlock r = 0 (0xffffffff82980490)
#0  witness_lock+0x44d
#1  solock+0x86 sys/kern/uipc_socket2.c:295
#2  sosend+0x517 sys/kern/uipc_socket.c:570
#3  dofilewritev+0x19c sys/kern/sys_generic.c:381
#4  sys_write+0x83 sys/kern/sys_generic.c:301
#5  syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#5  syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#6  Xsyscall+0x128
exclusive mutex &table->inpt_mtx r = 0 (0xffffffff82b7fb80)
#0  witness_lock+0x44d
#1  mtx_enter_try+0x100
#2  mtx_enter+0x4b sys/kern/kern_lock.c:266
#3  rip6_input+0x1cf
#4  ip_deliver+0x322 sys/netinet/ip_input.c:657
#5  ip6_input_if+0x920
#6  ipv6_input+0x48 sys/netinet6/ip6_input.c:169
#7  if_input_local+0x136 sys/net/if.c:778
#8  ip6_output+0xf57
#9  rip6_output+0x4ad sys/netinet6/raw_ip6.c:490
#10 rip6_usrreq+0x5d3 sys/netinet6/raw_ip6.c:679
#11 sosend+0x632 sys/kern/uipc_socket.c:582
#12 dofilewritev+0x19c sys/kern/sys_generic.c:381
#13 sys_write+0x83 sys/kern/sys_generic.c:301
#14 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#14 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#15 Xsyscall+0x128
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf 10149   6454K    6455K  78643K     11239        0
            pcb    17      8K       8K  78643K        21        0
         rtable    62      2K       2K  78643K       112        0
         ifaddr    29      8K       8K  78643K        32        0
       counters    40     33K      33K  78643K        40        0
       ioctlops     0      0K       4K  78643K      1479        0
          mount     1      1K       1K  78643K         1        0
            log     0      0K       0K  78643K         5        0
         vnodes  1167     73K      73K  78643K      1180        0
      UFS quota     1     32K      32K  78643K         1        0
      UFS mount     5     36K      36K  78643K         5        0
            shm     2      1K       1K  78643K         2        0
         VM map     2      1K       1K  78643K         2        0
            sem     2      0K       0K  78643K         2        0
        dirhash    12      2K       2K  78643K        12        0
           ACPI  1697    195K     286K  78643K     12548        0
      file desc     1      0K       0K  78643K         1        0
           proc    67     87K      87K  78643K       282        0
    NFS srvsock     1      0K       0K  78643K         1        0
     NFS daemon     1     16K      16K  78643K         1        0
    ip_moptions     2      0K       0K  78643K         2        0
       in_multi    14      0K       0K  78643K        14        0
    ether_multi     2      0K       0K  78643K         2        0
    ISOFS mount     1     32K      32K  78643K         1        0
  MSDOSFS mount     1     16K      16K  78643K         1        0
           ttys    25    122K     122K  78643K        25        0
           exec     0      0K       2K  78643K       432        0
            tdb     3      0K       0K  78643K         3        0
        pagedep     1      8K       8K  78643K         1        0
       inodedep     1     32K      32K  78643K         1        0
         newblk     1      0K       0K  78643K         1        0
        VM swap     7     26K      26K  78643K         7        0
       UVM amap   114     60K      60K  78643K      2207        0
       UVM aobj     3      2K       2K  78643K         3        0
        memdesc     1      4K       4K  78643K         1        0
    crypto data     1      1K       1K  78643K         1        0
    ip6_options     4      0K       0K  78643K         4        0
            NDP     4      0K       0K  78643K         4        0
           temp    24   4694K    4757K  78643K      3327        0
         kqueue    11     16K      18K  78643K        24        0
      SYN cache     2     16K      16K  78643K         2        0
ddb{1}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache    128       22    0        0     1     0     1     1     0     8    0
rtpcb      120       17    0       14     1     0     1     1     0     8    0
rtentry    112       23    0        1     1     0     1     1     0     8    0
unpcb      136       35    0       20     1     0     1     1     0     8    0
syncache   296        5    0        5     2     1     1     1     0     8    1
tcpcb      736       10    0        5     1     0     1     1     0     8    0
arp        120        2    0        0     1     0     1     1     0     8    0
inpcb      312       38    0       28     1     0     1     1     0     8    0
pfosfp      40     1428    0     1005     5     0     5     5     0     8    0
pfosfpen   112     1428    0      714    21     0    21    21     0     8    0
pfstitem    24        9    0        0     1     0     1     1     0     8    0
pfstkey    112        9    0        0     1     0     1     1     0     8    0
pfstate    320        9    0        0     1     0     1     1     0     8    0
pfrule     1360      21    0       16     2     1     1     2     0     8    0
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256       96    0        0     6     0     6     6     0     8    0
art_table   32       97    0        0     1     0     1     1     0     8    0
art_node    16       22    0        2     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino2pl    256     1424    0       39    87     0    87    87     0     8    0
ffsino     272     1424    0       39    93     0    93    93     0     8    0
nchpl      144     1599    0       49    58     0    58    58     0     8    0
uvmvnodes   80     1434    0        0    30     0    30    30     0     8    0
vnodes     224     1434    0        0    85     0    85    85     0     8    0
namei      1024    4422    0     4422     2     1     1     1     0     8    1
percpumem   16       32    0        0     1     0     1     1     0     8    0
scxspl     216     4028    0     4028    10     2     8     8     0     8    8
plimitpl   152       23    0        9     1     0     1     1     0     8    0
sigapl     424      335    0      291     5     0     5     5     0     8    0
knotepl    120       50    0        0     2     0     2     2     0     8    0
kqueuepl   216       20    0       13     1     0     1     1     0     8    0
pipepl     336       86    0       83     2     1     1     1     0     8    0
fdescpl    496      321    0      291     4     0     4     4     0     8    0
filepl     152     1151    0     1089     3     0     3     3     0     8    0
lockfpl    104        6    0        4     1     0     1     1     0     8    0
lockfspl    48        4    0        2     1     0     1     1     0     8    0
sessionpl  144       25    0        9     1     0     1     1     0     8    0
pgrppl      48       25    0        9     1     0     1     1     0     8    0
ucredpl     96       69    0       57     1     0     1     1     0     8    0
zombiepl   144      291    0      291     2     1     1     1     0     8    1
processpl  1064     335    0      291     3     0     3     3     0     8    0
procpl     672      335    0      291     4     0     4     4     0     8    0
sockpl     480       90    0       62     5     1     4     4     0     8    0
mcl8k      8192       6    0        0     1     0     1     1     0     8    0
mcl4k      4096       2    0        0     1     0     1     1     0     8    0
mcl2k      2048      69    0        0     8     0     8     8     0     8    0
mtagpl      96        3    0        0     1     0     1     1     0     8    0
mbufpl     256      117    0        0     7     0     7     7     0     8    0
bufpl      288     2017    0       93   138     0   138   138     0     8    0
anonpl      24    41623    0    39049    20     3    17    17     0   186    1
amapchunkpl 152    4009    0     3834     7     0     7     7     0   158    0
amappl16   200       32    0       30     2     1     1     1     0     8    0
amappl15   192       67    0       64     1     0     1     1     0     8    0
amappl13   176       34    0       33     2     1     1     1     0     8    0
amappl12   168       12    0       12     2     1     1     1     0     8    1
amappl11   160       49    0       35     1     0     1     1     0     8    0
amappl10   152        2    0        0     1     0     1     1     0     8    0
amappl9    144      457    0      455     1     0     1     1     0     8    0
amappl8    136      371    0      367     1     0     1     1     0     8    0
amappl7    128       65    0       62     1     0     1     1     0     8    0
amappl6    120      135    0      106     1     0     1     1     0     8    0
amappl5    112      178    0      166     1     0     1     1     0     8    0
amappl4    104      642    0      619     1     0     1     1     0     8    0
amappl3     96      121    0      112     1     0     1     1     0     8    0
amappl2     88      369    0      331     1     0     1     1     0     8    0
amappl1     80     8794    0     8373    11     2     9     9     0     8    0
amappl      88     1918    0     1829     2     0     2     2     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        2    0        0     1     0     1     1     0     8    0
uaddrrnd    24      321    0      291     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      321    0      291     1     0     1     1     0     8    0
vmmpekpl   168     6239    0     6222     1     0     1     1     0     8    0
vmmpepl    168    26805    0    25693    56     7    49    49     0   357    0
vmsppl     368      320    0      291     3     0     3     3     0     8    0
rwobjpl     56     9525    0     7519    29     0    29    29     0     8    0
pdppl      4096     649    0      582    85    18    67    67     0     8    0
pvpl        32   135490    0   130813    45     6    39    39     0   265    1
pmappl     248      320    0      291     2     0     2     2     0     8    0
extentpl    40       58    0       38     1     0     1     1     0     8    0
phpool     112      444    0       23    13     0    13    13     0     8    0
ddb{1}> machine ddbcpu 0
Stopped at      x86_ipi_db+0x1a:        addq    $0x8,%rsp
x86_ipi_db(ffffffff82948ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x129 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88
Xsoftclock() at Xsoftclock+0x1f
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x122 sys/kern/kern_lock.c:147
syscall(ffff8000211ec4b0) at syscall+0x3ef mi_syscall sys/sys/syscall_mi.h:93 [inline]
syscall(ffff8000211ec4b0) at syscall+0x3ef sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffc0ef0, count: 6
ddb{0}> trace
x86_ipi_db(ffffffff82948ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x129 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88
Xsoftclock() at Xsoftclock+0x1f
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0x122 sys/kern/kern_lock.c:147
syscall(ffff8000211ec4b0) at syscall+0x3ef mi_syscall sys/sys/syscall_mi.h:93 [inline]
syscall(ffff8000211ec4b0) at syscall+0x3ef sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffc0ef0, count: -9
ddb{0}> machine ddbcpu 1
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440
panic(ffffffff825a0385) at panic+0x177 sys/kern/subr_prf.c:202
witness_checkorder(ffffffff82b7e900,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
selwakeup(fffffd806d3226d8) at selwakeup+0x16 klist_empty sys/sys/event.h:361 [inline]
selwakeup(fffffd806d3226d8) at selwakeup+0x16 sys/kern/sys_generic.c:885
sorwakeup(fffffd806d3225c0) at sorwakeup+0xc9 sys/kern/uipc_socket.c:1699
rip6_input(ffff800021203c88,ffff800021203c94,85,18) at rip6_input+0x692 sys/netinet6/raw_ip6.c:224
ip_deliver(ffff800021203c88,ffff800021203c94,85,18) at ip_deliver+0x322 sys/netinet/ip_input.c:657
ip6_input_if(ffff800021203c88,ffff800021203c94,29,0,ffff80000019f2a8) at ip6_input_if+0x920
ipv6_input(ffff80000019f2a8,fffffd806d29a200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:169
if_input_local(ffff80000019f2a8,fffffd806d29a200,18) at if_input_local+0x136 sys/net/if.c:778
ip6_output(fffffd806d356a00,ffff800000bc6200,fffffd806f67b900,0,0,fffffd806f67b888) at ip6_output+0xf57
rip6_output(fffffd806d356a00,fffffd806d322200,ffff800021203ff0,0) at rip6_output+0x4ad sys/netinet6/raw_ip6.c:490
rip6_usrreq(fffffd806d322200,9,fffffd806d356a00,0,0,ffff80002115fa40) at rip6_usrreq+0x5d3 sys/netinet6/raw_ip6.c:679
end trace frame: 0xffff800021204170, count: 0
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440
panic(ffffffff825a0385) at panic+0x177 sys/kern/subr_prf.c:202
witness_checkorder(ffffffff82b7e900,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b7e6f8) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
selwakeup(fffffd806d3226d8) at selwakeup+0x16 klist_empty sys/sys/event.h:361 [inline]
selwakeup(fffffd806d3226d8) at selwakeup+0x16 sys/kern/sys_generic.c:885
sorwakeup(fffffd806d3225c0) at sorwakeup+0xc9 sys/kern/uipc_socket.c:1699
rip6_input(ffff800021203c88,ffff800021203c94,85,18) at rip6_input+0x692 sys/netinet6/raw_ip6.c:224
ip_deliver(ffff800021203c88,ffff800021203c94,85,18) at ip_deliver+0x322 sys/netinet/ip_input.c:657
ip6_input_if(ffff800021203c88,ffff800021203c94,29,0,ffff80000019f2a8) at ip6_input_if+0x920
ipv6_input(ffff80000019f2a8,fffffd806d29a200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:169
if_input_local(ffff80000019f2a8,fffffd806d29a200,18) at if_input_local+0x136 sys/net/if.c:778
ip6_output(fffffd806d356a00,ffff800000bc6200,fffffd806f67b900,0,0,fffffd806f67b888) at ip6_output+0xf57
rip6_output(fffffd806d356a00,fffffd806d322200,ffff800021203ff0,0) at rip6_output+0x4ad sys/netinet6/raw_ip6.c:490
rip6_usrreq(fffffd806d322200,9,fffffd806d356a00,0,0,ffff80002115fa40) at rip6_usrreq+0x5d3 sys/netinet6/raw_ip6.c:679
sosend(fffffd806d322200,0,ffff800021204228,0,0,0) at sosend+0x632 sys/kern/uipc_socket.c:582
dofilewritev(ffff80002115fa40,4,ffff800021204228,0,ffff800021204320) at dofilewritev+0x19c sys/kern/sys_generic.c:381
sys_write(ffff80002115fa40,ffff8000212042c8,ffff800021204320) at sys_write+0x83 sys/kern/sys_generic.c:301
syscall(ffff800021204390) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021204390) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffc0ef0, count: -19
ddb{1}> 

Crashes (249):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/22 09:53 openbsd 6be6ed882de0 e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 09:22 openbsd 6be6ed882de0 e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 09:07 openbsd 6be6ed882de0 e2d91b1d .config console log report syz C ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 06:18 openbsd 6be6ed882de0 e2d91b1d .config console log report syz C ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 05:41 openbsd 6be6ed882de0 e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 01:31 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 01:27 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 00:55 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 22:40 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 21:48 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 17:28 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:21 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:08 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:06 openbsd 4ff57d1d979c e2d91b1d .config console log report syz C ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 08:55 openbsd 6be6ed882de0 e2d91b1d .config console log report syz ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 00:25 openbsd 4ff57d1d979c e2d91b1d .config console log report syz ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 09:33 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 08:02 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 07:21 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 05:50 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 05:23 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 04:16 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 03:19 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 02:16 openbsd 6be6ed882de0 e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/22 00:54 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 23:38 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 22:27 openbsd 627096b67f0b e2d91b1d .config console log report ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 21:30 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 19:46 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 18:39 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 17:35 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 16:51 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 15:16 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:08 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:06 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:05 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:04 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:04 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:04 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:03 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:03 openbsd 627096b67f0b e2d91b1d .config console log report ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:02 openbsd 627096b67f0b e2d91b1d .config console log report ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:02 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:00 openbsd 627096b67f0b e2d91b1d .config console log report ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 14:00 openbsd 627096b67f0b e2d91b1d .config console log report ci-openbsd-setuid panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:59 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:56 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:52 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:49 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:46 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:46 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:37 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:37 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:34 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:34 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:33 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 13:30 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
2022/03/21 12:32 openbsd 4ff57d1d979c e2d91b1d .config console log report ci-openbsd-multicore panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
* Struck through repros no longer work on HEAD.