syzbot


WARNING in ext4_discard_allocated_blocks

Status: fixed on 2024/02/21 18:23
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+628e71e1cb809306030f@syzkaller.appspotmail.com
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 177d, last: 56d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in ext4_discard_allocated_blocks (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ext4?] WARNING in ext4_discard_allocated_blocks 1 (4) 2024/02/16 09:56
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/02/02 20:29 19m retest repro upstream OK log
2024/01/06 20:38 13m retest repro upstream report log
2023/12/23 13:22 19m retest repro upstream OK log
2023/11/17 14:17 13m tintinm2017@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
2023/09/21 14:30 11m retest repro upstream report log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/02/16 00:05 4h19m bisect fix upstream job log (1)
2023/11/24 18:42 1h41m bisect fix upstream job log (0) log
2023/10/22 00:49 1h18m bisect fix upstream job log (0) log

Sample crash report:
EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:482: comm syz-executor353: Invalid block bitmap block 0 in block_group 0
EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:482: comm syz-executor353: Invalid block bitmap block 0 in block_group 0
------------[ cut here ]------------
ext4: mb_load_buddy failed (-117)
WARNING: CPU: 0 PID: 5216 at fs/ext4/mballoc.c:4611 ext4_discard_allocated_blocks+0x6f2/0x840 fs/ext4/mballoc.c:4611
Modules linked in:
CPU: 0 PID: 5216 Comm: syz-executor353 Not tainted 6.7.0-rc6-syzkaller-00248-g5254c0cbc92d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:ext4_discard_allocated_blocks+0x6f2/0x840 fs/ext4/mballoc.c:4611
Code: 08 31 ff 89 c5 89 c6 e8 5c b0 4e ff 85 ed 0f 84 1f fa ff ff e8 df b4 4e ff 90 8b 34 24 48 c7 c7 00 1b e4 8a e8 7f f6 14 ff 90 <0f> 0b 90 90 e9 00 fa ff ff e8 00 5f a5 ff e9 86 f9 ff ff e8 d6 2c
RSP: 0018:ffffc900047c7090 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 1ffff920008f8e16 RCX: ffffffff814db519
RDX: ffff88801eb51dc0 RSI: ffffffff814db526 RDI: 0000000000000001
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffffc900047c70d0
R13: ffff888073416ea4 R14: ffff888073416e60 R15: ffff888073416ea0
FS:  00007f29252876c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2925306ad0 CR3: 0000000021025000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 ext4_mb_new_blocks+0x16d0/0x4b10 fs/ext4/mballoc.c:6211
 ext4_ext_map_blocks+0x1b4e/0x5ae0 fs/ext4/extents.c:4285
 ext4_map_blocks+0x619/0x1770 fs/ext4/inode.c:621
 _ext4_get_block+0x24d/0x5a0 fs/ext4/inode.c:763
 ext4_block_write_begin+0x3da/0xee0 fs/ext4/inode.c:1053
 ext4_write_begin+0x5e6/0x1100 fs/ext4/inode.c:1193
 ext4_da_write_begin+0x221/0x8c0 fs/ext4/inode.c:2875
 generic_perform_write+0x278/0x600 mm/filemap.c:3918
 ext4_buffered_write_iter+0x11f/0x3c0 fs/ext4/file.c:299
 ext4_file_write_iter+0x819/0x1950 fs/ext4/file.c:698
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x64f/0xdf0 fs/read_write.c:584
 ksys_write+0x12f/0x250 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f29252cabd9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2925287218 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f29253546c8 RCX: 00007f29252cabd9
RDX: 000000000000a000 RSI: 0000000020000780 RDI: 0000000000000005
RBP: 00007f29253546c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2925320a38
R13: 0000000000000000 R14: 6f6f6c2f7665642f R15: 0032656c69662f2e
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/23 19:07 upstream 5254c0cbc92d fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-badwrites-root WARNING in ext4_discard_allocated_blocks
2023/09/07 14:05 upstream 7ba2090ca64e 72324844 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in ext4_discard_allocated_blocks
2023/12/09 12:38 upstream f2e8a57ee903 28b24332 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root WARNING in ext4_discard_allocated_blocks
2023/09/07 13:25 upstream 7ba2090ca64e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in ext4_discard_allocated_blocks
* Struck through repros no longer work on HEAD.