syzbot


panic: timeout_add: to_ticks (-2) < 0

Status: closed as dup on 2019/02/15 12:58
Reported-by: syzbot+bf34abd918a5f6738674@syzkaller.appspotmail.com
First crash: 2160d, last: 2160d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
panic: timeout_add: to_ticks (-ADDR) < 0 C 5 2160d 2160d

Sample crash report:
panic: timeout_add: to_ticks (-2) < 0
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*396598  47197      0         0x2          0    0K syz-executor0507
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x174 sys/kern/subr_prf.c:208
timeout_add(ffff80000066d060,fffffffe) at timeout_add+0x194 sys/kern/kern_timeout.c:190
pcppi_bell(ffff80000066d000,5,fffffffe,1) at pcppi_bell+0x2a0 sys/dev/isa/pcppi.c:234
spkrioctl(1b00,20005302,ffff800020bb3a60,2,ffff800020b952d0) at spkrioctl+0x230 tone sys/dev/isa/spkr.c:89 [inline]
spkrioctl(1b00,20005302,ffff800020bb3a60,2,ffff800020b952d0) at spkrioctl+0x230 sys/dev/isa/spkr.c:503
VOP_IOCTL(fffffd806dc7a710,20005302,ffff800020bb3a60,2,fffffd807f7c7a80,ffff800020b952d0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290
vn_ioctl(fffffd80703f0390,20005302,ffff800020bb3a60,ffff800020b952d0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512
sys_ioctl(ffff800020b952d0,ffff800020bb3ba8,ffff800020bb3b90) at sys_ioctl+0x646
syscall(ffff800020bb3c40) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline]
syscall(ffff800020bb3c40) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574
Xsyscall(6,0,7f7fffff63f8,0,1,7f7fffff6408) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7fffff6390, 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}> set $maxwidth = 0
ddb{0}> show panic
timeout_add: to_ticks (-2) < 0
ddb{0}> trace
db_enter() at db_enter+24
panic() at panic+372
timeout_add(ffff80000066d060,fffffffe) at timeout_add+404
pcppi_bell(ffff80000066d000,5,fffffffe,1) at pcppi_bell+672
spkrioctl(1b00,20005302,ffff800020bb3a60,2,ffff800020b952d0) at spkrioctl+560
VOP_IOCTL(fffffd806dc7a710,20005302,ffff800020bb3a60,2,fffffd807f7c7a80,ffff800020b952d0) at VOP_IOCTL+154
vn_ioctl(fffffd80703f0390,20005302,ffff800020bb3a60,ffff800020b952d0) at vn_ioctl+201
sys_ioctl(ffff800020b952d0,ffff800020bb3ba8,ffff800020bb3b90) at sys_ioctl+1606
syscall(ffff800020bb3c40) at syscall+1452
Xsyscall(6,0,7f7fffff63f8,0,1,7f7fffff6408) at Xsyscall+296
end of kernel
end trace frame: 0x7f7fffff6390, count: -10
ddb{0}> show registers
rdi                                0
rsi                                1
rbp             18446603336770336384
rbx             18446603336770336560
rdx             18446744071594909614    apollo_pio_rec+41672
rcx                              513
rax                                1
r8              18446744071580452035    kprintf+387
r9                                 1
r10             15970477839528242473
r11             12090729506193689815
r12                     206158430216
r13             18446603336770336400
r14                              256
r15                                1
rip             18446744071587636920    db_enter+24
cs                                 8
rflags                           582
rsp             18446603336770336368
ss                                16
db_enter+24:    addq    $8,%rsp
ddb{0}> show proc
PROC (syz-executor0507) pid=396598 stat=onproc
    flags process=2<EXEC> proc=0
    pri=51, usrpri=51, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b94010,0xffffffff8230d660
    process=0xffff800020b74018 user=0xffff800020bae000, vmspace=0xfffffd806e953878
    estcpu=1, cpticks=1, pctcpu=0.0
    user=0, sys=0, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*47197  396598  59337      0  7         0x2                syz-executor0507
 59337  235904  34022      0  3    0x10008a  pause         ksh
 34022  392147  21158      0  3        0x92  select        sshd
 32869  120863      1      0  3    0x100083  ttyin         getty
 21158  429647      1      0  3        0x80  select        sshd
 46731  367313    399     73  3    0x100090  kqread        syslogd
   399  175217      1      0  3    0x100082  netio         syslogd
 30576   33770      1     77  3    0x100090  poll          dhclient
 18670  188331      1      0  3        0x80  poll          dhclient
  7689  281094      0      0  3     0x14200  pgzero        zerothread
 73873  468641      0      0  3     0x14200  aiodoned      aiodoned
 24059  140560      0      0  3     0x14200  syncer        update
 24387   66851      0      0  3     0x14200  cleaner       cleaner
 31737  483449      0      0  3     0x14200  reaper        reaper
 67679  468932      0      0  3     0x14200  pgdaemon      pagedaemon
 94163  465036      0      0  3     0x14200  bored         crynlk
 44117  137922      0      0  3     0x14200  bored         crypto
 33139  294209      0      0  3  0x40014200  acpi0         acpi0
 42093    4684      0      0  7  0x40014200                idle1
 20069  338219      0      0  3     0x14200  bored         softnet
 63136  213915      0      0  3     0x14200  bored         systqmp
 56746  262109      0      0  3     0x14200  bored         systq
 82267   19005      0      0  3  0x40014200  bored         softclock
 71886  447761      0      0  3  0x40014200                idle0
     1  458651      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
