syzbot


kernel BUG in create_pending_snapshot

Status: upstream: reported C repro on 2022/11/24 06:28
Reported-by: syzbot+d56e0d33caf7d1a02821@syzkaller.appspotmail.com
First crash: 2d23h, last: 2d23h

Cause bisection: failed (bisect log)

Sample crash report:
BTRFS info (device loop0): enabling ssd optimizations
------------[ cut here ]------------
kernel BUG at fs/btrfs/transaction.c:1672!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3638 Comm: syz-executor237 Not tainted 6.1.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:create_pending_snapshot+0x250a/0x2560 fs/btrfs/transaction.c:1672
Code: ff e8 da c7 02 fe 48 c7 c7 60 16 39 8b 44 89 ee 31 c0 e8 c9 65 ca fd 0f 0b b3 01 e9 18 fa ff ff e8 3b 63 0a 07 e8 b6 c7 02 fe <0f> 0b e8 af c7 02 fe 0f 0b e8 a8 c7 02 fe 0f 0b e8 a1 c7 02 fe 48
RSP: 0018:ffffc90003aff6e0 EFLAGS: 00010293
RAX: ffffffff8387d0ba RBX: 00000000fffffff4 RCX: ffff88802722ba80
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: ffffc90003aff970 R08: ffffffff8387b1f0 R09: fffffbfff1a42e97
R10: fffffbfff1a42e97 R11: 1ffffffff1a42e96 R12: ffff888076ce1780
R13: ffff8880731717d0 R14: ffff888027dea000 R15: ffff8880708b8178
FS:  0000555555bce300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005626964b1000 CR3: 000000007955e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 create_pending_snapshots+0x1a8/0x1e0 fs/btrfs/transaction.c:1868
 btrfs_commit_transaction+0x13f0/0x3760 fs/btrfs/transaction.c:2323
 create_snapshot+0x4aa/0x7e0 fs/btrfs/ioctl.c:833
 btrfs_mksubvol+0x62e/0x760 fs/btrfs/ioctl.c:983
 btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:1029
 __btrfs_ioctl_snap_create+0x339/0x450 fs/btrfs/ioctl.c:2184
 btrfs_ioctl_snap_create+0x134/0x190 fs/btrfs/ioctl.c:2211
 btrfs_ioctl+0x15c/0xc10
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7efd25d6d2a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe43e29638 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007efd25d6d2a9
RDX: 00000000200000c0 RSI: 0000000050009401 RDI: 0000000000000003
RBP: 0000000000000006 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe43e29670 R14: 0000000000000003 R15: 00007ffe43e2966a
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:create_pending_snapshot+0x250a/0x2560 fs/btrfs/transaction.c:1672
Code: ff e8 da c7 02 fe 48 c7 c7 60 16 39 8b 44 89 ee 31 c0 e8 c9 65 ca fd 0f 0b b3 01 e9 18 fa ff ff e8 3b 63 0a 07 e8 b6 c7 02 fe <0f> 0b e8 af c7 02 fe 0f 0b e8 a8 c7 02 fe 0f 0b e8 a1 c7 02 fe 48
RSP: 0018:ffffc90003aff6e0 EFLAGS: 00010293
RAX: ffffffff8387d0ba RBX: 00000000fffffff4 RCX: ffff88802722ba80
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: ffffc90003aff970 R08: ffffffff8387b1f0 R09: fffffbfff1a42e97
R10: fffffbfff1a42e97 R11: 1ffffffff1a42e96 R12: ffff888076ce1780
R13: ffff8880731717d0 R14: ffff888027dea000 R15: ffff8880708b8178
FS:  0000555555bce300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005626963c87d8 CR3: 000000007955e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-fs 2022/11/24 03:06 upstream eb7081409f94 52fdf57a .config log report syz C kernel BUG in create_pending_snapshot
ci2-upstream-fs 2022/11/24 02:49 upstream eb7081409f94 52fdf57a .config log report info kernel BUG in create_pending_snapshot
* Struck through repros no longer work on HEAD.