syzbot


INFO: task hung in do_truncate2

Status: auto-closed as invalid on 2019/08/31 11:12
Reported-by: syzbot+119112116796c4b3c214@syzkaller.appspotmail.com
First crash: 2143d, last: 1868d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 INFO: task hung in do_truncate2 10 1680d 1703d 0/2 auto-closed as invalid on 2020/01/06 18:14
android-414 INFO: task hung in do_truncate2 C 9 1849d 1830d 0/1 public: reported C repro on 2019/04/12 00:00

Sample crash report:
INFO: task syz-executor.5:22514 blocked for more than 140 seconds.
      Not tainted 4.9.155+ #27
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5  D29480 22514  21827 0x00000004
 ffff8801a5a90000 0000000000000000 ffff8801db721000 ffff8801da6b2f80
 ffff8801db721018 ffff8801982f77b0 ffffffff82806806 dffffc0000000000
 ffff8801982f7788 ffffffff81207081 00ffffff8281194f ffff8801db7218f0
Call Trace:
 [<ffffffff82807d92>] schedule+0x92/0x1c0 kernel/sched/core.c:3553
 [<ffffffff82811bb3>] __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:526 [inline]
 [<ffffffff82811bb3>] rwsem_down_write_failed+0x3a3/0x750 kernel/locking/rwsem-xadd.c:555
 [<ffffffff81b79027>] call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:105
 [<ffffffff8281095c>] __down_write arch/x86/include/asm/rwsem.h:125 [inline]
 [<ffffffff8281095c>] down_write+0x5c/0xa0 kernel/locking/rwsem.c:54
 [<ffffffff81505280>] inode_lock include/linux/fs.h:768 [inline]
 [<ffffffff81505280>] do_truncate2+0x130/0x210 fs/open.c:61
 [<ffffffff8153f28e>] handle_truncate fs/namei.c:3031 [inline]
 [<ffffffff8153f28e>] do_last fs/namei.c:3466 [inline]
 [<ffffffff8153f28e>] path_openat+0x12ae/0x2f60 fs/namei.c:3581
 [<ffffffff81543d21>] do_filp_open+0x1a1/0x280 fs/namei.c:3615
 [<ffffffff815080c0>] do_sys_open+0x2f0/0x610 fs/open.c:1072
 [<ffffffff81508487>] SYSC_open fs/open.c:1090 [inline]
 [<ffffffff81508487>] SyS_open fs/open.c:1085 [inline]
 [<ffffffff81508487>] SYSC_creat fs/open.c:1110 [inline]
 [<ffffffff81508487>] SyS_creat+0x27/0x30 fs/open.c:1108
 [<ffffffff810056bd>] do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285
 [<ffffffff82816a93>] 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: [<ffffffff8131bbab>] check_hung_uninterruptible_tasks kernel/hung_task.c:168 [inline]
 #0:  (rcu_read_lock){......}, at: [<ffffffff8131bbab>] watchdog+0x11b/0xa40 kernel/hung_task.c:239
 #1:  (tasklist_lock){.+.+..}, at: [<ffffffff813fea8f>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4336
2 locks held by getty/2022:
 #0:  (&tty->ldisc_sem){++++++}, at: [<ffffffff82814b83>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
 #1:  (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff81d3982e>] n_tty_read+0x1fe/0x1820 drivers/tty/n_tty.c:2156
2 locks held by syz-executor.4/18581:
 #0:  (&tty->ldisc_sem){++++++}, at: [<ffffffff82814b83>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
 #1:  (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff81d3982e>] n_tty_read+0x1fe/0x1820 drivers/tty/n_tty.c:2156
2 locks held by syz-executor.5/22514:
 #0:  (sb_writers#4){.+.+.+}, at: [<ffffffff81577c8f>] sb_start_write include/linux/fs.h:1575 [inline]
 #0:  (sb_writers#4){.+.+.+}, at: [<ffffffff81577c8f>] mnt_want_write+0x3f/0xb0 fs/namespace.c:391
 #1:  (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [<ffffffff81505280>] inode_lock include/linux/fs.h:768 [inline]
 #1:  (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [<ffffffff81505280>] do_truncate2+0x130/0x210 fs/open.c:61

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

NMI backtrace for cpu 1
CPU: 1 PID: 24 Comm: khungtaskd Not tainted 4.9.155+ #27
 ffff8801d9907cd0 ffffffff81b47871 0000000000000001 0000000000000000
 0000000000000001 ffffffff81097301 00000000003fff5d ffff8801d9907d08
 ffffffff81b52afc 0000000000000001 0000000000000000 0000000000000001
Call Trace:
 [<ffffffff81b47871>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81b47871>] dump_stack+0xc1/0x120 lib/dump_stack.c:51
 [<ffffffff81b52afc>] nmi_cpu_backtrace.cold+0x47/0x87 lib/nmi_backtrace.c:99
 [<ffffffff81b52a84>] nmi_trigger_cpumask_backtrace+0x124/0x155 lib/nmi_backtrace.c:60
 [<ffffffff81097494>] arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:37
 [<ffffffff8131c087>] trigger_all_cpu_backtrace include/linux/nmi.h:58 [inline]
 [<ffffffff8131c087>] check_hung_task kernel/hung_task.c:125 [inline]
 [<ffffffff8131c087>] check_hung_uninterruptible_tasks kernel/hung_task.c:182 [inline]
 [<ffffffff8131c087>] watchdog+0x5f7/0xa40 kernel/hung_task.c:239
 [<ffffffff81142028>] kthread+0x278/0x310 kernel/kthread.c:211
 [<ffffffff82816c5c>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:373
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.155+ #27
task: ffffffff8302d180 task.stack: ffffffff83000000
RIP: 0010:[<ffffffff8124376a>] c [<ffffffff8124376a>] debug_lockdep_rcu_enabled.part.0+0x2a/0x60 kernel/rcu/update.c:265
RSP: 0018:ffff8801db607c98  EFLAGS: 00000803
RAX: dffffc0000000000 RBX: ffffffff8302d180 RCX: 1ffffffff063ed60
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8302da2c
RBP: ffff8801db607ca0 R08: 0000000000000000 R09: ffff8801db621100
R10: ffff88021fffd010 R11: 0000012d5b9c9e92 R12: 0000000000000000
R13: ffff8801db6210a0 R14: ffff8801db621170 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8801db600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c4268b1000 CR3: 00000001d066d000 CR4: 00000000001606b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 0000000000000955c ffff8801db607cb0c ffffffff81243811c ffff8801db607db0c
 ffffffff811914cfc ffffffff81babb7cc ffffffff81babb7cc ffffffff831f6b00c
 0000000000000001c ffff8801db61c5d0c ffff8801db61cb00c dffffc0000000000c
Call Trace:
 <IRQ> d [<ffffffff81243811>] debug_lockdep_rcu_enabled+0x71/0xa0 kernel/rcu/update.c:264
 [<ffffffff811914cf>] trace_sched_contrib_scale_f include/trace/events/sched.h:590 [inline]
 [<ffffffff811914cf>] __update_load_avg kernel/sched/fair.c:2873 [inline]
 [<ffffffff811914cf>] update_cfs_rq_load_avg kernel/sched/fair.c:3291 [inline]
 [<ffffffff811914cf>] update_blocked_averages+0x1e7f/0x4f70 kernel/sched/fair.c:8218
 [<ffffffff811d1264>] rebalance_domains+0xf4/0x960 kernel/sched/fair.c:10092
 [<ffffffff811d1dc0>] run_rebalance_domains+0x2f0/0x500 kernel/sched/fair.c:10349
 [<ffffffff8281be7d>] __do_softirq+0x22d/0x964 kernel/softirq.c:288
 [<ffffffff810eecd9>] invoke_softirq kernel/softirq.c:368 [inline]
 [<ffffffff810eecd9>] irq_exit+0x119/0x160 kernel/softirq.c:409
 [<ffffffff8281994e>] smp_reschedule_interrupt+0x6e/0x90 arch/x86/kernel/smp.c:270
 [<ffffffff828187ad>] reschedule_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:671
 <EOI> d [<ffffffff82815692>] ? native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:56
 [<ffffffff81068160>] arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:428
 [<ffffffff82815ae6>] default_idle_call+0x36/0x60 kernel/sched/idle.c:97
 [<ffffffff811f1233>] cpuidle_idle_call kernel/sched/idle.c:155 [inline]
 [<ffffffff811f1233>] cpu_idle_loop kernel/sched/idle.c:248 [inline]
 [<ffffffff811f1233>] cpu_startup_entry+0x283/0x3a0 kernel/sched/idle.c:303
 [<ffffffff82804124>] rest_init+0x18b/0x194 init/main.c:409
 [<ffffffff83420948>] start_kernel+0x619/0x64d init/main.c:664
 [<ffffffff8341f29a>] x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:196
 [<ffffffff8341f3d3>] x86_64_start_kernel+0x137/0x15a arch/x86/kernel/head64.c:177
Code: c90 c48 cb8 c00 c00 c00 c00 c00 cfc cff cdf c55 c48 c89 ce5 c53 c65 c48 c8b c1c c25 c00 c7e c01 c00 c48 c8d cbb cac c08 c00 c00 c48 c89 cfa c48 cc1 cea c03 c0f cb6 c14 c02 c<48> c89 cf8 c83 ce0 c07 c83 cc0 c03 c38 cd0 c7c c04 c84 cd2 c75 c10 c8b c93 cac c08 c

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/04 11:11 https://android.googlesource.com/kernel/common android-4.9 1597fdfe52ba 7c693b52 .config console log report ci-android-49-kasan-gce-root
2019/01/07 09:30 https://android.googlesource.com/kernel/common android-4.9 8fe428403e30 ee332608 .config console log report ci-android-49-kasan-gce
2018/08/27 19:27 https://android.googlesource.com/kernel/common android-4.9 09eb2ba5ed0c 758cd203 .config console log report ci-android-49-kasan-gce-root
2018/08/13 08:44 https://android.googlesource.com/kernel/common android-4.9 9dc978d43ec7 7a88b141 .config console log report ci-android-49-kasan-gce-root
2018/08/12 14:00 https://android.googlesource.com/kernel/common android-4.9 9dc978d43ec7 7a88b141 .config console log report ci-android-49-kasan-gce-root
2018/08/11 16:18 https://android.googlesource.com/kernel/common android-4.9 9dc978d43ec7 7a88b141 .config console log report ci-android-49-kasan-gce-root
2018/07/23 20:38 https://android.googlesource.com/kernel/common android-4.9 47bbcd6bf8f9 912c93d7 .config console log report ci-android-49-kasan-gce-root
2018/07/13 12:11 https://android.googlesource.com/kernel/common android-4.9 9e7903954483 92a49505 .config console log report ci-android-49-kasan-gce-root
2018/07/13 02:56 https://android.googlesource.com/kernel/common android-4.9 9e7903954483 06c33b3a .config console log report ci-android-49-kasan-gce-root
2018/07/13 00:58 https://android.googlesource.com/kernel/common android-4.9 9e7903954483 06c33b3a .config console log report ci-android-49-kasan-gce-root
2018/07/07 07:51 https://android.googlesource.com/kernel/common android-4.9 03c70feafdb2 6c0c0099 .config console log report ci-android-49-kasan-gce-root
2018/06/27 18:43 https://android.googlesource.com/kernel/common android-4.9 00a0bcbfcfb6 43e60f7e .config console log report ci-android-49-kasan-gce-root
2018/06/14 01:06 https://android.googlesource.com/kernel/common android-4.9 b7d377b4640b 27c5f59f .config console log report ci-android-49-kasan-gce-root
2018/06/13 21:42 https://android.googlesource.com/kernel/common android-4.9 b7d377b4640b 27c5f59f .config console log report ci-android-49-kasan-gce-root
2018/06/08 15:22 https://android.googlesource.com/kernel/common android-4.9 42a730adb6e2 f7b27b7a .config console log report ci-android-49-kasan-gce-root
2018/06/03 06:55 https://android.googlesource.com/kernel/common android-4.9 d7e64f8022e4 2f93b54f .config console log report ci-android-49-kasan-gce-root
* Struck through repros no longer work on HEAD.