syzbot


kernel BUG in __extent_writepage_io

Status: fixed on 2024/05/18 00:35
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+06006fc4a90bff8e8f17@syzkaller.appspotmail.com
Fix commit: 5571e41ec6e5 btrfs: don't drop extent_map for free space inode on write error
First crash: 261d, last: 139d
Cause bisection: introduced by (bisect log) :
commit 95848dcb9d676738411a8ff70a9704039f1b3982
Author: Christoph Hellwig <hch@lst.de>
Date: Sat Aug 5 05:55:37 2023 +0000

  zram: take device and not only bvec offset into account

Crash: kernel BUG in __extent_writepage_io (log)
Repro: syz .config
  
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in __extent_writepage_io 1 (4) 2024/05/15 16:36
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/03/17 02:06 18m retest repro upstream error
2024/01/01 22:27 16m retest repro upstream report log

Sample crash report:
assertion failed: block_start != EXTENT_MAP_HOLE, in fs/btrfs/extent_io.c:1356
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent_io.c:1356!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 12 Comm: kworker/u4:1 Not tainted 6.7.0-rc5-syzkaller-00030-geaadbbaaff74 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Workqueue: writeback wb_workfn (flush-btrfs-137)
RIP: 0010:__extent_writepage_io+0xcd5/0xd00 fs/btrfs/extent_io.c:1356
Code: 77 07 90 0f 0b e8 fb 23 f1 fd 48 c7 c7 80 c5 ab 8b 48 c7 c6 80 d2 ab 8b 48 c7 c2 20 c5 ab 8b b9 4c 05 00 00 e8 7c 49 77 07 90 <0f> 0b e8 d4 23 f1 fd 48 8b 3c 24 e8 db 22 01 00 48 89 c7 48 c7 c6
RSP: 0018:ffffc90000116f40 EFLAGS: 00010246
RAX: 000000000000004e RBX: 0000000000000000 RCX: 759e2408fa89b300
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: fffffffffffffffd R08: ffffffff81713a3c R09: 1ffff92000022d3c
R10: dffffc0000000000 R11: fffff52000022d3d R12: 0000000000007000
R13: 0000000000007000 R14: ffffea00019cd168 R15: ffff888027a0b680
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f54a22c2723 CR3: 000000001d013000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __extent_writepage fs/btrfs/extent_io.c:1446 [inline]
 extent_write_cache_pages fs/btrfs/extent_io.c:2108 [inline]
 extent_writepages+0x1260/0x26a0 fs/btrfs/extent_io.c:2230
 do_writepages+0x3a6/0x670 mm/page-writeback.c:2553
 __writeback_single_inode+0x155/0xfc0 fs/fs-writeback.c:1625
 writeback_sb_inodes+0x8e3/0x1220 fs/fs-writeback.c:1916
 wb_writeback+0x44d/0xc70 fs/fs-writeback.c:2092
 wb_do_writeback fs/fs-writeback.c:2239 [inline]
 wb_workfn+0x400/0xfb0 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2627 [inline]
 process_scheduled_works+0x90f/0x1420 kernel/workqueue.c:2700
 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2781
 kthread+0x2d3/0x370 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__extent_writepage_io+0xcd5/0xd00 fs/btrfs/extent_io.c:1356
Code: 77 07 90 0f 0b e8 fb 23 f1 fd 48 c7 c7 80 c5 ab 8b 48 c7 c6 80 d2 ab 8b 48 c7 c2 20 c5 ab 8b b9 4c 05 00 00 e8 7c 49 77 07 90 <0f> 0b e8 d4 23 f1 fd 48 8b 3c 24 e8 db 22 01 00 48 89 c7 48 c7 c6
RSP: 0018:ffffc90000116f40 EFLAGS: 00010246
RAX: 000000000000004e RBX: 0000000000000000 RCX: 759e2408fa89b300
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: fffffffffffffffd R08: ffffffff81713a3c R09: 1ffff92000022d3c
R10: dffffc0000000000 R11: fffff52000022d3d R12: 0000000000007000
R13: 0000000000007000 R14: ffffea00019cd168 R15: ffff888027a0b680
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fac72b5f000 CR3: 000000001d013000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/13 01:58 upstream eaadbbaaff74 ebcad15c .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __extent_writepage_io
2024/03/03 00:46 upstream 5ad3cb0ed525 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __extent_writepage_io
2024/02/08 18:52 upstream 047371968ffc 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __extent_writepage_io
2024/01/05 20:00 upstream 1f874787ed9a 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __extent_writepage_io
2023/12/18 22:26 upstream ceb6a6f023fd 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in __extent_writepage_io
2023/12/12 23:05 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __extent_writepage_io
2023/11/02 01:22 upstream 8bc9e6515183 69904c9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __extent_writepage_io
2023/11/09 12:07 linux-next e27090b1413f 4862372a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in __extent_writepage_io
* Struck through repros no longer work on HEAD.