INFO: task hung in pipe_fcntl

4 views
Skip to first unread message

syzbot

unread,
Apr 10, 2019, 12:04:14 PM4/10/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 8fe42840 Merge 4.9.141 into android-4.9
git tree: android-4.9
console output: https://syzkaller.appspot.com/x/log.txt?x=153c0137400000
kernel config: https://syzkaller.appspot.com/x/.config?x=22a5ba9f73b6da1d
dashboard link: https://syzkaller.appspot.com/bug?extid=8e674069cd36f1944ae6
compiler: gcc (GCC) 8.0.1 20180413 (experimental)

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

INFO: task syz-executor3:26455 blocked for more than 140 seconds.
Not tainted 4.9.141+ #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor3 D28904 26455 2099 0x00000004
ffff8801d5e88000 ffff8801d14d6880 ffff880179137900 ffff8801ce90c740
ffff8801db621018 ffff880151aafc98 ffffffff828075c2 0000000000000000
ffff8801d5e888b0 ffffed003abd1115 00ff8801d5e88000 ffff8801db6218f0
Call Trace:
[<ffffffff82808aef>] schedule+0x7f/0x1b0 kernel/sched/core.c:3553
[<ffffffff828094a3>] schedule_preempt_disabled+0x13/0x20
kernel/sched/core.c:3586
[<ffffffff8280b51d>] __mutex_lock_common kernel/locking/mutex.c:582
[inline]
[<ffffffff8280b51d>] mutex_lock_nested+0x38d/0x900
kernel/locking/mutex.c:621
[<ffffffff8152840c>] __pipe_lock fs/pipe.c:87 [inline]
[<ffffffff8152840c>] pipe_fcntl+0x9c/0x6e0 fs/pipe.c:1173
[<ffffffff81544b5d>] do_fcntl fs/fcntl.c:336 [inline]
[<ffffffff81544b5d>] SYSC_fcntl fs/fcntl.c:376 [inline]
[<ffffffff81544b5d>] SyS_fcntl+0xa4d/0xcd0 fs/fcntl.c:361
[<ffffffff810056ef>] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285
[<ffffffff82817893>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb

Showing all locks held in the system:
2 locks held by khungtaskd/24:
#0: (rcu_read_lock){......}, at: [<ffffffff8131c0cc>]
check_hung_uninterruptible_tasks kernel/hung_task.c:168 [inline]
#0: (rcu_read_lock){......}, at: [<ffffffff8131c0cc>]
watchdog+0x11c/0xa20 kernel/hung_task.c:239
#1: (tasklist_lock){.+.+..}, at: [<ffffffff813fe63f>]
debug_show_all_locks+0x79/0x218 kernel/locking/lockdep.c:4336
1 lock held by rsyslogd/1900:
#0: (&f->f_pos_lock){+.+.+.}, at: [<ffffffff8156cc7c>]
__fdget_pos+0xac/0xd0 fs/file.c:781
2 locks held by getty/2027:
#0: (&tty->ldisc_sem){++++++}, at: [<ffffffff82815952>]
ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:367
#1: (&ldata->atomic_read_lock){+.+.+.}, at: [<ffffffff81d37362>]
n_tty_read+0x202/0x16e0 drivers/tty/n_tty.c:2142
1 lock held by syz-executor5/9991:
#0: (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81520d73>]
prepare_bprm_creds+0x53/0x110 fs/exec.c:1369
1 lock held by syz-executor5/10011:
#0: (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81520d73>]
prepare_bprm_creds+0x53/0x110 fs/exec.c:1369
1 lock held by syz-executor3/14561:
#0: (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81520d73>]
prepare_bprm_creds+0x53/0x110 fs/exec.c:1369
1 lock held by syz-executor3/14584:
#0: (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81520d73>]
prepare_bprm_creds+0x53/0x110 fs/exec.c:1369
1 lock held by syz-executor3/26449:
#0: (&pipe->mutex/1){+.+.+.}, at: [<ffffffff81523c1e>] pipe_lock_nested
fs/pipe.c:66 [inline]
#0: (&pipe->mutex/1){+.+.+.}, at: [<ffffffff81523c1e>]
pipe_lock+0x5e/0x70 fs/pipe.c:74
1 lock held by syz-executor3/26455:
#0: (&pipe->mutex/1){+.+.+.}, at: [<ffffffff8152840c>] __pipe_lock
fs/pipe.c:87 [inline]
#0: (&pipe->mutex/1){+.+.+.}, at: [<ffffffff8152840c>]
pipe_fcntl+0x9c/0x6e0 fs/pipe.c:1173
1 lock held by syz-executor2/26621:
#0: (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81520d73>]
prepare_bprm_creds+0x53/0x110 fs/exec.c:1369
2 locks held by syz-executor3/638:
#0: (&tty->ldisc_sem){++++++}, at: [<ffffffff82815952>]
ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:367
#1: (&ldata->atomic_read_lock){+.+.+.}, at: [<ffffffff81d37362>]
n_tty_read+0x202/0x16e0 drivers/tty/n_tty.c:2142
2 locks held by syz-executor3/647:
#0: (&tty->legacy_mutex/1){+.+.+.}, at: [<ffffffff81d4222a>]
tty_lock+0x6a/0xd0 drivers/tty/tty_mutex.c:18
#1: (&tty->ldisc_sem){++++++}, at: [<ffffffff82815992>]
ldsem_down_write+0x32/0x37 drivers/tty/tty_ldsem.c:393
1 lock held by syz-executor3/649:
#0: (&tty->ldisc_sem){++++++}, at: [<ffffffff82815952>]
ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:367
1 lock held by syz-executor3/656:
#0: (&tty->ldisc_sem){++++++}, at: [<ffffffff82815952>]
ldsem_down_read+0x32/0x40 drivers/tty/tty_ldsem.c:367

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

NMI backtrace for cpu 0
CPU: 0 PID: 24 Comm: khungtaskd Not tainted 4.9.141+ #1
ffff8801d9907d08 ffffffff81b42e79 0000000000000000 0000000000000000
0000000000000000 0000000000000001 ffffffff810983b0 ffff8801d9907d40
ffffffff81b4df89 0000000000000000 0000000000000000 0000000000000002
Call Trace:
[<ffffffff81b42e79>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff81b42e79>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
[<ffffffff81b4df89>] nmi_cpu_backtrace.cold.0+0x48/0x87
lib/nmi_backtrace.c:99
[<ffffffff81b4df1c>] nmi_trigger_cpumask_backtrace+0x12c/0x151
lib/nmi_backtrace.c:60
[<ffffffff810984b4>] arch_trigger_cpumask_backtrace+0x14/0x20
arch/x86/kernel/apic/hw_nmi.c:37
[<ffffffff8131c65d>] trigger_all_cpu_backtrace include/linux/nmi.h:58
[inline]
[<ffffffff8131c65d>] check_hung_task kernel/hung_task.c:125 [inline]
[<ffffffff8131c65d>] check_hung_uninterruptible_tasks
kernel/hung_task.c:182 [inline]
[<ffffffff8131c65d>] watchdog+0x6ad/0xa20 kernel/hung_task.c:239
[<ffffffff81142c3d>] kthread+0x26d/0x300 kernel/kthread.c:211
[<ffffffff82817a5c>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:373
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 2096 Comm: syz-executor0 Not tainted 4.9.141+ #1
task: ffff8801ce908000 task.stack: ffff8801acad8000
RIP: 0010:[<ffffffff8120c932>] c [<ffffffff8120c932>] __read_once_size
include/linux/compiler.h:243 [inline]
RIP: 0010:[<ffffffff8120c932>] c [<ffffffff8120c932>] trace_lock_acquire
include/trace/events/lock.h:12 [inline]
RIP: 0010:[<ffffffff8120c932>] c [<ffffffff8120c932>]
lock_acquire+0x192/0x3e0 kernel/locking/lockdep.c:3755
RSP: 0018:ffff8801acadfaf0 EFLAGS: 00000083
RAX: 0000000000000001 RBX: 0000000000000246 RCX: 0000000000000000
RDX: ffff8801ce908000 RSI: 0000000000000000 RDI: ffff8801ce9088ac
RBP: ffff8801acadfb58 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff830cc360
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000002
FS: 0000000001532940(0000) GS:ffff8801db700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000400200 CR3: 00000001ac899000 CR4: 00000000001606b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
ffffffff81ba7d7b c ffff8801ce9088a8 c ffff8801ce9088b0 c 0000000000000246 c
ffffffff819f7ef0 c ffff8801acadfe4c c 0000000000000000 c 00000000e9856073 c
0000000000000004 c ffff8801c91917c0 c ffff8801ce908000 c ffff8801acadfe4c c
Call Trace:
[<ffffffff819f7d77>] rcu_lock_acquire include/linux/rcupdate.h:493 [inline]
[<ffffffff819f7d77>] rcu_read_lock include/linux/rcupdate.h:875 [inline]
[<ffffffff819f7d77>] task_has_perm+0x47/0x330 security/selinux/hooks.c:1611
[<ffffffff819f8083>] selinux_task_wait+0x23/0x30
security/selinux/hooks.c:3954
[<ffffffff819e6e73>] security_task_wait+0x73/0xb0 security/security.c:1032
[<ffffffff810e91f1>] wait_consider_task+0x2a1/0x3620 kernel/exit.c:1377
[<ffffffff810ec993>] do_wait_thread kernel/exit.c:1490 [inline]
[<ffffffff810ec993>] do_wait+0x423/0x950 kernel/exit.c:1561
[<ffffffff810eda0b>] SYSC_wait4 kernel/exit.c:1693 [inline]
[<ffffffff810eda0b>] SyS_wait4+0x12b/0x1f0 kernel/exit.c:1658
[<ffffffff810056ef>] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285
[<ffffffff82817893>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
Code: c08 c00 c00 c00 c00 c00 c00 c48 c89 cdf c57 c9d c0f c1f
c44 c00 c00 c48 c83 cc4 c40 c5b c41 c5c c41 c5d c41 c5e c41
c5f c5d cc3 c4c c89 c5d cc8 c65 cff c05 c5e cb4 ce0 c7e
c<48> c8b c05 c87 c0b c1d c02 ce8 cd2 c72 c03 c00 c4c c8b
c5d cc8 c85 cc0 c74 c0d c80 c


---
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,
Jul 13, 2019, 9:35:04 AM7/13/19
to syzkaller-a...@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