[v6.1] INFO: task hung in lock_metapage

0 views
Skip to first unread message

syzbot

unread,
Apr 13, 2024, 1:49:26 AMApr 13
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bf1e3b1cb1e0 Linux 6.1.85
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1073402b180000
kernel config: https://syzkaller.appspot.com/x/.config?x=d3e21b90946dbbab
dashboard link: https://syzkaller.appspot.com/bug?extid=a9dcfad4f4f16393f167
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/75265c862e54/disk-bf1e3b1c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1d22ca40ea90/vmlinux-bf1e3b1c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a5fcb5ebd870/bzImage-bf1e3b1c.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a9dcfa...@syzkaller.appspotmail.com

INFO: task jfsCommit:132 blocked for more than 143 seconds.
Not tainted 6.1.85-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:jfsCommit state:D stack:26112 pid:132 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5245 [inline]
__schedule+0x142d/0x4550 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
io_schedule+0x88/0x100 kernel/sched/core.c:8786
__lock_metapage fs/jfs/jfs_metapage.c:50 [inline]
lock_metapage+0x250/0x370 fs/jfs/jfs_metapage.c:64
__get_metapage+0x50f/0x1040 fs/jfs/jfs_metapage.c:639
diIAGRead+0xcb/0x130 fs/jfs/jfs_imap.c:2669
diFree+0xa7a/0x2fb0 fs/jfs/jfs_imap.c:956
jfs_evict_inode+0x329/0x440 fs/jfs/inode.c:156
evict+0x2a4/0x620 fs/inode.c:666
txUpdateMap+0x825/0x9e0 fs/jfs/jfs_txnmgr.c:2367
txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline]
jfs_lazycommit+0x476/0xb60 fs/jfs/jfs_txnmgr.c:2732
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
INFO: task syz-executor.4:3569 blocked for more than 144 seconds.
Not tainted 6.1.85-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4 state:D stack:18840 pid:3569 ppid:1 flags:0x00004002
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5245 [inline]
__schedule+0x142d/0x4550 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
jfs_flush_journal+0x727/0xec0 fs/jfs/jfs_logmgr.c:1564
jfs_sync_fs+0x7c/0xa0 fs/jfs/super.c:684
sync_filesystem+0x1bc/0x220 fs/sync.c:66
generic_shutdown_super+0x6b/0x340 fs/super.c:474
kill_block_super+0x7a/0xe0 fs/super.c:1459
deactivate_locked_super+0xa0/0x110 fs/super.c:332
cleanup_mnt+0x490/0x520 fs/namespace.c:1186
task_work_run+0x246/0x300 kernel/task_work.c:179
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa73/0x26a0 kernel/exit.c:869
do_group_exit+0x202/0x2b0 kernel/exit.c:1019
__do_sys_exit_group kernel/exit.c:1030 [inline]
__se_sys_exit_group kernel/exit.c:1028 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f7ee007de69
RSP: 002b:00007fff0cd9e5d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f7ee00c93de RCX: 00007f7ee007de69
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000002 R08: 00007fff0cd9c377 R09: 00007fff0cd9f890
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff0cd9f890
R13: 00007f7ee00c93b9 R14: 0000000000010430 R15: 0000000000000002
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d12ae10 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8d12b610 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
#0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by jfsCommit/132:
#0: ffff88807b3b8920 (&(imap->im_aglock[index])){+.+.}-{3:3}, at: diFree+0x378/0x2fb0 fs/jfs/jfs_imap.c:886
#1: ffff8880593a2638 (&jfs_ip->rdwrlock/1){.+.+}-{3:3}, at: diFree+0x394/0x2fb0 fs/jfs/jfs_imap.c:891
1 lock held by udevd/3003:
2 locks held by getty/3299:
#0: ffff8880295b1098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
#1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
1 lock held by syz-executor.2/3563:
1 lock held by syz-executor.4/3569:
#0: ffff88807a7480e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: deactivate_super+0xa9/0xe0 fs/super.c:362
2 locks held by kworker/u4:8/6276:
1 lock held by syz-executor.0/7556:
1 lock held by syz-executor.3/7568:
3 locks held by syz-executor.1/7599:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.85-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
watchdog+0xf88/0xfd0 kernel/hung_task.c:377
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 6600 Comm: kworker/1:15 Not tainted 6.1.85-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: events free_obj_work
RIP: 0010:stack_trace_consume_entry+0x33/0x270 kernel/stacktrace.c:86
Code: 53 48 83 ec 18 48 89 fb 48 ba 00 00 00 00 00 fc ff df 4c 8d 4f 10 4d 89 cf 49 c1 ef 03 41 0f b6 04 17 84 c0 0f 85 02 01 00 00 <44> 8b 43 10 48 8d 6b 08 49 89 ec 49 c1 ec 03 41 0f b6 04 14 84 c0
RSP: 0018:ffffc9000359f690 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc9000359f7c0 RCX: ffffffff8fb0e000
RDX: dffffc0000000000 RSI: ffffffff815ac9f9 RDI: ffffc9000359f7c0
RBP: ffffc9000359f770 R08: ffffc9000359fc50 R09: ffffc9000359f7d0
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88807c308000
R13: ffffffff817851c0 R14: ffffc9000359f7c0 R15: 1ffff920006b3efa
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f884b2d56c6 CR3: 000000001a3b7000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
arch_stack_walk+0x101/0x140 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
kmem_cache_free+0x292/0x510 mm/slub.c:3683
free_obj_work+0x4fb/0x6d0 lib/debugobjects.c:331
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Apr 25, 2024, 9:05:23 PM (8 days ago) Apr 25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 6741e066ec76 Linux 6.1.87
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1548bd27180000
kernel config: https://syzkaller.appspot.com/x/.config?x=3fc2f61bd0ae457
dashboard link: https://syzkaller.appspot.com/bug?extid=a9dcfad4f4f16393f167
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1543f96b180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=102acd6b180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b606a22ddf4b/disk-6741e066.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e31c21737449/vmlinux-6741e066.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ee0cb8c049e9/bzImage-6741e066.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/40c0d7f5f814/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a9dcfa...@syzkaller.appspotmail.com

