syzbot


INFO: task hung in flush_to_ldisc

Status: auto-closed as invalid on 2020/06/23 11:01
Reported-by: syzbot+98b14ee3303a01afcf84@syzkaller.appspotmail.com
First crash: 934d, last: 864d
similar bugs (8):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in flush_to_ldisc (2) 1 722d 722d 0/1 auto-closed as invalid on 2020/11/11 17:44
upstream INFO: task hung in flush_to_ldisc (2) 1 453d 453d 0/22 auto-closed as invalid on 2021/06/09 11:04
linux-4.19 INFO: task hung in flush_to_ldisc 10 872d 934d 0/1 auto-closed as invalid on 2020/06/15 14:09
upstream INFO: task hung in flush_to_ldisc C inconclusive done 15 874d 944d 17/22 fixed on 2020/11/16 12:12
linux-4.14 INFO: task hung in flush_to_ldisc (3) 1 485d 485d 0/1 auto-closed as invalid on 2021/07/07 16:40
upstream INFO: task hung in flush_to_ldisc (3) C inconclusive 3 153d 342d 0/22 closed as invalid on 2022/02/08 10:26
linux-4.14 INFO: task hung in flush_to_ldisc (2) 1 676d 676d 0/1 auto-closed as invalid on 2020/12/28 13:53
linux-4.19 INFO: task hung in flush_to_ldisc (3) 1 436d 436d 0/1 auto-closed as invalid on 2021/08/25 00:39

Sample crash report:
NOHZ: local_softirq_pending 08
NOHZ: local_softirq_pending 08
NOHZ: local_softirq_pending 08
INFO: task kworker/u4:3:274 blocked for more than 140 seconds.
      Not tainted 4.14.171-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u4:3    D26384   274      2 0x80000000
Workqueue: events_unbound flush_to_ldisc
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 flush_to_ldisc+0x39/0x400 drivers/tty/tty_buffer.c:499
 process_one_work+0x863/0x1600 kernel/workqueue.c:2114
 process_scheduled_works kernel/workqueue.c:2174 [inline]
 worker_thread+0x787/0x1050 kernel/workqueue.c:2253
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
INFO: task login:7181 blocked for more than 140 seconds.
      Not tainted 4.14.171-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
login           D25920  7181      1 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_timeout+0x93b/0xe10 kernel/time/timer.c:1723
 do_wait_for_common kernel/sched/completion.c:91 [inline]
 __wait_for_common kernel/sched/completion.c:112 [inline]
 wait_for_common kernel/sched/completion.c:123 [inline]
 wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
 flush_work+0x3eb/0x730 kernel/workqueue.c:2891
 tty_buffer_flush_work+0x16/0x20 drivers/tty/tty_buffer.c:612
 n_tty_read+0x813/0x17d0 drivers/tty/n_tty.c:2199
 tty_read+0x171/0x270 drivers/tty/tty_io.c:866
 __vfs_read+0x105/0x6a0 fs/read_write.c:411
 vfs_read+0x137/0x350 fs/read_write.c:447
 SYSC_read fs/read_write.c:574 [inline]
 SyS_read+0xfd/0x230 fs/read_write.c:567
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x7f94a3d26310
RSP: 002b:00007ffc72415fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f94a3d26310
RDX: 00000000000001ff RSI: 00007ffc72416250 RDI: 0000000000000000
RBP: 0000000000000000 R08: 00007f94a4609700 R09: 0000000000000000
R10: 00007ffc72415fa0 R11: 0000000000000246 R12: 00007ffc72416250
R13: 0000000000000000 R14: 0000000000000001 R15: 000000000060b798

Showing all locks held in the system:
3 locks held by kworker/u4:3/274:
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] work_static include/linux/workqueue.h:199 [inline]
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] process_one_work+0x76e/0x1600 kernel/workqueue.c:2085
 #1:  ((&buf->work)){+.+.}, at: [<ffffffff813cd5cb>] process_one_work+0x7ab/0x1600 kernel/workqueue.c:2089
 #2:  (&buf->lock){+.+.}, at: [<ffffffff834cc5a9>] flush_to_ldisc+0x39/0x400 drivers/tty/tty_buffer.c:499
1 lock held by khungtaskd/997:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff81484048>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
2 locks held by login/7181:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7182:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7183:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7184:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7185:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7186:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7187:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156

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

