INFO: task can't die in d_alloc_parallel

14 views
Skip to first unread message

syzbot

unread,
Dec 19, 2020, 12:04:11 PM12/19/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9317f948 Add linux-next specific files for 20201215
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=17e65413500000
kernel config: https://syzkaller.appspot.com/x/.config?x=5c81cc44aa25b5b3
dashboard link: https://syzkaller.appspot.com/bug?extid=161fa46cef42e0f81251
compiler: gcc (GCC) 10.1.0-syz 20200507
CC: [linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

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

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+161fa4...@syzkaller.appspotmail.com

INFO: task syz-executor.2:12421 can't die for more than 143 seconds.
task:syz-executor.2 state:D stack:27072 pid:12421 ppid: 8547 flags:0x00000004
Call Trace:
context_switch kernel/sched/core.c:4327 [inline]
__schedule+0x8eb/0x21b0 kernel/sched/core.c:5078
schedule+0xcf/0x270 kernel/sched/core.c:5157
d_wait_lookup fs/dcache.c:2527 [inline]
d_alloc_parallel+0x1272/0x1ae0 fs/dcache.c:2609
__lookup_slow+0x193/0x480 fs/namei.c:1529
lookup_slow fs/namei.c:1561 [inline]
walk_component+0x418/0x6a0 fs/namei.c:1861
lookup_last fs/namei.c:2310 [inline]
path_lookupat+0x1ba/0x830 fs/namei.c:2334
filename_lookup+0x19f/0x560 fs/namei.c:2367
unix_find_other+0xd1/0x6f0 net/unix/af_unix.c:935
unix_dgram_sendmsg+0xc73/0x1a80 net/unix/af_unix.c:1695
sock_sendmsg_nosec net/socket.c:652 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:672
____sys_sendmsg+0x331/0x810 net/socket.c:2345
___sys_sendmsg+0xf3/0x170 net/socket.c:2399
__sys_sendmmsg+0x195/0x470 net/socket.c:2489
__do_sys_sendmmsg net/socket.c:2518 [inline]
__se_sys_sendmmsg net/socket.c:2515 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2515
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45e159
RSP: 002b:00007f60b0222c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e159
RDX: 0000000000000002 RSI: 0000000020008600 RDI: 0000000000000005
RBP: 000000000119bfc8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c
R13: 00007ffd9495b6df R14: 00007f60b02239c0 R15: 000000000119bf8c
INFO: task syz-executor.2:12421 blocked for more than 144 seconds.
Not tainted 5.10.0-next-20201215-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2 state:D stack:27072 pid:12421 ppid: 8547 flags:0x00000004
Call Trace:
context_switch kernel/sched/core.c:4327 [inline]
__schedule+0x8eb/0x21b0 kernel/sched/core.c:5078
schedule+0xcf/0x270 kernel/sched/core.c:5157
d_wait_lookup fs/dcache.c:2527 [inline]
d_alloc_parallel+0x1272/0x1ae0 fs/dcache.c:2609
__lookup_slow+0x193/0x480 fs/namei.c:1529
lookup_slow fs/namei.c:1561 [inline]
walk_component+0x418/0x6a0 fs/namei.c:1861
lookup_last fs/namei.c:2310 [inline]
path_lookupat+0x1ba/0x830 fs/namei.c:2334
filename_lookup+0x19f/0x560 fs/namei.c:2367
unix_find_other+0xd1/0x6f0 net/unix/af_unix.c:935
unix_dgram_sendmsg+0xc73/0x1a80 net/unix/af_unix.c:1695
sock_sendmsg_nosec net/socket.c:652 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:672
____sys_sendmsg+0x331/0x810 net/socket.c:2345
___sys_sendmsg+0xf3/0x170 net/socket.c:2399
__sys_sendmmsg+0x195/0x470 net/socket.c:2489
__do_sys_sendmmsg net/socket.c:2518 [inline]
__se_sys_sendmmsg net/socket.c:2515 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2515
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45e159
RSP: 002b:00007f60b0222c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e159
RDX: 0000000000000002 RSI: 0000000020008600 RDI: 0000000000000005
RBP: 000000000119bfc8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c
R13: 00007ffd9495b6df R14: 00007f60b02239c0 R15: 000000000119bf8c
INFO: task syz-executor.2:12428 can't die for more than 144 seconds.
task:syz-executor.2 state:R running task stack:27520 pid:12428 ppid: 8547 flags:0x00004006
Call Trace:

Showing all locks held in the system:
2 locks held by kworker/u4:3/132:
#0: ffff8880b9c34c58 (&rq->lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1318 [inline]
#0: ffff8880b9c34c58 (&rq->lock){-.-.}-{2:2}, at: __schedule+0x235/0x21b0 kernel/sched/core.c:4995
#1: ffff8880b9c20088 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x305/0x440 kernel/sched/psi.c:833
1 lock held by khungtaskd/1658:
#0: ffffffff8b78f920 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x28c kernel/locking/lockdep.c:6254
1 lock held by in:imklog/8271:
#0: ffff888018d1d9f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:923
1 lock held by syz-executor.2/12421:
#0: ffff88807d4b8150 (&type->i_mutex_dir_key#9){.+.+}-{3:3}, at: inode_lock_shared include/linux/fs.h:783 [inline]
#0: ffff88807d4b8150 (&type->i_mutex_dir_key#9){.+.+}-{3:3}, at: lookup_slow fs/namei.c:1560 [inline]
#0: ffff88807d4b8150 (&type->i_mutex_dir_key#9){.+.+}-{3:3}, at: walk_component+0x409/0x6a0 fs/namei.c:1861
2 locks held by syz-executor.2/12428:

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1658 Comm: khungtaskd Not tainted 5.10.0-next-20201215-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x107/0x163 lib/dump_stack.c:120
nmi_cpu_backtrace.cold+0x3c/0xef lib/nmi_backtrace.c:105
nmi_trigger_cpumask_backtrace+0x1b3/0x230 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:147 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:253 [inline]
watchdog+0xe75/0x1020 kernel/hung_task.c:338
kthread+0x3b1/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 10698 Comm: kworker/0:13 Not tainted 5.10.0-next-20201215-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events toggle_allocation_gate
RIP: 0010:test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
RIP: 0010:hlock_class kernel/locking/lockdep.c:198 [inline]
RIP: 0010:mark_lock+0xea/0x1720 kernel/locking/lockdep.c:4389
Code: b6 04 02 84 c0 74 08 3c 03 0f 8e 8f 07 00 00 44 0f b7 75 20 66 41 81 e6 ff 1f 45 0f b7 f6 be 08 00 00 00 4c 89 f0 48 c1 f8 06 <48> 8d 3c c5 a0 37 51 8f e8 59 36 5e 00 4c 0f a3 35 11 9f f9 0d 0f
RSP: 0018:ffffc9000936f630 EFLAGS: 00000002
RAX: 0000000000000002 RBX: 1ffff9200126decc RCX: 0000000000000006
RDX: 1ffff110036274af RSI: 0000000000000008 RDI: ffff88801b139b00
RBP: ffff88801b13a558 R08: 0000000000000000 R09: ffffffff8f5137b7
R10: fffffbfff1ea26f6 R11: 0000000000000001 R12: 0000000000000006
R13: 0000000000000040 R14: 000000000000008f R15: ffff88801b13a490
FS: 0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff31cca9000 CR3: 000000000b48e000 CR4: 00000000001526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
mark_usage kernel/locking/lockdep.c:4324 [inline]
__lock_acquire+0x8a7/0x54b0 kernel/locking/lockdep.c:4786
lock_acquire kernel/locking/lockdep.c:5437 [inline]
lock_acquire+0x29d/0x750 kernel/locking/lockdep.c:5402
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151
spin_lock include/linux/spinlock.h:354 [inline]
__get_locked_pte+0x2d1/0x4f0 mm/memory.c:1623
get_locked_pte include/linux/mm.h:2000 [inline]
__text_poke+0x1ac/0x960 arch/x86/kernel/alternative.c:896
text_poke_bp_batch+0x187/0x550 arch/x86/kernel/alternative.c:1190
text_poke_flush arch/x86/kernel/alternative.c:1347 [inline]
text_poke_flush arch/x86/kernel/alternative.c:1344 [inline]
text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1354
arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:126
jump_label_update kernel/jump_label.c:814 [inline]
jump_label_update+0x1b3/0x3a0 kernel/jump_label.c:793
static_key_enable_cpuslocked+0x1cf/0x280 kernel/jump_label.c:177
static_key_enable+0x16/0x20 kernel/jump_label.c:190
toggle_allocation_gate mm/kfence/core.c:594 [inline]
toggle_allocation_gate+0x116/0x260 mm/kfence/core.c:587
process_one_work+0x98d/0x1630 kernel/workqueue.c:2275
worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
kthread+0x3b1/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Dmitry Vyukov

unread,
Feb 27, 2021, 6:05:10 AM2/27/21
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation, Marco Elver
#syz fix: kfence: fix potential deadlock due to wake_up()

syzbot

unread,
May 28, 2021, 7:05:15 AM5/28/21
to dvy...@google.com, el...@google.com, syzkaller-upst...@googlegroups.com
This bug is marked as fixed by commit:
kfence: fix potential deadlock due to wake_up()
But I can't find it in any tested tree for more than 90 days.
Is it a correct commit? Please update it by replying:
#syz fix: exact-commit-title
Until then the bug is still considered open and
new crashes with the same signature are ignored.

Dmitry Vyukov

unread,
May 29, 2021, 2:29:55 AM5/29/21
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation, Marco Elver
The patch was later folded into this one:

#syz fix: mm: add Kernel Electric-Fence infrastructure
Reply all
Reply to author
Forward
0 new messages