syzbot


WARNING in btrfs_split_ordered_extent

Status: fixed on 2023/09/28 17:51
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+ee90502d5c8fd1d0dd93@syzkaller.appspotmail.com
Fix commit: 7833b865953c btrfs: fix iomap_begin length for nocow writes
First crash: 340d, last: 318d
Cause bisection: introduced by (bisect log) :
commit b73a6fd1b1efd799c6e3d14a922887f4453fea17
Author: Boris Burkov <boris@bur.io>
Date: Tue Mar 28 05:19:57 2023 +0000

  btrfs: split partial dio bios before submit

Crash: WARNING in btrfs_split_ordered_extent (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] WARNING in btrfs_split_ordered_extent 1 (5) 2023/06/08 08:55
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/06/08 07:05 26m hch@infradead.org git://git.infradead.org/users/hch/misc.git btrfs-dio-nocow-fix OK log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5017 at fs/btrfs/ordered-data.c:1138 btrfs_split_ordered_extent+0x628/0x840
Modules linked in:
CPU: 1 PID: 5017 Comm: syz-executor199 Not tainted 6.4.0-rc5-syzkaller-00017-ga27648c74210 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:btrfs_split_ordered_extent+0x628/0x840 fs/btrfs/ordered-data.c:1138
Code: fe 48 c7 c7 a0 94 2a 8b 48 c7 c6 20 90 2a 8b ba 6c 04 00 00 e8 09 a9 1d 07 e8 f4 4a fb fd 0f 0b e9 21 fb ff ff e8 e8 4a fb fd <0f> 0b bb ea ff ff ff eb b0 e8 da 4a fb fd 0f 0b bb ea ff ff ff eb
RSP: 0018:ffffc90003cbedd8 EFLAGS: 00010293
RAX: ffffffff83903448 RBX: 0000000000010000 RCX: ffff88801929bb80
RDX: 0000000000000000 RSI: 0000000000010000 RDI: 0000000000001000
RBP: 1ffff1100fde111b R08: ffffffff83903012 R09: fffffbfff1cab9ae
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88807ef088d8 R14: 0000000000001000 R15: 0000000000000000
FS:  00007f807fad4700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9cf00c2723 CR3: 000000002b121000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_extract_ordered_extent+0x12c/0xb00 fs/btrfs/inode.c:2625
 btrfs_dio_submit_io+0x239/0x340 fs/btrfs/inode.c:7737
 iomap_dio_submit_bio fs/iomap/direct-io.c:75 [inline]
 iomap_dio_bio_iter+0xe15/0x1430 fs/iomap/direct-io.c:355
 __iomap_dio_rw+0x12c3/0x22e0 fs/iomap/direct-io.c:598
 btrfs_dio_write+0xb6/0x100 fs/btrfs/inode.c:7770
 btrfs_direct_write fs/btrfs/file.c:1529 [inline]
 btrfs_do_write_iter+0x870/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:0x7f8086f49329
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:00007f807fad42f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f8086fd27b0 RCX: 00007f8086f49329
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004
RBP: 00007f8086f9f1f4 R08: 00007f807fad4700 R09: 0000000000000000
R10: 0000000008800000 R11: 0000000000000246 R12: 6f63617461646f6e
R13: 70735f6473736f6e R14: 0030656c69662f2e R15: 00007f8086fd27b8
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/07 23:45 upstream a27648c74210 058b3a5a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in btrfs_split_ordered_extent
2023/06/12 06:45 upstream 4c605260bc60 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_split_ordered_extent
2023/06/11 09:01 upstream 022ce8862dff 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_split_ordered_extent
2023/06/07 22:50 upstream a27648c74210 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_split_ordered_extent
2023/05/22 06:20 upstream e2065b8c1b01 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in btrfs_split_ordered_extent
* Struck through repros no longer work on HEAD.