NMI backtrace for cpu 0
CPU: 0 PID: 997 Comm: khungtaskd Not tainted 4.14.171-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x142/0x197 lib/dump_stack.c:58
 nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5e7/0xb90 kernel/hung_task.c:274
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 7057 Comm: rs:main Q:Reg Not tainted 4.14.171-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a026e140 task.stack: ffff8880a0de0000
RIP: 0010:update_stack_state+0x6a/0x590 arch/x86/kernel/unwind_frame.c:210
RSP: 0018:ffff8880a0de75d0 EFLAGS: 00000046
RAX: 0000000000000000 RBX: ffff8880a0de7740 RCX: 1ffff110141bcee8
RDX: 1ffff110141bcf5c RSI: ffff8880a0de7af8 RDI: ffff8880a0de7740
RBP: ffff8880a0de7678 R08: 0000000000000001 R09: ffff8880a0de7798
R10: ffff8880a0de7768 R11: ffff8880a0de7778 R12: 1ffff110141bced6
R13: ffff8880a0de7740 R14: 1ffff110141bcec2 R15: ffff8880a0de7af8
FS:  00007fca3f48f700(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000023fd0e8 CR3: 00000000995b3000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 unwind_next_frame.part.0+0x188/0x8b0 arch/x86/kernel/unwind_frame.c:333
 unwind_next_frame+0x3b/0x50 arch/x86/kernel/unwind_frame.c:287
 __save_stack_trace+0x6b/0xd0 arch/x86/kernel/stacktrace.c:44
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x45/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x83/0x2b0 mm/slab.c:3758
 mempool_free_slab+0x1e/0x30 mm/mempool.c:457
 mempool_free+0xd4/0x1d0 mm/mempool.c:439
 bio_free+0x12b/0x1a0 block/bio.c:265
 bio_put+0x9d/0xc0 block/bio.c:558
 blkdev_issue_flush+0x288/0x330 block/blk-flush.c:541
 ext4_sync_file+0xa78/0x12d0 fs/ext4/fsync.c:157
 vfs_fsync_range+0x10e/0x260 fs/sync.c:196
 generic_write_sync include/linux/fs.h:2677 [inline]
 ext4_file_write_iter+0x68a/0xe90 fs/ext4/file.c:279
 call_write_iter include/linux/fs.h:1777 [inline]
 new_sync_write fs/read_write.c:469 [inline]
 __vfs_write+0x4a7/0x6b0 fs/read_write.c:482
 vfs_write+0x198/0x500 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xfd/0x230 fs/read_write.c:582
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x7fca40eed19d
RSP: 002b:00007fca3f48e000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000238 RCX: 00007fca40eed19d
RDX: 0000000000000238 RSI: 00000000023dfce0 RDI: 0000000000000002
RBP: 00000000023dfce0 R08: 6338363638666666 R09: 646c205d3e336133
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 00007fca3f48e480 R14: 000000000000000e R15: 00000000023dfae0
Code: 34 29 81 48 89 75 88 c7 01 f1 f1 f1 f1 c7 41 04 00 f3 f3 f3 48 89 f9 48 c1 e9 03 0f b6 04 01 84 c0 74 08 3c 03 0f 8e ef 03 00 00 <41> 8b 45 00 49 8d 7d 58 48 89 f9 48 c1 e9 03 89 85 7c ff ff ff 

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2020/02/24 11:01 linux-4.14.y 98db2bf27b9e 1253d6f0 .config log report
ci2-linux-4-14 2020/02/18 13:00 linux-4.14.y 98db2bf27b9e 012fbc32 .config log report
ci2-linux-4-14 2020/02/12 05:55 linux-4.14.y e0f8b8a65a47 a75b198c .config log report
ci2-linux-4-14 2020/02/10 16:53 linux-4.14.y e0f8b8a65a47 18847f55 .config log report
ci2-linux-4-14 2020/02/07 15:26 linux-4.14.y e0f8b8a65a47 06150bf1 .config log report
ci2-linux-4-14 2019/12/31 16:09 linux-4.14.y 4c5bf01e16a7 7f117e28 .config log report
ci2-linux-4-14 2019/12/18 13:00 linux-4.14.y bfb9e5c03076 64ca0a37 .config log report
ci2-linux-4-14 2019/12/15 22:41 linux-4.14.y a844dc4c5442 eef6e580 .config log report