kqueue: knote !ACTIVE

4 views
Skip to first unread message

syzbot

unread,
Jan 25, 2020, 1:30:09 PM1/25/20
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: f4b8a1e8 Disable cert interop tests for now.
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10254695e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=82141ebe4d06de0d3475

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+82141e...@syzkaller.appspotmail.com

panic: kqueue_scan:914: kq=0xfffffd806e8ee888 kn=0xfffffd806ebd9c40 knote !ACTIVE
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
405712 70323 0 0 0x4000000 0 syz-executor.0
*480274 70323 0 0 0x4000000 1K syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821c2b1a) at panic+0x15c sys/kern/subr_prf.c:207
kqueue_do_check(fffffd806e8ee888,ffffffff82212867,392) at kqueue_do_check+0x232 sys/kern/kern_event.c:622
kqueue_scan(fffffd806e8ee888,80,20000080,ffff800021bc4f30,ffff800020ac2288,ffff800021bc4f7c) at kqueue_scan+0x68c sys/kern/kern_event.c:915
sys_kevent(ffff800020ac2288,ffff800021bc4ff8,ffff800021bc5040) at sys_kevent+0x492 sys/kern/kern_event.c:604
syscall(ffff800021bc50c0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021bc50c0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x1a328a7a10, count: 8
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
kqueue_scan:914: kq=0xfffffd806e8ee888 kn=0xfffffd806ebd9c40 knote !ACTIVE
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821c2b1a) at panic+0x15c sys/kern/subr_prf.c:207
kqueue_do_check(fffffd806e8ee888,ffffffff82212867,392) at kqueue_do_check+0x232 sys/kern/kern_event.c:622
kqueue_scan(fffffd806e8ee888,80,20000080,ffff800021bc4f30,ffff800020ac2288,ffff800021bc4f7c) at kqueue_scan+0x68c sys/kern/kern_event.c:915
sys_kevent(ffff800020ac2288,ffff800021bc4ff8,ffff800021bc5040) at sys_kevent+0x492 sys/kern/kern_event.c:604
syscall(ffff800021bc50c0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021bc50c0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x1a328a7a10, count: -7
ddb{1}> show registers
rdi 0xffffffff82136d47 db_enter+0x17
rsi 0x26ff __ALIGN_SIZE+0x16ff
rbp 0xffff800021bc4a40
rbx 0xffff800021bc4af0
rdx 0x2700 __ALIGN_SIZE+0x1700
rcx 0xffff800020d80000
rax 0xffff800020d80000
r8 0xffffffff81e4d88f kprintf+0x16f
r9 0x1
r10 0x25
r11 0x341d32571fb474d5
r12 0x3000000008
r13 0xffff800021bc4a50
r14 0x100
r15 0x1
rip 0xffffffff82136d48 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800021bc4a30
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.0) pid=480274 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=24, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff800020ac3398,0xffff800020ac3888
process=0xffff800020aa96a0 user=0xffff800021bc0000, vmspace=0xfffffd807f000a10
estcpu=36, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
70323 190309 41717 0 2 0 syz-executor.0
70323 405712 41717 0 7 0x4000000 syz-executor.0
*70323 480274 41717 0 7 0x4000000 syz-executor.0
14260 148907 48626 0 2 0 syz-executor.1
14260 497024 48626 0 3 0x4000080 fsleep syz-executor.1
14260 26411 48626 0 3 0x4000080 kqread syz-executor.1
64035 357540 1 0 3 0x80 nanosleep init
48626 257563 2116 0 2 0x2 syz-executor.1
81444 122378 0 0 3 0x14200 bored sosplice
41717 128699 2116 0 3 0x82 nanosleep syz-executor.0
2116 214760 21804 0 3 0x82 thrsleep syz-fuzzer
2116 250339 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 196304 21804 0 3 0x4000082 kqread syz-fuzzer
2116 4927 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 32031 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 355209 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 86334 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 86107 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 283099 21804 0 3 0x4000082 thrsleep syz-fuzzer
2116 442766 21804 0 3 0x4000082 thrsleep syz-fuzzer
21804 465083 40019 0 3 0x10008a pause ksh
40019 146273 50 0 3 0x92 select sshd
50 271203 1 0 3 0x80 select sshd
84019 218006 2472 74 3 0x100092 bpf pflogd
2472 107959 1 0 3 0x80 netio pflogd
82277 41302 68599 73 3 0x100090 kqread syslogd
68599 423575 1 0 3 0x100082 netio syslogd
2916 356242 1 77 3 0x100090 poll dhclient
32551 362156 1 0 3 0x80 poll dhclient
89655 408397 0 0 2 0x14200 zerothread
4424 503303 0 0 3 0x14200 aiodoned aiodoned
41037 449857 0 0 3 0x14200 syncer update
16940 230874 0 0 3 0x14200 cleaner cleaner
98914 171057 0 0 3 0x14200 reaper reaper
35435 37288 0 0 3 0x14200 pgdaemon pagedaemon
68055 74534 0 0 3 0x14200 bored crynlk
47393 25706 0 0 3 0x14200 bored crypto
28076 345458 0 0 3 0x40014200 acpi0 acpi0
90474 115664 0 0 3 0x40014200 idle1
20502 389498 0 0 3 0x14200 bored softnet
62562 383180 0 0 3 0x14200 bored systqmp
45386 106046 0 0 3 0x14200 bored systq
30629 285204 0 0 3 0x40014200 bored softclock
4321 486502 0 0 3 0x40014200 idle0
86693 284707 0 0 3 0x14200 bored smr
1 393304 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 70323 (syz-executor.0) thread 0xffff800020ac2288 (480274)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff826494e0)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1164
#1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227
#2 mi_switch+0x392 sys/kern/sched_bsd.c:439
#3 sleep_finish+0x113 sys/kern/kern_synch.c:415
#4 sleep_finish_all+0x32 sleep_finish_timeout sys/kern/kern_synch.c:444 [inline]
#4 sleep_finish_all+0x32 sys/kern/kern_synch.c:206
#5 tsleep+0x1cc sys/kern/kern_synch.c:155
#6 kqueue_scan+0x399 sys/kern/kern_event.c:870
#7 sys_kevent+0x492 sys/kern/kern_event.c:604
#8 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#8 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
#9 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9510 6413K 7569K 78643K 13965 0
pcb 13 8K 8K 78643K 175 0
rtable 111 4K 4K 78643K 732 0
ifaddr 85 19K 20K 78643K 385 0
counters 43 33K 34K 78643K 157 0
ioctlops 0 0K 4K 78643K 1476 0
iov 0 0K 16K 78643K 165 0
mount 1 1K 1K 78643K 1 0
vnodes 1225 77K 77K 78643K 2211 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 9K 78643K 19 0
VM map 2 1K 1K 78643K 2 0
sem 12 1K 1K 78643K 210 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1809 196K 290K 78643K 12766 0
file desc 6 17K 25K 78643K 1919 0
sigio 0 0K 0K 78643K 112 0
proc 56 51K 95K 78643K 657 0
subproc 32 2K 2K 78643K 51 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 289 0
in_multi 95 4K 4K 78643K 209 0
ether_multi 1 0K 0K 78643K 31 0
mrt 0 0K 0K 78643K 48 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 49 228K 228K 78643K 49 0
exec 0 0K 1K 78643K 470 0
pfkey data 0 0K 4K 78643K 10 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 107 22K 22K 78643K 5563 0
UVM aobj 11 2K 2K 78643K 15 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 146 0
NDP 11 0K 0K 78643K 74 0
temp 128 3022K 3086K 78643K 12703 0
kqueue 9 6K 54K 78643K 404 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
arp 64 12 0 5 1 0 1 1 0 8 0
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 80 75 0 73 1 0 1 1 0 8 0
rtentry 112 81 0 37 2 0 2 2 0 8 0
unpcb 120 1077 0 1067 1 0 1 1 0 8 0
syncache 264 38 0 38 4 4 0 1 0 8 0
sackhl 24 1 0 1 1 1 0 1 0 8 0
tcpqe 32 47 0 47 4 4 0 1 0 8 0
tcpcb 544 909 0 903 3 1 2 2 0 8 1
inpcb 280 1989 0 1980 5 2 3 3 0 8 1
rttmr 72 17 0 17 3 2 1 1 0 8 1
ip6q 72 4 0 4 1 1 0 1 0 8 0
ip6af 40 12 0 12 1 1 0 1 0 8 0
nd6 48 8 0 4 1 0 1 1 0 8 0
pkpcb 40 20 0 20 4 3 1 1 0 8 1
ppxss 1128 4 0 4 1 1 0 1 0 8 0
pffrag 232 18 0 18 2 2 0 1 0 482 0
pffrnode 88 18 0 18 2 2 0 1 0 8 0
pffrent 40 595 0 595 2 2 0 1 0 8 0
pfosfp 40 846 0 423 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfstitem 24 74 0 40 1 0 1 1 0 8 0
pfstkey 112 74 0 40 2 0 2 2 0 8 0
pfstate 328 74 0 40 4 0 4 4 0 8 0
pfrule 1360 21 0 16 2 1 1 2 0 8 0
art_heap8 4096 2 0 0 2 0 2 2 0 8 0
art_heap4 256 429 0 203 17 2 15 16 0 8 0
art_table 32 431 0 203 2 0 2 2 0 8 0
art_node 16 80 0 42 1 0 1 1 0 8 0
sysvmsgpl 40 39 0 38 1 0 1 1 0 8 0
semupl 112 7 0 7 1 1 0 1 0 8 0
semapl 112 206 0 196 1 0 1 1 0 8 0
shmpl 112 13 0 4 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino1pl 128 4030 0 2624 46 0 46 46 0 8 0
ffsino 272 4030 0 2624 95 0 95 95 0 8 0
nchpl 144 6672 0 5067 62 1 61 61 0 8 0
uvmvnodes 72 4798 0 0 88 0 88 88 0 8 0
vnodes 208 4798 0 0 253 0 253 253 0 8 0
namei 1024 18299 0 18299 1 0 1 1 0 8 1
percpumem 16 89 0 57 1 0 1 1 0 8 0
scxspl 192 18552 0 18552 4 3 1 3 0 8 1
plimitpl 152 132 0 125 1 0 1 1 0 8 0
sigapl 432 2117 0 2101 3 1 2 3 0 8 0
futexpl 56 25674 0 25673 1 0 1 1 0 8 0
knotepl 112 633 0 611 2 1 1 2 0 8 0
kqueuepl 104 673 0 665 3 2 1 2 0 8 0
pipelkpl 48 367 0 355 1 0 1 1 0 8 0
pipepl 120 734 0 711 2 1 1 2 0 8 0
fdescpl 496 2118 0 2101 3 0 3 3 0 8 0
filepl 152 11384 0 11272 10 4 6 7 0 8 1
lockfpl 104 547 0 546 1 0 1 1 0 8 0
lockfspl 48 202 0 201 1 0 1 1 0 8 0
sessionpl 112 20 0 10 1 0 1 1 0 8 0
pgrppl 48 31 0 21 1 0 1 1 0 8 0
ucredpl 96 1428 0 1419 1 0 1 1 0 8 0
zombiepl 144 2101 0 2101 1 0 1 1 0 8 1
processpl 960 2134 0 2101 5 0 5 5 0 8 0
procpl 624 4696 0 4650 4 0 4 4 0 8 0
sosppl 128 13 0 13 2 2 0 1 0 8 0
sockpl 400 3186 0 3165 11 7 4 6 0 8 1
mcl64k 65536 17 0 0 3 0 3 3 0 8 0
mcl16k 16384 10 0 0 2 0 2 2 0 8 0
mcl12k 12288 8 0 0 1 0 1 1 0 8 0
mcl9k 9216 7 0 0 1 0 1 1 0 8 0
mcl8k 8192 15 0 0 2 0 2 2 0 8 0
mcl4k 4096 16 0 0 2 0 2 2 0 8 0
mcl2k2 2112 12 0 0 1 0 1 1 0 8 0
mcl2k 2048 173 0 0 19 0 19 19 0 8 1
mtagpl 80 107 0 0 3 0 3 3 0 8 0
mbufpl 256 472 0 0 26 0 26 26 0 8 0
bufpl 280 6477 0 206 448 0 448 448 0 8 0
anonpl 16 150085 0 141927 39 6 33 36 0 125 0
amapchunkpl 152 8157 0 8040 7 1 6 7 0 158 0
amappl16 192 8803 0 8410 28 8 20 22 0 8 0
amappl15 184 61 0 58 1 0 1 1 0 8 0
amappl14 176 35 0 33 1 0 1 1 0 8 0
amappl12 160 944 0 937 1 0 1 1 0 8 0
amappl11 152 1010 0 992 1 0 1 1 0 8 0
amappl10 144 20 0 13 1 0 1 1 0 8 0
amappl9 136 613 0 610 1 0 1 1 0 8 0
amappl8 128 128 0 107 1 0 1 1 0 8 0
amappl7 120 113 0 101 1 0 1 1 0 8 0
amappl6 112 997 0 989 1 0 1 1 0 8 0
amappl5 104 1119 0 1101 1 0 1 1 0 8 0
amappl4 96 2377 0 2350 1 0 1 1 0 8 0
amappl3 88 171 0 164 1 0 1 1 0 8 0
amappl2 80 16029 0 15948 3 0 3 3 0 8 0
amappl1 72 46621 0 46175 26 16 10 21 0 8 0
amappl 80 4962 0 4919 1 0 1 1 0 84 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
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 64 14 0 4 1 0 1 1 0 8 0
uaddrrnd 24 2118 0 2101 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 2118 0 2101 1 0 1 1 0 8 0
vmmpekpl 168 14276 0 14240 2 0 2 2 0 8 0
vmmpepl 168 246692 0 245042 96 23 73 82 0 357 1
vmsppl 368 2117 0 2101 2 0 2 2 0 8 0
pdppl 4096 4243 0 4202 6 0 6 6 0 8 0
pvpl 32 612497 0 601172 147 51 96 118 0 265 3
pmappl 232 2117 0 2101 2 1 1 2 0 8 0
extentpl 40 46 0 29 1 0 1 1 0 8 0
phpool 112 202 0 13 6 0 6 6 0 8 0


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Apr 28, 2020, 6:51:07 AM4/28/20
to syzkaller-o...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages