assert "!_kernel_lock_held()" failed in kern_fork.c

5 views
Skip to first unread message

syzbot

unread,
Feb 4, 2019, 3:02:03 PM2/4/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 6e31582a5a78 _dl_cerror is trivial on powerpc; just inline..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=148d72ff400000
kernel config: https://syzkaller.appspot.com/x/.config?x=3303344588104330
dashboard link: https://syzkaller.appspot.com/bug?extid=790495af3d9b4f5e45cd
compiler:

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+790495...@syzkaller.appspotmail.com

panic: malloc: allocation too lapanic: kernel diagnostic
assertion "!_kernel_lock_held()" failed:
file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 689
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*456124 93832 0 0 0 1 syz-executor0
325706 98771 0 0 0x4000000 0 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
__assert(ffffffff81d851a4,ffff800020c9afe0,0,1) at __assert+0x24
sys/kern/subr_prf.c:155
proc_trampoline_mp() at proc_trampoline_mp+0x13e
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{1}>
ddb{1}> set $lines = 0
ddb{1}> show panic
malloc: allocation too large, type = 2, size = 2795614184

ddb{1}> 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
__assert(ffffffff81d851a4,ffff800020c9afe0,0,1) at __assert+0x24
sys/kern/subr_prf.c:155
proc_trampoline_mp() at proc_trampoline_mp+0x13e
end trace frame: 0x0, count: -4
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff800020c9af40
rbx 0xffff800020c9afe0
rdx 0xffffffff81f35469 cy_pio_rec+0x2087
rcx 0
rax 0
r8 0xffffffff81d85b34 kprintf+0x174
r9 0x1
r10 0x24998f93492e841f
r11 0x9aa35d0ccd32cff1
r12 0x3000000008
r13 0xffff800020c9af50
r14 0x104
r15 0x1
rip 0xffffffff81bb44e8 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800020c9af30
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor0) pid=456124 stat=onproc
flags process=0 proc=0
pri=77, usrpri=77, nice=20
forw=0xffffffffffffffff, list=0xffff800020b93c38,0xffffffff822f3540
process=0xffff800020b946a0 user=0xffff800020c96000,
vmspace=0xfffffd807f00d5a0
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
*93832 456124 45843 0 7 0 syz-executor0
98771 203516 66159 0 2 0 syz-executor1
98771 523674 66159 0 2 0x4000000 syz-executor1
98771 325706 66159 0 7 0x4000000 syz-executor1
46171 211371 1 0 3 0x100083 ttyin getty
66159 38399 10143 0 3 0x82 nanosleep syz-executor1
8310 6098 0 0 3 0x14200 bored sosplice
45843 403842 10143 0 2 0x2 syz-executor0
10143 444340 16510 0 3 0x82 thrsleep syz-fuzzer
10143 79237 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 146831 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 207272 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 373813 16510 0 2 0x4000082 syz-fuzzer
10143 317235 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 51627 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 44355 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 206779 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 158187 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 41613 16510 0 3 0x4000082 thrsleep syz-fuzzer
10143 167307 16510 0 3 0x4000082 thrsleep syz-fuzzer
16510 346339 73508 0 3 0x10008a pause ksh
73508 341183 66822 0 3 0x92 select sshd
66822 508748 1 0 3 0x80 select sshd
13681 89846 82737 73 3 0x100090 kqread syslogd
82737 135640 1 0 3 0x100082 netio syslogd
61662 186186 1 77 3 0x100090 poll dhclient
19689 301258 1 0 3 0x80 poll dhclient
74185 290560 0 0 2 0x14200 zerothread
55813 253497 0 0 3 0x14200 aiodoned aiodoned
62673 70834 0 0 3 0x14200 syncer update
54296 183453 0 0 3 0x14200 cleaner cleaner
47796 4873 0 0 3 0x14200 reaper reaper
21049 43707 0 0 3 0x14200 pgdaemon pagedaemon
42349 75413 0 0 3 0x14200 bored crynlk
98110 381286 0 0 3 0x14200 bored crypto
55899 297276 0 0 3 0x40014200 acpi0 acpi0
58240 186505 0 0 3 0x40014200 idle1
44493 121655 0 0 3 0x14200 bored softnet
72936 346411 0 0 3 0x14200 bored systqmp
5537 284790 0 0 3 0x14200 bored systq
16049 123987 0 0 3 0x40014200 bored softclock
22349 203629 0 0 3 0x40014200 idle0
1 255570 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 98771 (syz-executor1) thread 0xffff800020b93c38 (325706)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822d6828) locked @
/syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90
Process 45843 (syz-executor0) thread 0xffff800020b759d0 (403842)
exclusive rrwlock inode r = 0 (0xfffffd8066708a28) locked @
/syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140
exclusive rrwlock inode r = 0 (0xfffffd8077ca6e70) locked @
/syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9517 10470K 10470K 78643K 10930 0 0
pcb 23 9K 10K 78643K 423 0 0
rtable 100 3K 4K 78643K 432 0 0
ifaddr 52 12K 13K 78643K 163 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 2K 78643K 22 0 0
iov 0 0K 16K 78643K 82 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1203 75K 76K 78643K 1852 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 22 0 0
VM map 2 1K 1K 78643K 2 0 0
sem 12 0K 1K 78643K 113 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1792 194K 288K 78643K 12592 0 0
file desc 6 17K 25K 78643K 956 0 0
sigio 1 0K 0K 78643K 20 0 0
proc 42 38K 58K 78643K 486 0 0
subproc 64 65538K 67586K 78643K 175 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 118 0 0
in_multi 33 2K 2K 78643K 97 0 0
ether_multi 1 0K 0K 78643K 4 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 90 397K 397K 78643K 90 0 0
exec 0 0K 1K 78643K 227 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 90 20K 21K 78643K 3839 0 0
UVM aobj 54 2K 2K 78643K 59 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 1K 78643K 13 0 0
NDP 10 0K 0K 78643K 49 0 0
temp 156 2367K 2434K 78643K 5558 0 0
kqueue 0 0K 0K 78643K 17 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg
Idle
arp 64 7 0 3 1 0 1 1 0
8 0
inpcbpl 280 417 0 410 1 0 1 1 0
8 0
plimitpl 152 28 0 21 1 0 1 1 0
8 0
plcache 128 20 0 0 1 0 1 1 0
8 0
rtentry 112 68 0 28 2 0 2 2 0
8 0
syncache 264 4 0 4 1 1 0 1 0
8 0
tcpcb 544 153 0 149 1 0 1 1 0
8 0
nd6 48 10 0 6 1 0 1 1 0
8 0
ppxss 1128 17 0 17 6 5 1 1 0
8 1
art_heap8 4096 1 0 0 1 0 1 1 0
8 0
art_heap4 256 317 0 129 12 0 12 12 0
8 0
art_table 32 318 0 129 2 0 2 2 0
8 0
art_node 16 67 0 33 1 0 1 1 0
8 0
sysvmsgpl 40 16 0 7 2 1 1 1 0
8 0
semupl 112 2 0 2 2 2 0 1 0
8 0
semapl 112 107 0 97 1 0 1 1 0
8 0
shmpl 112 57 0 5 2 0 2 2 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 3254 0 1860 46 0 46 46 0
8 0
ffsino 272 3254 0 1860 94 0 94 94 0
8 0
nchpl 144 4742 0 3169 59 0 59 59 0
8 0
uvmvnodes 72 3436 0 0 63 0 63 63 0
8 0
vnodes 200 3436 0 0 181 0 181 181 0
8 0
namei 1024 13608 0 13608 1 0 1 1 0
8 1
percpumem 16 30 0 0 1 0 1 1 0
8 0
scsiplug 64 1 0 1 1 1 0 1 0
8 0
scxspl 192 12309 0 12309 13 10 3 6 0
8 3
sigapl 432 1116 0 1102 2 0 2 2 0
8 0
futexpl 56 10675 0 10675 1 0 1 1 0
8 1
knotepl 112 378 0 351 4 3 1 2 0
8 0
kqueuepl 104 321 0 319 1 0 1 1 0
8 0
pipepl 112 606 0 587 2 1 1 1 0
8 0
fdescpl 488 1117 0 1102 3 1 2 3 0
8 0
filepl 152 6565 0 6467 9 4 5 5 0
8 1
lockfpl 104 273 0 272 5 4 1 1 0
8 0
lockfspl 32 515 0 514 5 4 1 1 0
8 0
sessionpl 112 22 0 12 1 0 1 1 0
8 0
pgrppl 48 30 0 20 1 0 1 1 0
8 0
ucredpl 96 1698 0 1691 1 0 1 1 0
8 0
zombiepl 144 1102 0 1102 2 1 1 1 0
8 1
processpl 840 1132 0 1102 4 0 4 4 0
8 0
procpl 600 3145 0 3102 6 2 4 5 0
8 0
srpgc 64 18 0 18 1 1 0 1 0
8 0
sosppl 128 18 0 18 3 3 0 1 0
8 0
sockpl 384 811 0 794 5 2 3 3 0
8 1
mcl64k 65536 378 0 0 48 11 37 48 0
8 1
mcl16k 16384 2 0 0 1 0 1 1 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 4 0 0 1 0 1 1 0
8 0
mcl4k 4096 11 0 0 2 0 2 2 0
8 0
mcl2k2 2112 3 0 0 1 0 1 1 0
8 0
mcl2k 2048 106 0 0 13 1 12 13 0
8 0
mtagpl 80 1 0 0 1 0 1 1 0
8 0
mbufpl 256 471 0 0 28 0 28 28 0
8 0
bufpl 256 6350 0 980 336 0 336 336 0
8 0
anonpl 16 123312 0 115727 89 56 33 47 0
125 2
amapchunkpl 152 6367 0 6253 18 12 6 10 0
158 0
amappl16 192 6065 0 5692 66 45 21 31 0
8 1
amappl15 184 466 0 465 2 1 1 1 0
8 0
amappl14 176 302 0 298 2 1 1 1 0
8 0
amappl13 168 28 0 25 1 0 1 1 0
8 0
amappl12 160 15 0 15 1 1 0 1 0
8 0
amappl11 152 198 0 189 1 0 1 1 0
8 0
amappl10 144 65 0 63 2 1 1 1 0
8 0
amappl9 136 344 0 343 1 0 1 1 0
8 0
amappl8 128 172 0 145 1 0 1 1 0
8 0
amappl7 120 42 0 35 1 0 1 1 0
8 0
amappl6 112 341 0 332 1 0 1 1 0
8 0
amappl5 104 593 0 582 1 0 1 1 0
8 0
amappl4 96 295 0 275 2 1 1 2 0
8 0
amappl3 88 375 0 370 1 0 1 1 0
8 0
amappl2 80 9498 0 9449 2 0 2 2 0
8 0
amappl1 72 32815 0 32386 24 14 10 19 0
8 0
amappl 72 3408 0 3367 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 58 0 5 1 0 1 1 0
8 0
uaddrrnd 24 1117 0 1102 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 1117 0 1102 1 0 1 1 0
8 0
vmmpekpl 168 12570 0 12548 2 0 2 2 0
8 0
vmmpepl 168 125935 0 124557 109 45 64 73 0
357 2
vmsppl 360 1116 0 1102 2 0 2 2 0
8 0
pdppl 4096 2241 0 2204 6 1 5 6 0
8 0
pvpl 32 350672 0 340062 172 70 102 123 0 265
13
pmappl 224 1116 0 1102 1 0 1 1 0
8 0
extentpl 40 39 0 25 1 0 1 1 0
8 0
phpool 112 549 0 15 16 0 16 16 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#bug-status-tracking for how to communicate with
syzbot.

syzbot

unread,
Jan 21, 2020, 11:10:06 AM1/21/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