syzbot


WARNING in btrfs_release_global_block_rsv

Status: upstream: reported C repro on 2023/09/29 10:43
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+10e8dae9863cb83db623@syzkaller.appspotmail.com
First crash: 200d, last: 87d
Cause bisection: introduced by (bisect log) :
commit c18e3235646a8ba74d013067a6475c8d262d3776
Author: Josef Bacik <josef@toxicpanda.com>
Date: Thu Dec 2 20:34:32 2021 +0000

  btrfs: reserve extra space for the free space tree

Crash: WARNING in btrfs_release_global_block_rsv (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit a6a8f22a4af6c572d9e01ca9f7b515bf0cbb63b1
Author: Josef Bacik <josef@toxicpanda.com>
Date: Wed Nov 22 17:17:40 2023 +0000

  btrfs: move space cache settings into open_ctree

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] WARNING in btrfs_release_global_block_rsv 0 (4) 2024/02/24 09:37
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 WARNING in btrfs_release_global_block_rsv 1 369d 369d 0/3 auto-obsoleted due to no activity on 2023/08/07 13:28
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/12/09 18:28 12m retest repro upstream report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/02/24 05:29 4h07m bisect fix upstream job log (1)
2024/01/08 18:41 1h20m bisect fix upstream job log (0) log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5065 at fs/btrfs/block-rsv.c:459 btrfs_release_global_block_rsv+0x24f/0x270 fs/btrfs/block-rsv.c:459
Modules linked in:
CPU: 0 PID: 5065 Comm: syz-executor138 Not tainted 6.7.0-rc1-syzkaller-00304-g23dfa043f6d5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:btrfs_release_global_block_rsv+0x24f/0x270 fs/btrfs/block-rsv.c:459
Code: 0f 0b 90 e9 e6 fe ff ff e8 4e d0 d6 fd 90 0f 0b 90 e9 10 ff ff ff e8 40 d0 d6 fd 90 0f 0b 90 e9 3a ff ff ff e8 32 d0 d6 fd 90 <0f> 0b 90 e9 6b ff ff ff e8 24 d0 d6 fd 90 0f 0b 90 eb 8d 66 2e 0f
RSP: 0018:ffffc90003c779f8 EFLAGS: 00010293
RAX: ffffffff83b7ae7e RBX: 000000000005e000 RCX: ffff888075723b80
RDX: 0000000000000000 RSI: 000000000005e000 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffff83b7ade4 R09: 1ffff110280edd00
R10: dffffc0000000000 R11: ffffed10280edd01 R12: ffff88814076e000
R13: ffff88814076e058 R14: ffff88801ed3c418 R15: dffffc0000000000
FS:  0000555556ab23c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055f2b88cc448 CR3: 000000001ab8c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_free_block_groups+0xc39/0x1070 fs/btrfs/block-group.c:4366
 close_ctree+0x75a/0xd40 fs/btrfs/disk-io.c:4389
 generic_shutdown_super+0x13a/0x2c0 fs/super.c:696
 kill_anon_super+0x3b/0x70 fs/super.c:1295
 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2097
 deactivate_locked_super+0xc1/0x130 fs/super.c:484
 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1256
 task_work_run+0x24a/0x300 kernel/task_work.c:180
 ptrace_notify+0x2cd/0x380 kernel/signal.c:2399
 ptrace_report_syscall include/linux/ptrace.h:411 [inline]
 ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline]
 syscall_exit_work kernel/entry/common.c:251 [inline]
 syscall_exit_to_user_mode_prepare kernel/entry/common.c:278 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x168/0x2a0 kernel/entry/common.c:296
 do_syscall_64+0x52/0x110 arch/x86/entry/common.c:88
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f7262b90fa7
Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffd1c915058 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f7262b90fa7
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffd1c915110
RBP: 00007ffd1c915110 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffd1c9161c0
R13: 0000555556ab3700 R14: 431bde82d7b634db R15: 00007ffd1c916164
 </TASK>

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/19 06:05 upstream 23dfa043f6d5 cb976f63 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in btrfs_release_global_block_rsv
2024/01/16 16:31 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_release_global_block_rsv
2024/01/10 21:35 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_release_global_block_rsv
2024/01/10 17:06 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_release_global_block_rsv
2023/11/25 16:33 upstream 0f5cc96c367f 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_release_global_block_rsv
2023/11/19 04:46 upstream 23dfa043f6d5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_release_global_block_rsv
2023/09/25 10:39 upstream 8a511e7efc5a 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_release_global_block_rsv
* Struck through repros no longer work on HEAD.