INFO: task jfsCommit:132 blocked for more than 143 seconds.
Not tainted 6.1.87-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:jfsCommit state:D stack:26104 pid:132 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5245 [inline]
__schedule+0x142d/0x4550 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
io_schedule+0x88/0x100 kernel/sched/core.c:8786
__lock_metapage fs/jfs/jfs_metapage.c:50 [inline]
lock_metapage+0x250/0x370 fs/jfs/jfs_metapage.c:64
__get_metapage+0x50f/0x1040 fs/jfs/jfs_metapage.c:639
diIAGRead+0xcb/0x130 fs/jfs/jfs_imap.c:2669
diFree+0xa7a/0x2fb0 fs/jfs/jfs_imap.c:956
jfs_evict_inode+0x329/0x440 fs/jfs/inode.c:156
evict+0x2a4/0x620 fs/inode.c:666
txUpdateMap+0x825/0x9e0 fs/jfs/jfs_txnmgr.c:2367
txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline]
jfs_lazycommit+0x476/0xb60 fs/jfs/jfs_txnmgr.c:2732
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
INFO: task jfsCommit:133 blocked for more than 143 seconds.
Not tainted 6.1.87-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:jfsCommit state:D stack:26112 pid:133 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5245 [inline]
__schedule+0x142d/0x4550 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
io_schedule+0x88/0x100 kernel/sched/core.c:8786
__lock_metapage fs/jfs/jfs_metapage.c:50 [inline]
lock_metapage+0x250/0x370 fs/jfs/jfs_metapage.c:64
__get_metapage+0x50f/0x1040 fs/jfs/jfs_metapage.c:639
diIAGRead+0xcb/0x130 fs/jfs/jfs_imap.c:2669
diFree+0xa7a/0x2fb0 fs/jfs/jfs_imap.c:956
jfs_evict_inode+0x329/0x440 fs/jfs/inode.c:156
evict+0x2a4/0x620 fs/inode.c:666
txUpdateMap+0x825/0x9e0 fs/jfs/jfs_txnmgr.c:2367
txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline]
jfs_lazycommit+0x476/0xb60 fs/jfs/jfs_txnmgr.c:2732
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d12ae50 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8d12b650 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
#0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by jfsCommit/132:
#0: ffff888076db0920 (&(imap->im_aglock[index])){+.+.}-{3:3}, at: diFree+0x378/0x2fb0 fs/jfs/jfs_imap.c:886
#1: ffff88806fd3d478 (&jfs_ip->rdwrlock/1){.+.+}-{3:3}, at: diFree+0x394/0x2fb0 fs/jfs/jfs_imap.c:891
2 locks held by jfsCommit/133:
#0: ffff888077e10920 (&(imap->im_aglock[index])){+.+.}-{3:3}, at: diFree+0x378/0x2fb0 fs/jfs/jfs_imap.c:886
#1: ffff88806fd3cb38 (&jfs_ip->rdwrlock/1){.+.+}-{3:3}, at: diFree+0x394/0x2fb0 fs/jfs/jfs_imap.c:891
2 locks held by getty/3304:
#0: ffff88814bbf6098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
#1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
watchdog+0xf88/0xfd0 kernel/hung_task.c:377
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3598 Comm: kworker/u4:2 Not tainted 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
RIP: 0010:static_key_false include/linux/jump_label.h:207 [inline]
RIP: 0010:native_write_msr arch/x86/include/asm/msr.h:147 [inline]
RIP: 0010:wrmsrl arch/x86/include/asm/msr.h:262 [inline]
RIP: 0010:native_x2apic_icr_write arch/x86/include/asm/apic.h:239 [inline]
RIP: 0010:__x2apic_send_IPI_dest arch/x86/kernel/apic/x2apic_phys.c:126 [inline]
RIP: 0010:x2apic_send_IPI+0x77/0xd0 arch/x86/kernel/apic/x2apic_phys.c:48
Code: 48 c1 e8 03 42 0f b6 04 38 84 c0 75 26 0f b7 13 0f ae f0 0f ae e8 41 83 fe 02 b8 00 04 00 00 41 0f 45 c6 b9 30 08 00 00 0f 30 <66> 90 5b 41 5e 41 5f 5d c3 89 d9 80 e1 07 fe c1 38 c1 7c cf 48 89
RSP: 0018:ffffc90003c7f4b8 EFLAGS: 00000206
RAX: 00000000000000fb RBX: ffff8880b98219b0 RCX: 0000000000000830
RDX: 0000000000000000 RSI: 00000000000000fb RDI: 0000000000000000
RBP: ffffffff8cb12860 R08: ffffffff817f4c1b R09: ffffed101732775b
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 1ffff9200078fea0 R14: 00000000000000fb R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005591fd700680 CR3: 000000000ce8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
arch_send_call_function_single_ipi arch/x86/include/asm/smp.h:109 [inline]
send_call_function_single_ipi+0x188/0x260 kernel/sched/core.c:3786
smp_call_function_many_cond+0x1bf1/0x3460 kernel/smp.c:978
on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1166
on_each_cpu include/linux/smp.h:71 [inline]
text_poke_sync arch/x86/kernel/alternative.c:1334 [inline]
text_poke_bp_batch+0x5f9/0x940 arch/x86/kernel/alternative.c:1596
text_poke_flush arch/x86/kernel/alternative.c:1725 [inline]
text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1732
arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
static_key_disable_cpuslocked+0xca/0x1b0 kernel/jump_label.c:207
static_key_disable+0x16/0x20 kernel/jump_label.c:215
toggle_allocation_gate+0x3e0/0x480 mm/kfence/core.c:818
process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 2.009 msecs


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages