syzbot


kernel BUG in btrfs_ioctl_add_dev

Status: fixed on 2023/07/01 16:05
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+afdee14f9fd3d20448e7@syzkaller.appspotmail.com
Fix commit: ac868bc9d136 btrfs: fix assertion of exclop condition when starting balance
First crash: 604d, last: 527d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit ac868bc9d136cde6e3eb5de77019a63d57a540ff
Author: xiaoshoukui <xiaoshoukui@gmail.com>
Date: Thu Apr 13 09:55:07 2023 +0000

  btrfs: fix assertion of exclop condition when starting balance

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in btrfs_exclop_balance (2) 2 (4) 2023/06/06 14:07
[syzbot] [btrfs?] kernel BUG in btrfs_ioctl_add_dev 1 (3) 2023/06/06 14:03

Sample crash report:
assertion failed: fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE || fs_info->exclusive_operation == BTRFS_EXCLOP_DEV_ADD, in fs/btrfs/ioctl.c:457
------------[ cut here ]------------
kernel BUG at fs/btrfs/messages.c:259!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 6416 Comm: syz-executor132 Not tainted 6.2.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:btrfs_assertfail+0x18/0x20 fs/btrfs/messages.c:259
Code: df e8 0c 2d 3c f7 e9 50 fb ff ff e8 e2 7e 01 00 66 90 66 0f 1f 00 89 d1 48 89 f2 48 89 fe 48 c7 c7 20 16 2c 8b e8 38 62 ff ff <0f> 0b 66 0f 1f 44 00 00 66 0f 1f 00 53 48 89 fb e8 03 f4 e6 f6 48
RSP: 0018:ffffc9000ca0fea0 EFLAGS: 00010246
RAX: 0000000000000097 RBX: 00000000fffffff2 RCX: eb26e11d15dcfa00
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff816efb3c R09: fffff52001941f8d
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000003 R14: ffff888029d64680 R15: 1ffff110053acc1a
FS:  00007f9e79ad6700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000077d02000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_exclop_balance fs/btrfs/ioctl.c:456 [inline]
 btrfs_ioctl_add_dev+0x347/0x480 fs/btrfs/ioctl.c:2660
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
 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:0x7f9e80f4b589
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 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:00007f9e79ad62f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9e80fd57b0 RCX: 00007f9e80f4b589
RDX: 0000000000000000 RSI: 000000005000940a RDI: 0000000000000004
RBP: 00007f9e80fd57bc R08: 00007f9e79ad6700 R09: 0000000000000000
R10: 00007f9e79ad6700 R11: 0000000000000246 R12: 00007f9e80fa2660
R13: 01c8dfb098cf77b9 R14: 0030656c69662f2e R15: 00007f9e80fd57b8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_assertfail+0x18/0x20 fs/btrfs/messages.c:259
Code: df e8 0c 2d 3c f7 e9 50 fb ff ff e8 e2 7e 01 00 66 90 66 0f 1f 00 89 d1 48 89 f2 48 89 fe 48 c7 c7 20 16 2c 8b e8 38 62 ff ff <0f> 0b 66 0f 1f 44 00 00 66 0f 1f 00 53 48 89 fb e8 03 f4 e6 f6 48
RSP: 0018:ffffc9000ca0fea0 EFLAGS: 00010246
RAX: 0000000000000097 RBX: 00000000fffffff2 RCX: eb26e11d15dcfa00
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff816efb3c R09: fffff52001941f8d
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000003 R14: ffff888029d64680 R15: 1ffff110053acc1a
FS:  00007f9e79ad6700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000077d02000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (46):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/20 07:24 upstream c9c3395d5e3d bcdf85f8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/03 05:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 596b6b709632 f8902b57 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in btrfs_ioctl_add_dev
2023/03/03 01:12 upstream 04a357b1f6f0 f8902b57 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/05/07 03:54 upstream fc4354c6e5c2 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/05/06 23:45 upstream 2e1e1337881b 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/05/04 00:14 upstream 348551ddaf31 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/25 02:30 upstream 1a0beef98b58 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/21 01:31 upstream 6a66fdd29ea1 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/18 23:44 upstream af67688dca57 d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/17 16:22 upstream 6a8f57ae2eb0 c6ec7083 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/16 13:26 upstream 3e7bb4f24617 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/12 16:32 upstream e62252bc55b6 1a1596b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/10 20:38 upstream 09a9639e56c0 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/09 16:29 upstream cdc9718d5e59 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/06 22:33 upstream f2afccfefe7b 00ce4c67 .config console log report info ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/04 06:18 upstream 148341f0a2f5 41147e3e .config console log report info ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/04/03 18:07 upstream 7e364e56293b 41147e3e .config console log report info ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/31 15:50 upstream 62bad54b26db f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/30 19:33 upstream 8bb95a1662f8 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/29 20:53 upstream ffe78bbd5121 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/29 08:18 upstream fcd476ea6a88 fc067f05 .config console log report info ci-upstream-kasan-gce-root kernel BUG in btrfs_ioctl_add_dev
2023/03/27 00:41 upstream 18940c888c85 fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/25 15:40 upstream 65aca32efdcb fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/23 15:56 upstream fff5a5e7f528 f94b4a29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/23 05:38 upstream fff5a5e7f528 f94b4a29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/22 05:21 upstream 2faac9a98f01 8b4eb097 .config console log report info ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/20 18:42 upstream e8d018dd0257 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/20 07:25 upstream e8d018dd0257 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/17 22:27 upstream 38e04b3e4240 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/17 00:23 upstream 0ddc84d2dd43 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/14 20:44 upstream 4979bf866825 0d5c4377 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/13 20:06 upstream eeac8ede1755 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/13 16:48 upstream eeac8ede1755 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/12 23:24 upstream 134231664868 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/03 04:49 upstream 04a357b1f6f0 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/02 04:02 upstream ee3f96b16468 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/02/27 02:43 upstream f3a2439f20d9 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/02/26 07:00 upstream 489fa31ea873 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/02/20 06:22 upstream c9c3395d5e3d bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/02/20 00:37 upstream 925cf0457d7e bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/02/18 20:27 upstream 38f8ccde04a3 d02e9a70 .config console log report info ci2-upstream-fs kernel BUG in btrfs_ioctl_add_dev
2023/03/20 08:46 upstream e8d018dd0257 7939252e .config console log report info ci-qemu-upstream-386 kernel BUG in btrfs_ioctl_add_dev
2023/04/11 06:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9a03cbd79d3a 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_ioctl_add_dev
2023/03/21 07:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fe15c26ee26e 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_ioctl_add_dev
2023/03/02 09:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2ebd1fbb946d f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in btrfs_ioctl_add_dev
* Struck through repros no longer work on HEAD.