Process 47197 (syz-executor0507) thread 0xffff800020b952d0 (396598)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823220c8) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90
#0  witness_lock+1418
#1  syscall+1151
#2  Xsyscall+296
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9443   6315K    6316K  78643K     10530        0        0
            pcb    23      9K       9K  78643K        55        0        0
         rtable    61      2K       2K  78643K       115        0        0
         ifaddr    21      7K       7K  78643K        21        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       2K  78643K        13        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1166     73K      73K  78643K      1172        0        0
      UFS quota     1     32K      32K  78643K         1        0        0
      UFS mount     5     36K      36K  78643K         5        0        0
            shm     2      1K       1K  78643K         2        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     1      0K       0K  78643K         1        0        0
           proc    40     38K      46K  78643K       207        0        0
    NFS srvsock     1      0K       0K  78643K         1        0        0
     NFS daemon     1     16K      16K  78643K         1        0        0
       in_multi    11      0K       0K  78643K        11        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    18     79K      79K  78643K        18        0        0
           exec     0      0K       1K  78643K       150        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    47      2K       3K  78643K       651        0        0
       UVM aobj     2      2K       2K  78643K         2        0        0
        memdesc     1      4K       4K  78643K         1        0        0
    crypto data     1      1K       1K  78643K         1        0        0
            NDP     3      0K       0K  78643K         3        0        0
           temp    30   2347K    2411K  78643K      1695        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        2    0        0     1     0     1     1     0     8    0
inpcbpl    280       22    0       16     1     0     1     1     0     8    0
plimitpl   152       13    0        8     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112       23    0        1     1     0     1     1     0     8    0
syncache   264        5    0        5     2     1     1     1     0     8    1
tcpcb      544        8    0        5     1     0     1     1     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
dino1pl    128     1383    0       18    45     0    45    45     0     8    0
ffsino     272     1383    0       18    92     0    92    92     0     8    0
nchpl      144     1555    0       30    57     0    57    57     0     8    0
uvmvnodes   72     1392    0        0    26     0    26    26     0     8    0
vnodes     200     1392    0        0    74     0    74    74     0     8    0
namei      1024    3262    0     3262     3     2     1     1     0     8    1
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     2353    0     2353     9     8     1     6     0     8    1
sigapl     432      174    0      164     2     0     2     2     0     8    0
knotepl    112        5    0        0     1     0     1     1     0     8    0
kqueuepl   104        1    0        0     1     0     1     1     0     8    0
pipepl     112      114    0      107     3     2     1     1     0     8    0
fdescpl    488      175    0      164     2     0     2     2     0     8    0
filepl     152      808    0      765     2     0     2     2     0     8    0
lockfpl    104        7    0        6     2     1     1     1     0     8    0
lockfspl    32        4    0        3     2     1     1     1     0     8    0
sessionpl  112       17    0        9     1     0     1     1     0     8    0
pgrppl      48       17    0        9     1     0     1     1     0     8    0
ucredpl     96       47    0       40     1     0     1     1     0     8    0
zombiepl   144      164    0      164     3     2     1     1     0     8    1
processpl  840      189    0      164     4     0     4     4     0     8    0
procpl     600      189    0      164     3     0     3     3     0     8    0
sockpl     384       64    0       48     2     0     2     2     0     8    0
mcl4k      4096       3    0        0     1     0     1     1     0     8    0
mcl2k      2048      80    0        0     9     0     9     9     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256       99    0        0     6     0     6     6     0     8    0
bufpl      256     1999    0      254   110     0   110   110     0     8    0
anonpl      16    16799    0    15712     6     1     5     6     0   125    0
amapchunkpl 152     487    0      452     2     0     2     2     0   158    0
amappl16   192       71    0       66     1     0     1     1     0     8    0
amappl15   184        1    0        0     1     0     1     1     0     8    0
amappl14   176        1    0        1     1     1     0     1     0     8    0
amappl13   168       16    0       13     1     0     1     1     0     8    0
amappl12   160        8    0        8     1     1     0     1     0     8    0
amappl11   152      175    0      166     1     0     1     1     0     8    0
amappl10   144       46    0       46     3     2     1     1     0     8    1
amappl9    136      135    0      133     1     0     1     1     0     8    0
amappl8    128      105    0       99     1     0     1     1     0     8    0
amappl7    120       29    0       25     1     0     1     1     0     8    0
amappl6    112       39    0       35     1     0     1     1     0     8    0
amappl5    104      285    0      273     1     0     1     1     0     8    0
amappl4     96      256    0      236     1     0     1     1     0     8    0
amappl3     88      112    0      107     1     0     1     1     0     8    0
amappl2     80      561    0      527     1     0     1     1     0     8    0
amappl1     72    11513    0    11126    15     5    10    15     0     8    0
amappl      72      365    0      346     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        1    0        0     1     0     1     1     0     8    0
uaddrrnd    24      175    0      164     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      175    0      164     1     0     1     1     0     8    0
vmmpekpl   168     5150    0     5132     1     0     1     1     0     8    0
vmmpepl    168    23647    0    22959    54    20    34    43     0   357    3
vmsppl     360      174    0      164     2     0     2     2     0     8    0
pdppl      4096     358    0      328     5     0     5     5     0     8    0
pvpl        32    69285    0    66586    37    11    26    26     0   265    1
pmappl     224      174    0      164     1     0     1     1     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      239    0        4     7     0     7     7     0     8    0
ddb{0}> 

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/02/15 11:55 openbsd 64a70754a42c f6f233c0 .config console log report syz C ci-openbsd-multicore
2019/02/15 18:07 openbsd 64a70754a42c f6f233c0 .config console log report ci-openbsd-multicore
2019/02/15 14:49 openbsd 64a70754a42c f6f233c0 .config console log report ci-openbsd-multicore
2019/02/15 11:36 openbsd 64a70754a42c f6f233c0 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.