syzbot


panic: thread ADDR cannot exit while holding sleeplocks

Status: closed as dup on 2019/01/28 21:07
Reported-by: syzbot+9741c10a67585740328c@syzkaller.appspotmail.com
First crash: 2125d, last: 1953d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
witness: thread exiting with locks held syz 679 1914d 2124d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
panic: Thread ADDR cannot exit while holding sleeplocks syz 84 2125d 2129d 0/3 closed as dup on 2019/01/28 08:50

Sample crash report:
panic: thread 0xffff800020b759d0 cannot exit while holding sleeplocks
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
 346893  84386     73    0x100010          0    1  syslogd
*522596  77371      0     0x14000      0x200    0  reaper
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
witness_thread_exit(e5f8091e053da05c) at witness_thread_exit+0x244 sys/kern/subr_witness.c:1377
reaper(0) at reaper+0x14f sys/kern/kern_exit.c:412
end trace frame: 0x0, count: 11
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
thread 0xffff800020b759d0 cannot exit while holding sleeplocks
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
witness_thread_exit(e5f8091e053da05c) at witness_thread_exit+0x244 sys/kern/subr_witness.c:1377
reaper(0) at reaper+0x14f sys/kern/kern_exit.c:412
end trace frame: 0x0, count: -4
ddb{0}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff800020b67c60
rbx               0xffff800020b67d00
rdx               0xffffffff81ec88ae    cmd0646_9_tim_udma+0x18cbf
rcx                            0x201
rax                              0x1
r8                0xffffffff81aa9b64    kprintf+0x174
r9                               0x1
r10               0xbf778cca3a7ab8a8
r11               0x50911d88dae8b4f5
r12                     0x3000000008
r13               0xffff800020b67c70
r14                            0x100
r15                              0x1
rip               0xffffffff819d4fa8    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020b67c50
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{0}> show proc
PROC (reaper) pid=522596 stat=onproc
    flags process=14000<NOZOMBIE,SYSTEM> proc=200<SYSTEM>
    pri=4, usrpri=51, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b21068,0xffff800020b21c30
    process=0xffff800020b5a698 user=0xffff800020b62000, vmspace=0xffffffff822dc6f0
    estcpu=1, cpticks=3, pctcpu=0.3
    user=0, sys=3, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 27461   70570  42669      0  2       0x482                syz-executor0
 42669  346025  46585      0  3        0x82  thrsleep      syz-execprog
 42669  276252  46585      0  3   0x4000082  thrsleep      syz-execprog
 42669  435798  46585      0  3   0x4000082  thrsleep      syz-execprog
 42669  332551  46585      0  3   0x4000082  thrsleep      syz-execprog
 42669  437179  46585      0  3   0x4000082  thrsleep      syz-execprog
 42669  498371  46585      0  3   0x4000082  thrsleep      syz-execprog
 42669  118956  46585      0  3   0x4000082  thrsleep      syz-execprog
 42669    8352  46585      0  3   0x4000082  kqread        syz-execprog
 42669  251700  46585      0  3   0x4000082  thrsleep      syz-execprog
 46585  266924  83373      0  3    0x10008a  pause         ksh
 83373  315645  64076      0  3        0x92  select        sshd
 70483  129533      1      0  3    0x100083  ttyin         getty
 64076  340238      1      0  3        0x80  select        sshd
 84386  346893  91604     73  7    0x100010                syslogd
 91604  509982      1      0  3    0x100082  netio         syslogd
 43692   49539      1     77  3    0x100090  poll          dhclient
  9217  332811      1      0  3        0x80  poll          dhclient
 12573  199396      0      0  3     0x14200  pgzero        zerothread
 50204  378933      0      0  3     0x14200  aiodoned      aiodoned
 89383  168651      0      0  3     0x14200  syncer        update
 22487  116197      0      0  3     0x14200  cleaner       cleaner
*77371  522596      0      0  7     0x14200                reaper
 81706  375142      0      0  3     0x14200  pgdaemon      pagedaemon
 12748  258197      0      0  3     0x14200  bored         crynlk
 38754   89253      0      0  3     0x14200  bored         crypto
 69424  310246      0      0  3  0x40014200  acpi0         acpi0
 48536   48143      0      0  3  0x40014200                idle1
  8304   22015      0      0  3     0x14200  bored         softnet
 47265  430164      0      0  3     0x14200  bored         systqmp
 99193  417296      0      0  3     0x14200  bored         systq
 30538  177099      0      0  3  0x40014200  bored         softclock
 34091  167531      0      0  3  0x40014200                idle0
     1  233531      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
Process 84386 (syslogd) thread 0xffff800020be5780 (346893)
exclusive rrwlock inode r = 0 (0xfffffd806eb9a098) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9449   6318K    6318K  78643K     10536        0        0
            pcb    23      9K       9K  78643K        55        0        0
         rtable    79      2K       2K  78643K       141        0        0
         ifaddr    28      8K       8K  78643K        28        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       2K  78643K        14        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1166     73K      73K  78643K      1174        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

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/01/28 20:13 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-setuid
2019/01/28 17:06 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-setuid
2019/01/28 15:59 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-multicore
2019/01/28 15:28 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-setuid
2019/01/28 14:19 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-setuid
2019/01/28 14:05 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-multicore
2019/01/28 12:51 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-multicore
2019/01/28 12:30 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-setuid
2019/01/28 10:57 openbsd c41c16f02568 1602ad52 .config console log report syz ci-openbsd-setuid
2019/07/19 11:18 openbsd 966bc0c5a553 8304907d .config console log report ci-openbsd-multicore
2019/02/25 19:57 openbsd f727f040295e a70141bf .config console log report ci-openbsd-multicore
2019/01/28 20:26 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 19:41 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 16:45 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 15:41 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-multicore
2019/01/28 15:28 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-multicore
2019/01/28 14:54 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 13:56 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 13:45 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-multicore
2019/01/28 12:19 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-multicore
2019/01/28 12:08 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 10:22 openbsd c41c16f02568 1602ad52 .config console log report ci-openbsd-setuid
2019/01/28 08:42 openbsd 6bb631ead20c c73f090a .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.