syzbot


INFO: task hung in n_tty_read (2)

Status: auto-obsoleted due to no activity on 2023/01/25 23:32
Reported-by: syzbot+d41fb567443734f625df@syzkaller.appspotmail.com
First crash: 787d, last: 787d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: task hung in n_tty_read 6 1732d 1772d 0/1 auto-closed as invalid on 2020/06/25 03:18
android-44 INFO: task hung in n_tty_read 1 1883d 1883d 0/2 auto-closed as invalid on 2020/01/25 18:14
upstream INFO: task hung in n_tty_read (2) usb serial input C error 1 1327d 1323d 0/28 auto-obsoleted due to no activity on 2023/04/25 23:58
upstream INFO: task hung in n_tty_read serial 3 1749d 1803d 0/28 auto-closed as invalid on 2020/05/09 10:39
linux-4.14 INFO: task hung in n_tty_read (2) 1 1307d 1307d 0/1 auto-closed as invalid on 2021/08/24 04:16
linux-4.19 INFO: task hung in n_tty_read 2 1788d 1799d 0/1 auto-closed as invalid on 2020/04/29 17:03

Sample crash report:
INFO: task syz-executor.4:24998 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.4  D29184 24998   8110 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 do_wait_for_common kernel/sched/completion.c:83 [inline]
 __wait_for_common kernel/sched/completion.c:104 [inline]
 wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
 __flush_work+0x4bb/0x8b0 kernel/workqueue.c:2926
 n_tty_read+0xabc/0x1950 drivers/tty/n_tty.c:2197
 tty_read+0x183/0x290 drivers/tty/tty_io.c:867
 __vfs_read+0xf7/0x750 fs/read_write.c:416
 vfs_read+0x194/0x3c0 fs/read_write.c:452
 ksys_read+0x12b/0x2a0 fs/read_write.c:579
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fd898bd1669
Code: Bad RIP value.
RSP: 002b:00007fd897503168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fd898cf3120 RCX: 00007fd898bd1669
RDX: 0000000000002020 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007fd898c2c560 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffefeefa6f R14: 00007fd897503300 R15: 0000000000022000

Showing all locks held in the system:
2 locks held by ksoftirqd/0/9:
 #0: 00000000e01cf653 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 00000000e01cf653 (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000731a6c29 (&obj_hash[i].lock){-.-.}, at: __debug_check_no_obj_freed lib/debugobjects.c:776 [inline]
 #1: 00000000731a6c29 (&obj_hash[i].lock){-.-.}, at: debug_check_no_obj_freed+0xb5/0x490 lib/debugobjects.c:817
1 lock held by khungtaskd/1570:
 #0: 00000000908350db (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7765:
 #0: 00000000382a188f (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
5 locks held by kworker/u4:8/10476:
2 locks held by agetty/6668:
 #0: 000000009cc682e2 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 000000009724164f (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x217/0x1950 drivers/tty/n_tty.c:2154
2 locks held by syz-executor.4/24998:
 #0: 000000002010f411 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 000000008c40b9fa (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x217/0x1950 drivers/tty/n_tty.c:2154
2 locks held by syz-executor.3/30984:
 #0: 00000000c0747967 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 000000008d5c0e43 (&tty->atomic_write_lock){+.+.}, at: tty_write_lock drivers/tty/tty_io.c:886 [inline]
 #1: 000000008d5c0e43 (&tty->atomic_write_lock){+.+.}, at: do_tty_write drivers/tty/tty_io.c:909 [inline]
 #1: 000000008d5c0e43 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 drivers/tty/tty_io.c:1044
2 locks held by syz-executor.0/30982:
 #0: 000000005236f785 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 0000000081d1cbba (&tty->atomic_write_lock){+.+.}, at: tty_write_lock drivers/tty/tty_io.c:886 [inline]
 #1: 0000000081d1cbba (&tty->atomic_write_lock){+.+.}, at: do_tty_write drivers/tty/tty_io.c:909 [inline]
 #1: 0000000081d1cbba (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 drivers/tty/tty_io.c:1044
2 locks held by syz-executor.2/30999:
 #0: 00000000a1fa8c7c (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 00000000f70116d9 (&tty->atomic_write_lock){+.+.}, at: tty_write_lock drivers/tty/tty_io.c:886 [inline]
 #1: 00000000f70116d9 (&tty->atomic_write_lock){+.+.}, at: do_tty_write drivers/tty/tty_io.c:909 [inline]
 #1: 00000000f70116d9 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 drivers/tty/tty_io.c:1044

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

NMI backtrace for cpu 0
CPU: 0 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 30989 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x50 kernel/kcov.c:97
Code: ff 48 89 df e8 11 dd 35 00 e9 ab fe ff ff 4c 89 ef e8 04 dd 35 00 e9 23 fe ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <48> 8b 34 24 65 48 8b 04 25 c0 df 01 00 65 8b 15 cc 59 9f 7e 81 e2
RSP: 0018:ffff8880191ef700 EFLAGS: 00000202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff8880937f4a44
RBP: ffffea00011b22c0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: dead000000000100 R15: 00007fbba2840000
FS:  0000000000000000(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f50e7703000 CR3: 0000000009e6d000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 debug_smp_processor_id+0x5/0x20 lib/smp_processor_id.c:56
 rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:348 [inline]
 rcu_is_watching+0x12/0xc0 kernel/rcu/tree.c:1025
 rcu_read_unlock include/linux/rcupdate.h:677 [inline]
 __unlock_page_memcg+0x72/0x100 mm/memcontrol.c:1955
 page_remove_rmap+0xe5/0x120 mm/rmap.c:1297
 zap_pte_range mm/memory.c:1350 [inline]
 zap_pmd_range mm/memory.c:1463 [inline]
 zap_pud_range mm/memory.c:1492 [inline]
 zap_p4d_range mm/memory.c:1513 [inline]
 unmap_page_range+0x147d/0x2c50 mm/memory.c:1534
 unmap_single_vma+0x198/0x300 mm/memory.c:1579
 unmap_vmas+0xa9/0x180 mm/memory.c:1609
 exit_mmap+0x2b9/0x530 mm/mmap.c:3093
 __mmput kernel/fork.c:1016 [inline]
 mmput+0x14e/0x4a0 kernel/fork.c:1037
 exit_mm kernel/exit.c:549 [inline]
 do_exit+0xaec/0x2be0 kernel/exit.c:857
 do_group_exit+0x125/0x310 kernel/exit.c:967
 get_signal+0x3f2/0x1f70 kernel/signal.c:2589
 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fbba3038669
Code: Bad RIP value.
RSP: 002b:00007fbba198b218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007fbba315a058 RCX: 00007fbba3038669
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fbba315a058
RBP: 00007fbba315a050 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbba315a05c
R13: 00007fff72283fbf R14: 00007fbba198b300 R15: 0000000000022000

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/27 23:32 linux-4.19.y 3f8a27f9e27b 10323ddf .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in n_tty_read
* Struck through repros no longer work on HEAD.