syzbot


WARNING in btrfs_run_delayed_refs (2)

Status: upstream: reported C repro on 2023/06/22 14:13
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+810ea5febd3b79bdd384@syzkaller.appspotmail.com
First crash: 521d, last: 6d19h
Cause bisection: introduced by (bisect log) :
commit f8f210dc84709804c9f952297f2bfafa6ea6b4bd
Author: Filipe Manana <fdmanana@suse.com>
Date: Tue Mar 21 11:13:59 2023 +0000

  btrfs: calculate the right space for delayed refs when updating global reserve

Crash: WARNING in __btrfs_free_extent (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly btrfs report (Sep 2024) 0 (1) 2024/09/16 12:27
[syzbot] [btrfs?] WARNING in btrfs_run_delayed_refs (2) 0 (2) 2023/09/18 08:39
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING in btrfs_run_delayed_refs btrfs C error 9 630d 1010d 0/1 upstream: reported C repro on 2022/02/14 22:12
upstream WARNING in btrfs_run_delayed_refs btrfs C error done 15 652d 766d 22/28 fixed on 2023/03/15 11:57
linux-4.14 WARNING in btrfs_run_delayed_refs btrfs C 1 651d 651d 0/1 upstream: reported C repro on 2023/02/08 10:50
linux-5.15 WARNING in btrfs_run_delayed_refs origin:lts-only C error 15 46d 598d 0/3 upstream: reported C repro on 2023/04/02 18:59
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/09/21 11:39 21m retest repro upstream report log
2024/09/21 11:39 21m retest repro upstream report log
2024/07/04 19:24 15m retest repro upstream report log
2024/06/29 14:56 16m retest repro upstream report log
2024/06/29 14:56 14m retest repro upstream report log
2024/04/25 02:42 20m retest repro upstream report log
2024/04/20 11:22 19m retest repro upstream report log
2024/04/20 11:22 20m retest repro upstream report log
2024/02/14 07:44 14m retest repro upstream report log
2024/01/27 08:11 18m retest repro upstream report log
Fix bisection attempts (9)
Created Duration User Patch Repo Result
2024/11/14 06:24 4h56m bisect fix upstream OK (0) job log log
2024/10/08 11:00 2h02m bisect fix upstream OK (0) job log log
2024/09/07 08:37 1h54m bisect fix upstream OK (0) job log log
2024/08/08 05:23 3h13m bisect fix upstream OK (0) job log log
2024/07/08 18:57 2h46m bisect fix upstream OK (0) job log log
2023/12/03 17:17 1h49m bisect fix upstream OK (0) job log log
2023/11/01 12:10 4h11m bisect fix upstream OK (0) job log log
2023/10/01 23:16 2h17m bisect fix upstream OK (0) job log log
2023/07/27 09:39 2h14m bisect fix upstream OK (0) job log log
Cause bisection attempts (2)
Created Duration User Patch Repo Result
2023/09/18 00:14 8h23m bisect upstream OK (1) job log log
2023/06/20 14:06 12h14m bisect upstream error job log
marked invalid by nogikh@google.com

Sample crash report:
BTRFS error (device loop0): failed to run delayed ref for logical 5251072 num_bytes 4096 type 176 action 1 ref_mod 1: -28
------------[ cut here ]------------
BTRFS: Transaction aborted (error -28)
WARNING: CPU: 0 PID: 4992 at fs/btrfs/extent-tree.c:2127 btrfs_run_delayed_refs+0x444/0x480 fs/btrfs/extent-tree.c:2127
Modules linked in:
CPU: 0 PID: 4992 Comm: syz-executor422 Not tainted 6.4.0-rc7-syzkaller-00072-gdad9774deaf1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:btrfs_run_delayed_refs+0x444/0x480 fs/btrfs/extent-tree.c:2127
Code: fe c1 38 c1 0f 8c 54 fc ff ff 48 89 ef e8 44 fe 60 fe e9 47 fc ff ff e8 9a 26 09 fe 48 c7 c7 00 95 29 8b 89 ee e8 4c a5 d0 fd <0f> 0b eb 9e f3 0f 1e fa e8 7f 26 09 fe 48 8b 44 24 18 42 80 3c 28
RSP: 0018:ffffc90003b9eff0 EFLAGS: 00010246
RAX: 590b639cc7320f00 RBX: ffff88807a4b4001 RCX: ffff888027541dc0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 00000000ffffffe4 R08: ffffffff81530142 R09: fffff52000773d75
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88807556a540
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88814ab72000
FS:  00007f591df2b700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e3a3084068 CR3: 000000001e58d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_commit_transaction+0x427/0x3370 fs/btrfs/transaction.c:2158
 btrfs_sync_file+0xcb3/0x10e0 fs/btrfs/file.c:2001
 generic_write_sync include/linux/fs.h:2469 [inline]
 iomap_dio_complete+0x5fc/0x990 fs/iomap/direct-io.c:128
 btrfs_direct_write fs/btrfs/file.c:1542 [inline]
 btrfs_do_write_iter+0x8b5/0x1270 fs/btrfs/file.c:1674
 do_iter_write+0x7b1/0xcb0 fs/read_write.c:860
 iter_file_splice_write+0x843/0xfe0 fs/splice.c:795
 do_splice_from fs/splice.c:873 [inline]
 direct_splice_actor+0xe7/0x1c0 fs/splice.c:1039
 splice_direct_to_actor+0x4c4/0xbd0 fs/splice.c:994
 do_splice_direct+0x283/0x3d0 fs/splice.c:1082
 do_sendfile+0x620/0xff0 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f591df7f1e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f591df2b2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f591e0086e0 RCX: 00007f591df7f1e9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007f591dfd566c R08: 0000000000000000 R09: 0000000000000000
R10: 000000000880000c R11: 0000000000000246 R12: 0000000020000600
R13: 0030656c69662f2e R14: 0002000000000000 R15: 00007f591e0086e8
 </TASK>

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/22 17:03 upstream dad9774deaf1 09ffe269 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root WARNING in btrfs_run_delayed_refs
2023/06/22 07:04 upstream dad9774deaf1 09ffe269 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root WARNING in btrfs_run_delayed_refs
2023/06/18 14:04 upstream 1b29d271614a f3921d4d .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:26 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:20 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/03/11 19:10 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_run_delayed_refs
2024/02/27 01:17 upstream d206a76d7d27 da36a36b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_run_delayed_refs
2024/01/07 12:33 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_run_delayed_refs
2024/01/03 18:49 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_run_delayed_refs
2023/12/06 13:46 upstream bee0e7762ad2 858d62d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_run_delayed_refs
2024/05/12 03:19 upstream cf87f46fd34d 9026e142 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in btrfs_run_delayed_refs
2024/05/12 03:17 linux-next 75fa778d74b7 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/05/12 03:16 linux-next 75fa778d74b7 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in btrfs_run_delayed_refs
2024/04/30 19:47 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 9e0e6af1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in btrfs_run_delayed_refs
2024/04/30 19:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 9e0e6af1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in btrfs_run_delayed_refs
2024/04/30 19:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 9e0e6af1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in btrfs_run_delayed_refs
2024/04/30 19:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 9e0e6af1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in btrfs_run_delayed_refs
2024/04/30 19:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 9e0e6af1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in btrfs_run_delayed_refs
2024/04/26 02:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in btrfs_run_delayed_refs
* Struck through repros no longer work on HEAD.