syzbot


INFO: task hung in blk_trace_remove

Status: upstream: reported on 2022/03/20 01:50
Reported-by: syzbot+687f1ebaf6c126e410bd@syzkaller.appspotmail.com
First crash: 104d, last: 104d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in blk_trace_remove 1 837d 832d 0/22 auto-closed as invalid on 2020/07/14 22:05
upstream INFO: task can't die in reclaim_throttle C error 76 198d 205d 0/22 upstream: reported C repro on 2021/12/09 00:52

Sample crash report:
ieee802154 phy1 wpan1: encryption failed: -22
Bluetooth: hci2: command 0x0406 tx timeout
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
Bluetooth: hci4: command 0x0406 tx timeout
INFO: task syz-executor.4:22683 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  D28256 22683   8119 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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 blk_trace_remove+0x1e/0x40 kernel/trace/blktrace.c:365
 sg_ioctl+0x37b/0x2720 drivers/scsi/sg.c:1130
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fcfe5517049
Code: Bad RIP value.
RSP: 002b:00007fcfe3e6b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcfe562a030 RCX: 00007fcfe5517049
RDX: 0000000000000000 RSI: 0000000000001276 RDI: 0000000000000005
RBP: 00007fcfe557108d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffebb5797f R14: 00007fcfe3e6b300 R15: 0000000000022000
INFO: task syz-executor.4:22692 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  D28272 22692   8119 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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 blk_trace_setup+0x2f/0x60 kernel/trace/blktrace.c:626
 sg_ioctl+0x270/0x2720 drivers/scsi/sg.c:1121
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fcfe5517049
Code: Bad RIP value.
RSP: 002b:00007fcfe3e4a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcfe562a100 RCX: 00007fcfe5517049
RDX: 0000000020000140 RSI: 00000000c0481273 RDI: 0000000000000005
RBP: 00007fcfe557108d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffebb5797f R14: 00007fcfe3e4a300 R15: 0000000000022000
INFO: task syz-executor.4:22700 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  D29728 22700   8119 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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 blk_trace_startstop+0x21/0x40 kernel/trace/blktrace.c:714
 sg_ioctl+0x201d/0x2720 drivers/scsi/sg.c:1126
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fcfe5517049
Code: Bad RIP value.
RSP: 002b:00007fcfe3e29168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcfe562a1d0 RCX: 00007fcfe5517049
RDX: 0000000000000000 RSI: 0000000000001274 RDI: 0000000000000004
RBP: 00007fcfe557108d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffebb5797f R14: 00007fcfe3e29300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
 #0: 00000000a1355130 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
3 locks held by kswapd0/1968:
2 locks held by agetty/7799:
 #0: 00000000b81b1157 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 000000003862b4bd (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x217/0x1950 drivers/tty/n_tty.c:2154
1 lock held by systemd-journal/22076:
 #0: 00000000ec182eb9 (fs_reclaim){+.+.}, at: fs_reclaim_release mm/page_alloc.c:3778 [inline]
 #0: 00000000ec182eb9 (fs_reclaim){+.+.}, at: fs_reclaim_release mm/page_alloc.c:3774 [inline]
 #0: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __perform_reclaim mm/page_alloc.c:3805 [inline]
 #0: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:3821 [inline]
 #0: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __alloc_pages_slowpath mm/page_alloc.c:4211 [inline]
 #0: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __alloc_pages_nodemask+0x191e/0x2890 mm/page_alloc.c:4419
3 locks held by in:imklog/22079:
 #0: 0000000050bb89b1 (&mm->mmap_sem){++++}, at: __do_page_fault+0x398/0xd60 arch/x86/mm/fault.c:1341
 #1: 000000000481fdaa (&ei->i_mmap_sem){++++}, at: ext4_filemap_fault+0x7c/0xb0 fs/ext4/inode.c:6378
 #2: 00000000ec182eb9 (fs_reclaim){+.+.}, at: fs_reclaim_release mm/page_alloc.c:3778 [inline]
 #2: 00000000ec182eb9 (fs_reclaim){+.+.}, at: fs_reclaim_release mm/page_alloc.c:3774 [inline]
 #2: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __perform_reclaim mm/page_alloc.c:3805 [inline]
 #2: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:3821 [inline]
 #2: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __alloc_pages_slowpath mm/page_alloc.c:4211 [inline]
 #2: 00000000ec182eb9 (fs_reclaim){+.+.}, at: __alloc_pages_nodemask+0x191e/0x2890 mm/page_alloc.c:4419
3 locks held by syz-executor.4/22661:
 #0: 000000008480ab13 (&q->blk_trace_mutex){+.+.}, at: blk_trace_setup+0x2f/0x60 kernel/trace/blktrace.c:626
 #1: 00000000bc5f4dcc (relay_channels_mutex){+.+.}, at: relay_open kernel/relay.c:603 [inline]
 #1: 00000000bc5f4dcc (relay_channels_mutex){+.+.}, at: relay_open+0x3ce/0x9f0 kernel/relay.c:564
 #2: 00000000ccc70e19 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #2: 00000000ccc70e19 (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
1 lock held by syz-executor.4/22683:
 #0: 000000008480ab13 (&q->blk_trace_mutex){+.+.}, at: blk_trace_remove+0x1e/0x40 kernel/trace/blktrace.c:365
1 lock held by syz-executor.4/22692:
 #0: 000000008480ab13 (&q->blk_trace_mutex){+.+.}, at: blk_trace_setup+0x2f/0x60 kernel/trace/blktrace.c:626
1 lock held by syz-executor.4/22700:
 #0: 000000008480ab13 (&q->blk_trace_mutex){+.+.}, at: blk_trace_startstop+0x21/0x40 kernel/trace/blktrace.c:714

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

NMI backtrace for cpu 1
CPU: 1 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
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 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 22661 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__lock_release kernel/locking/lockdep.c:3662 [inline]
RIP: 0010:lock_release+0x1a3/0x8b0 kernel/locking/lockdep.c:3927
Code: c7 c0 60 f1 45 8a 48 ba 00 00 00 00 00 fc ff df 48 89 c1 83 e0 07 48 c1 e9 03 83 c0 03 0f b6 14 11 65 4c 8b 34 25 c0 df 01 00 <38> d0 7c 08 84 d2 0f 85 1b 06 00 00 44 8b 0d ba a5 fa 08 45 85 c9
RSP: 0000:ffff8880ba007df8 EFLAGS: 00000006
RAX: 0000000000000003 RBX: ffff8880a8d80340 RCX: 1ffffffff148be2c
RDX: 0000000000000004 RSI: 0000000000000002 RDI: ffff8880a8d80bc4
RBP: ffffffff89f95488 R08: ffffffff8cd3da60 R09: 0000000000000006
R10: 0000000000000000 R11: ffffffff8c66501b R12: 1ffff11017400fc2
R13: ffffffff815444c8 R14: ffff8880a8d80340 R15: 0000000000000000
FS:  00007fcfe3e8c700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000b162d8 CR3: 00000000a9912000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 seqcount_lockdep_reader_access include/linux/seqlock.h:82 [inline]
 read_seqcount_begin include/linux/seqlock.h:164 [inline]
 ktime_get_update_offsets_now+0xe3/0x460 kernel/time/timekeeping.c:2225
 hrtimer_update_base kernel/time/hrtimer.c:621 [inline]
 hrtimer_interrupt+0x138/0x9e0 kernel/time/hrtimer.c:1567
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1071 [inline]
 smp_apic_timer_interrupt+0x10c/0x550 arch/x86/kernel/apic/apic.c:1096
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline]
RIP: 0010:lock_is_held_type+0x17a/0x210 kernel/locking/lockdep.c:3948
Code: 00 00 00 00 fc ff df c7 85 84 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 75 63 48 83 3d 45 cc a6 08 00 74 2c 48 89 df 57 9d <0f> 1f 44 00 00 48 83 c4 08 44 89 e0 5b 5d 41 5c c3 48 83 c4 08 41
RSP: 0000:ffff8880aab37198 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff13e3051 RBX: 0000000000000286 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 00000000ffffffff RDI: 0000000000000286
RBP: ffff8880a8d80340 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000001
R13: ffffffffffffffff R14: ffff8880aab37304 R15: ffff8880b59f68c0
 list_lru_from_memcg_idx mm/list_lru.c:51 [inline]
 list_lru_count_one+0x252/0x360 mm/list_lru.c:190
 list_lru_shrink_count include/linux/list_lru.h:123 [inline]
 super_cache_count+0x1b4/0x2e0 fs/super.c:145
 do_shrink_slab+0x10b/0xa40 mm/vmscan.c:464
 shrink_slab+0x16f/0x550 mm/vmscan.c:693
 shrink_node.isra.0+0x2d3/0x1300 mm/vmscan.c:2748
 shrink_zones mm/vmscan.c:2977 [inline]
 do_try_to_free_pages+0x38e/0xfe0 mm/vmscan.c:3035
 try_to_free_pages+0x27f/0x7c0 mm/vmscan.c:3251
 __perform_reclaim mm/page_alloc.c:3800 [inline]
 __alloc_pages_direct_reclaim mm/page_alloc.c:3821 [inline]
 __alloc_pages_slowpath mm/page_alloc.c:4211 [inline]
 __alloc_pages_nodemask+0xcc8/0x2890 mm/page_alloc.c:4419
 alloc_pages_current+0x193/0x2a0 mm/mempolicy.c:2197
 alloc_pages include/linux/gfp.h:532 [inline]
 relay_alloc_buf kernel/relay.c:136 [inline]
 relay_create_buf kernel/relay.c:177 [inline]
 relay_open_buf.part.0+0x2a8/0xb80 kernel/relay.c:453
 relay_open_buf kernel/relay.c:450 [inline]
 relay_open kernel/relay.c:605 [inline]
 relay_open+0x537/0x9f0 kernel/relay.c:564
 do_blk_trace_setup+0x4f6/0xb40 kernel/trace/blktrace.c:566
 __blk_trace_setup+0xca/0x180 kernel/trace/blktrace.c:609
 blk_trace_setup+0x43/0x60 kernel/trace/blktrace.c:627
 sg_ioctl+0x270/0x2720 drivers/scsi/sg.c:1121
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fcfe5517049
Code: Bad RIP value.
RSP: 002b:00007fcfe3e8c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcfe5629f60 RCX: 00007fcfe5517049
RDX: 00000000200002c0 RSI: 00000000c0481273 RDI: 0000000000000004
RBP: 00007fcfe557108d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffebb5797f R14: 00007fcfe3e8c300 R15: 0000000000022000
----------------
Code disassembly (best guess):
   0:	c7 c0 60 f1 45 8a    	mov    $0x8a45f160,%eax
   6:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
   d:	fc ff df
  10:	48 89 c1             	mov    %rax,%rcx
  13:	83 e0 07             	and    $0x7,%eax
  16:	48 c1 e9 03          	shr    $0x3,%rcx
  1a:	83 c0 03             	add    $0x3,%eax
  1d:	0f b6 14 11          	movzbl (%rcx,%rdx,1),%edx
  21:	65 4c 8b 34 25 c0 df 	mov    %gs:0x1dfc0,%r14
  28:	01 00
* 2a:	38 d0                	cmp    %dl,%al <-- trapping instruction
  2c:	7c 08                	jl     0x36
  2e:	84 d2                	test   %dl,%dl
  30:	0f 85 1b 06 00 00    	jne    0x651
  36:	44 8b 0d ba a5 fa 08 	mov    0x8faa5ba(%rip),%r9d        # 0x8faa5f7
  3d:	45 85 c9             	test   %r9d,%r9d

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-19 2022/03/20 01:49 linux-4.19.y 3f8a27f9e27b e2d91b1d .config log report info INFO: task hung in blk_trace_remove