syzbot


panic: amap_add: slot in use

Status: auto-closed as invalid on 2019/08/01 03:05
Reported-by: syzbot+13a6bccfba3be2221de1@syzkaller.appspotmail.com
First crash: 2124d, last: 2119d

Sample crash report:
login: panic: amap_add: slot in use
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
 205601   6471      0           0          0    1  syz-executor1
*205861   6471      0           0  0x4000000    0K syz-executor1
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
amap_add(5a483116904d9159,fffffd807b937b40,fffffd8007496c60,ffff800020c950a8) at amap_add+0x1a6 sys/uvm/uvm_amap.c:1120
uvm_fault(6138c41a5cd3e1b7,ffff800020b93788,0,ffffffff81c0b080) at uvm_fault+0x1986 sys/uvm/uvm_fault.c:1194
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(c40b535ab089edf7) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,4,2,0,fffffd8067660ad0,ffff800020b93788) at alltraps_kern+0x7b
copyin(a3631a9d4003a848,0,ffff800020b93788,d6012527758,0,760) at copyin+0x56
syscall(2fc432059b12c8a1) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline]
syscall(2fc432059b12c8a1) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,ffffffffffffff43,0,5,d5e0f7fa1a0) at Xsyscall+0x128
end of kernel
end trace frame: 0xd60125277e0, count: 5
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}> show panic
amap_add: slot in use
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
amap_add(5a483116904d9159,fffffd807b937b40,fffffd8007496c60,ffff800020c950a8) at amap_add+0x1a6 sys/uvm/uvm_amap.c:1120
uvm_fault(6138c41a5cd3e1b7,ffff800020b93788,0,ffffffff81c0b080) at uvm_fault+0x1986 sys/uvm/uvm_fault.c:1194
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(c40b535ab089edf7) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,4,2,0,fffffd8067660ad0,ffff800020b93788) at alltraps_kern+0x7b
copyin(a3631a9d4003a848,0,ffff800020b93788,d6012527758,0,760) at copyin+0x56
syscall(2fc432059b12c8a1) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline]
syscall(2fc432059b12c8a1) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,ffffffffffffff43,0,5,d5e0f7fa1a0) at Xsyscall+0x128
end of kernel
end trace frame: 0xd60125277e0, count: -10
ddb{0}> show registers
rdi               0xffffffff8135b537    db_enter+0x17
rsi                           0x12e8    __ALIGN_SIZE+0x2e8
rbp               0xffff800020c94f00
rbx               0xffff800020c94fa0
rdx                           0x12e9    __ALIGN_SIZE+0x2e9
rcx               0xffff800002f4a000
rax               0xffff800002f4a000
r8                0xffffffff81b488b4    kprintf+0x174
r9                               0x1
r10               0x19fff0ab494856f0
r11               0xf765a344247cc5f4
r12                     0x3000000008
r13               0xffff800020c94f10
r14                            0x100
r15                              0x1
rip               0xffffffff8135b538    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020c94ef0
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor1) pid=205861 stat=onproc
    flags process=0 proc=4000000<THREAD>
    pri=4, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b939e0,0xffff800020b92730
    process=0xffff800020b95a50 user=0xffff800020c90000, vmspace=0xfffffd807f00db40
    estcpu=34, cpticks=1, pctcpu=0.0
    user=0, sys=0, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 86960  186504  64208      0  2           0                syz-executor0
  6471  205601  28147      0  7           0                syz-executor1
  6471  492003  28147      0  2   0x4000000                syz-executor1
  6471  315513  28147      0  2   0x4000000                syz-executor1
