[btrfs?] INFO: task hung in btrfs_alloc_tree_block

5 views
Skip to first unread message

syzbot

unread,
Dec 23, 2022, 12:53:45 AM12/23/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16e0d274480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=160fb6436674c067e775
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz

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

wlan1: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
wlan1: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
INFO: task syz-executor.4:8189 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 D23688 8189 1 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
btrfs_tree_lock+0x4fe/0x810 fs/btrfs/locking.c:233
btrfs_init_new_buffer fs/btrfs/extent-tree.c:8145 [inline]
btrfs_alloc_tree_block+0x9b1/0x15f0 fs/btrfs/extent-tree.c:8284
alloc_tree_block_no_bg_flush+0x1b6/0x250 fs/btrfs/ctree.c:1039
__btrfs_cow_block+0x3c7/0x10a0 fs/btrfs/ctree.c:1094
btrfs_cow_block+0x276/0x840 fs/btrfs/ctree.c:1557
btrfs_search_slot+0x66a/0x1ee0 fs/btrfs/ctree.c:2881
btrfs_update_root+0xc9/0x6b0 fs/btrfs/root-tree.c:134
commit_fs_roots+0x3b5/0x530 fs/btrfs/transaction.c:1286
btrfs_commit_transaction+0x8ca/0x2480 fs/btrfs/transaction.c:2178
btrfs_sync_fs+0x120/0x490 fs/btrfs/super.c:1279
__sync_filesystem fs/sync.c:39 [inline]
sync_filesystem+0x1b5/0x250 fs/sync.c:67
generic_shutdown_super+0x70/0x370 fs/super.c:442
kill_anon_super+0x36/0x60 fs/super.c:1032
btrfs_kill_super+0x49/0x550 fs/btrfs/super.c:2221
deactivate_locked_super+0x94/0x160 fs/super.c:329
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
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:0x7f9031457517
Code: Bad RIP value.
RSP: 002b:00007fff36fd7ec8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f9031457517
RDX: 00007fff36fd7f9a RSI: 000000000000000a RDI: 00007fff36fd7f90
RBP: 00007fff36fd7f90 R08: 00000000ffffffff R09: 00007fff36fd7d60
R10: 00005555572e98e3 R11: 0000000000000246 R12: 00007f90314b0b24
R13: 00007fff36fd9050 R14: 00005555572e9810 R15: 00007fff36fd9090

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
#0: 000000008d89df4e (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
3 locks held by syz-executor.4/8189:
#0: 00000000b76231dd (&type->s_umount_key#55){+.+.}, at: deactivate_super+0x16c/0x1a0 fs/super.c:359
#1: 000000006ee3e683 (&fs_info->reloc_mutex){+.+.}, at: btrfs_commit_transaction+0x80b/0x2480 fs/btrfs/transaction.c:2120
#2: 000000009663e160 (&fs_info->tree_log_mutex){+.+.}, at: btrfs_commit_transaction+0x8c2/0x2480 fs/btrfs/transaction.c:2176
1 lock held by btrfs-transacti/17687:
#0: 000000004ca6129b (&fs_info->transaction_kthread_mutex){+.+.}, at: transaction_kthread+0xfa/0x490 fs/btrfs/disk-io.c:1765

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

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 10/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 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60


---
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.

syzbot

unread,
Dec 31, 2022, 11:23:44 AM12/31/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=104f29a2480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=160fb6436674c067e775
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=167b18e0480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12f5dc34480000
mounted in repro: https://storage.googleapis.com/syzbot-assets/16be7ef18afb/mount_0.gz

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

RDX: 0000000020000500 RSI: 00000000200000c0 RDI: 0000000020000040
RBP: 00007ffd3ad9da10 R08: 0000000000000000 R09: 00007ffd3ad9da20
R10: 0000000000000024 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffd3ad9da50 R14: 00007ffd3ad9da30 R15: 0000000000000000
INFO: task syz-executor850:8095 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-executor850 D27944 8095 8093 0x00000000
RIP: 0033:0x7f4a189bee07
Code: Bad RIP value.
RSP: 002b:00007ffd3ad9c8f8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f4a189bee07
RDX: 00007ffd3ad9c9b9 RSI: 000000000000000a RDI: 00007ffd3ad9c9b0
RBP: 00007ffd3ad9c9b0 R08: 00000000ffffffff R09: 00007ffd3ad9c790
R10: 00005555570c1683 R11: 0000000000000202 R12: 00007ffd3ad9da30
R13: 00005555570c15f0 R14: 00007ffd3ad9c920 R15: 0000000000000001

Showing all locks held in the system:
1 lock held by khungtaskd/1572:
#0: 00000000e5bded73 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7779:
#0: 0000000060280a2d (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
3 locks held by syz-executor850/8095:
#0: 0000000094d51bf5 (&type->s_umount_key#47){+.+.}, at: deactivate_super+0x16c/0x1a0 fs/super.c:359
#1: 00000000400a96fd (&fs_info->reloc_mutex){+.+.}, at: btrfs_commit_transaction+0x80b/0x2480 fs/btrfs/transaction.c:2120
#2: 00000000729c1ffc (&fs_info->tree_log_mutex){+.+.}, at: btrfs_commit_transaction+0x8c2/0x2480 fs/btrfs/transaction.c:2176
1 lock held by btrfs-transacti/8125:
#0: 00000000f0fd5e02 (&fs_info->transaction_kthread_mutex){+.+.}, at: transaction_kthread+0xfa/0x490 fs/btrfs/disk-io.c:1765

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

NMI backtrace for cpu 0
CPU: 0 PID: 1572 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/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: 4694 Comm: systemd-journal Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__sanitizer_cov_trace_pc+0x22/0x50 kernel/kcov.c:101
Code: 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 00 01 1f 00 75 2b 8b 90 60 13 00 00 <83> fa 02 75 20 48 8b 88 68 13 00 00 8b 80 64 13 00 00 48 8b 11 48
RSP: 0018:ffff8880a0fbfa28 EFLAGS: 00000246
RAX: ffff8880a0fb6600 RBX: dffffc0000000000 RCX: ffffffff816c5cc8
RDX: 0000000000000000 RSI: ffffffff816c36e5 RDI: ffffc90001b2e072
RBP: ffff8880a0fbfb00 R08: 0000000000000000 R09: 0000000000000027
R10: 0000000000000006 R11: 0000000000000000 R12: ffffffff886fb460
R13: ffffed10141f7f62 R14: ffffc90001b2e1e0 R15: 0000000040000000
FS: 00007fe35bb858c0(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe358ec7000 CR3: 00000000a08cd000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
___bpf_prog_run+0x45/0x4e80 kernel/bpf/core.c:1065

Reply all
Reply to author
Forward
0 new messages