* 6471  205861  28147      0  7   0x4000000                syz-executor1
 66099  512093      0      0  3     0x14200  bored         sosplice
 28147  484845  16230      0  3        0x82  nanosleep     syz-executor1
 64208  153679  16230      0  2         0x2                syz-executor0
 16230  141770  48875      0  3        0x82  thrsleep      syz-fuzzer
 16230  212386  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  452970  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  190024  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  111020  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  179649  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  170477  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  238000  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 16230  227308  48875      0  3   0x4000082  kqread        syz-fuzzer
 16230  364276  48875      0  3   0x4000082  thrsleep      syz-fuzzer
 48875  488784  10229      0  3    0x10008a  pause         ksh
 10229  428857  79326      0  3        0x92  select        sshd
 11195  270608      1      0  3    0x100083  ttyin         getty
 79326  319354      1      0  3        0x80  select        sshd
 44189  301887  12475     73  3    0x100090  kqread        syslogd
 12475  222181      1      0  3    0x100082  netio         syslogd
 87814  460579      1     77  3    0x100090  poll          dhclient
 44785  135698      1      0  3        0x80  poll          dhclient
 27078  253598      0      0  3     0x14200  pgzero        zerothread
 51677  402240      0      0  3     0x14200  aiodoned      aiodoned
 13605  170487      0      0  3     0x14200  syncer        update
 66880  302175      0      0  3     0x14200  cleaner       cleaner
 78217  234118      0      0  3     0x14200  reaper        reaper
 11329  412078      0      0  3     0x14200  pgdaemon      pagedaemon
 45432   74622      0      0  3     0x14200  bored         crynlk
 27382  377755      0      0  3     0x14200  bored         crypto
  6324  322675      0      0  3  0x40014200  acpi0         acpi0
 37464  464229      0      0  3  0x40014200                idle1
 55255   67548      0      0  3     0x14200  bored         softnet
 90837  393279      0      0  3     0x14200  bored         systqmp
 75690  223915      0      0  3     0x14200  bored         systq
 60951  448131      0      0  3  0x40014200  bored         softclock
 44217  441380      0      0  3  0x40014200                idle0
     1  511343      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
Process 6471 (syz-executor1) thread 0xffff800020b93788 (205861)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff822d88a8) locked @ /syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:436
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9457   6328K    6331K  78643K     10565        0        0
            pcb    23      9K       9K  78643K        63        0        0
         rtable   100      3K       4K  78643K       188        0        0
         ifaddr    35     10K      10K  78643K        47        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       2K  78643K        15        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1197     75K      75K  78643K      1244        0        0
      UFS quota     1     32K      32K  78643K         1        0        0
      UFS mount     5     36K      36K  78643K         5        0        0
            shm     2      1K       5K  78643K         3        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem     2      0K       0K  78643K         2        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1792    194K     288K  78643K     12592        0        0
      file desc     6     17K      25K  78643K        65        0        0
           proc    41     38K      70K  78643K       250        0        0
        subproc    64  65538K   67586K  78643K        68        0        0
    NFS srvsock     1      0K       0K  78643K         1        0        0
     NFS daemon     1     16K      16K  78643K         1        0        0
    ip_moptions     0      0K       0K  78643K         9        0        0
       in_multi    33      2K       2K  78643K        40        0        0
    ether_multi     1      0K       0K  78643K         1        0        0
    ISOFS mount     1     32K      32K  78643K         1        0        0
  MSDOSFS mount     1     16K      16K  78643K         1        0        0
           ttys    42    185K     185K  78643K        42        0        0
           exec     0      0K       1K  78643K       166        0        0
        pagedep     1      8K       8K  78643K         1        0        0
       inodedep     1     32K      32K  78643K         1        0        0
         newblk     1      0K       0K  78643K         1        0        0
        VM swap     7     26K      26K  78643K         7        0        0
       UVM amap    80     20K      20K  78643K       918        0        0
       UVM aobj     6      2K       2K  78643K         6        0        0
        memdesc     1      4K       4K  78643K         1        0        0
    crypto data     1      1K       1K  78643K         1        0        0
            NDP     5      0K       0K  78643K        12        0        0
           temp    81   2352K    2420K  78643K      2867        0        0
      SYN cache     2     16K      16K  78643K         2        0        0
ddb{0}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp         64        4    0        0     1     0     1     1     0     8    0
inpcbpl    280       54    0       45     1     0     1     1     0     8    0
plimitpl   152       14    0        7     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112       41    0        1     2     0     2     2     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpcb      544       20    0       14     1     0     1     1     0     8    0
nd6         48        4    0        0     1     0     1     1     0     8    0
ppxss      1128       2    0        2     1     0     1     1     0     8    1
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256      185    0        0    12     0    12    12     0     8    0
art_table   32      186    0        0     2     0     2     2     0     8    0
art_node    16       40    0        6     1     0     1     1     0     8    0
shmpl      112        4    0        0     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     1499    0      115    45     0    45    45     0     8    0
ffsino     272     1499    0      115    93     0    93    93     0     8    0
nchpl      144     1767    0      183    59     0    59    59     0     8    0
uvmvnodes   72     1545    0        0    29     0    29    29     0     8    0
vnodes     200     1545    0        0    82     0    82    82     0     8    0
namei      1024    3997    0     3997     2     1     1     1     0     8    1
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     4173    0     4173     8     5     3     7     0     8    3
sigapl     432      232    0      218     2     0     2     2     0     8    0
futexpl     56      596    0      596     1     0     1     1     0     8    1
knotepl    112       82    0       55     2     0     2     2     0     8    1
kqueuepl   104       22    0       20     1     0     1     1     0     8    0
pipepl     112      170    0      151     3     1     2     2     0     8    1
fdescpl    488      233    0      218     3     0     3     3     0     8    1
filepl     152     1230    0     1132     6     1     5     5     0     8    1
lockfpl    104       18    0       18     2     1     1     1     0     8    1
lockfspl    32       26    0       26     2     1     1     1     0     8    1
sessionpl  112       17    0        7     1     0     1     1     0     8    0
pgrppl      48       17    0        7     1     0     1     1     0     8    0
ucredpl     96      146    0      139     1     0     1     1     0     8    0
zombiepl   144      218    0      218     2     1     1     1     0     8    1
processpl  840      248    0      218     4     0     4     4     0     8    0
procpl     600      357    0      315     4     0     4     4     0     8    0
sosppl     128        4    0        4     1     0     1     1     0     8    1
sockpl     384      102    0       83     3     0     3     3     0     8    1
mcl12k     12288      2    0        0     1     0     1     1     0     8    0
mcl4k      4096       2    0        0     1     0     1     1     0     8    0
mcl2k      2048     120    0        0    14     0    14    14     0     8    0
mtagpl      80        2    0        0     1     0     1     1     0     8    0
mbufpl     256      135    0        0     8     0     8     8     0     8    0
bufpl      256     5115    0      965   260     0   260   260     0     8    0
anonpl      16    28880    0    22141    29     1    28    28     0   125    0
amapchunkpl 152     982    0      891     6     0     6     6     0   158    2
amappl16   192      659    0      317    18     0    18    18     0     8    0
amappl15   184        1    0        0     1     0     1     1     0     8    0
amappl14   176       26    0       24     3     2     1     1     0     8    0
amappl13   168       19    0       16     1     0     1     1     0     8    0
amappl12   160       44    0       40     1     0     1     1     0     8    0
amappl11   152      187    0      177     1     0     1     1     0     8    0
amappl10   144       60    0       57     2     1     1     1     0     8    0
amappl9    136      342    0      340     1     0     1     1     0     8    0
amappl8    128      157    0      138     1     0     1     1     0     8    0
amappl7    120       34    0       28     1     0     1     1     0     8    0
amappl6    112       75    0       65     1     0     1     1     0     8    0
amappl5    104      116    0      106     1     0     1     1     0     8    0
amappl4     96      274    0      252     2     1     1     2     0     8    0
amappl3     88      127    0      120     1     0     1     1     0     8    0
amappl2     80     1052    0     1002     2     0     2     2     0     8    0
amappl1     72    13459    0    13032    24     9    15    19     0     8    5
amappl      72      566    0      531     1     0     1     1     0    75    0
dma4096    4096       1    0        1     1     1     0     1     0     8    0
dma256     256        6    0        6     1     1     0     1     0     8    0
dma64       64      259    0      259     1     1     0     1     0     8    0
dma32       32        7    0        7     1     1     0     1     0     8    0
dma16       16       17    0       17     1     1     0     1     0     8    0
aobjpl      64        5    0        0     1     0     1     1     0     8    0
uaddrrnd    24      233    0      218     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      233    0      218     1     0     1     1     0     8    0
vmmpekpl   168     5639    0     5616     2     0     2     2     0     8    0
vmmpepl    168    31236    0    29903    81    13    68    71     0   357   10
vmsppl     360      232    0      218     2     0     2     2     0     8    0
pdppl      4096     473    0      436     6     0     6     6     0     8    1
pvpl        32   109928    0   100234    98     6    92    95     0   265   13
pmappl     224      232    0      218     1     0     1     1     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      403    0        3    12     0    12    12     0     8    0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/02/02 03:04 openbsd d98374d3ab41 564f9a4f .config console log report ci-openbsd-multicore
2019/01/28 06:33 openbsd 6bb631ead20c c73f090a .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.