Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp3595129rwb; Sun, 30 Jul 2023 11:08:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0C25YtJkIV9frw9JT6K6nWGEp1X7Z2Y7kxoh9zmM16LoJQEpF++PwNDa/aG8tHn+JrRl3 X-Received: by 2002:a05:6a20:1587:b0:12e:3394:e2b6 with SMTP id h7-20020a056a20158700b0012e3394e2b6mr8877262pzj.8.1690740495483; Sun, 30 Jul 2023 11:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690740495; cv=none; d=google.com; s=arc-20160816; b=eeATceQR5jIL2N/vjg0rJyAnZzHJOqbSbyC7DeQg7bQkLfOJglsVNpRIrYXCUTv/7n ojbgafTX/8z/9ifo6o99iC4M5Vj3kQTrc15ohFBADYqLDLG1TKWqdbUUazY0CGd3tDJw GsFsje8NipUryePnwaLWlDl7Ch72jFrRztv2x8jfG7zKojPvEgQlX1c0cPcGmjk8CHr0 e5Mnt6IEzvVSk+VP7ybraDN14wEoeWT1pv36lZvnECjaGrZ5Se0sHRl9iHiqURGzSAVT 82zencwL35MsKqR9WYPW2Rf/EnhcyADBdg0Gf+o2GmDNB8LHxDOFqqN/AJ09dTi+Ngg7 50HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:in-reply-to:date :mime-version; bh=n9vqfGmyOwEWs7LNdvGwPbGUY0I/3aqKJVRSebRF0Hw=; fh=aLWr0kYIWfkase+72cdjn1ZXuxawEvXKLD+acNOwC3Y=; b=qyBCChpfXgEQtNbEoa6qCVtkgt8TsjHOI7XiG+RIzdjLCeOp5A2b1SsGiaUPIFwSa4 yoGImNpP2aoq34yNRFWnuozDY+A3UNTl10BQWjE+hgvbc9bz8V2rTKTP6T9A/oFyr182 ziU/n7pnAOPUI20TsqWp3eALYdQrbk+QcY0dniquzjLsU96wohxx/IvRz7O4sB/KIP8/ GjwhwwvDKdoBB+5cYp2dNLxvNf6PK0Sa6i2DhOYDY9BlocDQTO/wn+in/nNMnv4nCl/x F3zUz/mf8BN0XXMD9UnD3LLiA2ms8UK4NdzWC6G7Pzc1lEO1dnaGxpyGzPBC86LM+lf7 3S1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r30-20020a63fc5e000000b0055337ca9ce9si5899703pgk.248.2023.07.30.11.08.03; Sun, 30 Jul 2023 11:08:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbjG3RIA (ORCPT + 99 others); Sun, 30 Jul 2023 13:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjG3RH7 (ORCPT ); Sun, 30 Jul 2023 13:07:59 -0400 Received: from mail-oi1-f205.google.com (mail-oi1-f205.google.com [209.85.167.205]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F53310D5 for ; Sun, 30 Jul 2023 10:07:57 -0700 (PDT) Received: by mail-oi1-f205.google.com with SMTP id 5614622812f47-39cdf9f9d10so5581622b6e.3 for ; Sun, 30 Jul 2023 10:07:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690736877; x=1691341677; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n9vqfGmyOwEWs7LNdvGwPbGUY0I/3aqKJVRSebRF0Hw=; b=Ik7QefnWk8PDO/3e4E5cGNTmgSqCLyISeJXjNINhrs4wzCgaTNrLwOp6YwImukNnWL r/bCZNtK0F0jWrZuuKk1KeJUj6MAHJXpY+Y/vBDCtNywOetgbvM6jdWEH5PSKs+SvGih gGCNCGiA/RsZuZ9ko3dx9ckxO9OXr8PNIpDTK3GUhXa/mGrmeAWVQ53xc5uHcYZAB3Oa UzJUZzWjTWaPMQFmX5M42IG6yI67T5LDIm7abWlHDi8VntvJaRvWk/HDP+zVT+xn5n37 m5k4ciZohfJbxAr2WKh7bnjJGLAcMbXCKvwb9JyXEnDOv+bPFgJKQ2tJr0hbpo+q6HW0 bzfw== X-Gm-Message-State: ABy/qLY2xrtPPTDWHOKhG1LlKe8lEDrgwxhjqBkSCBovuVvTQhxGHlaY wUCTGkrE2e2LmkJ9g2TX2YFvtC429ZmQ7/jt6a+BR6nDpkY7 MIME-Version: 1.0 X-Received: by 2002:a05:6808:17a4:b0:39e:ced7:602b with SMTP id bg36-20020a05680817a400b0039eced7602bmr14547448oib.2.1690736876717; Sun, 30 Jul 2023 10:07:56 -0700 (PDT) Date: Sun, 30 Jul 2023 10:07:56 -0700 In-Reply-To: <000000000000a3d67705ff730522@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000f20fc00601b75a80@google.com> Subject: Re: [syzbot] [btrfs?] kernel BUG in prepare_to_merge From: syzbot To: clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syzbot has found a reproducer for the following issue on: HEAD commit: d31e3792919e Merge tag '6.5-rc3-smb3-client-fixes' of git:.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17afd745a80000 kernel config: https://syzkaller.appspot.com/x/.config?x=9d670a4f6850b6f4 dashboard link: https://syzkaller.appspot.com/bug?extid=ae97a827ae1c3336bbb4 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15278939a80000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14dd3f31a80000 Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-d31e3792.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/c6c2342933c9/vmlinux-d31e3792.xz kernel image: https://storage.googleapis.com/syzbot-assets/42df60b42886/bzImage-d31e3792.xz mounted in repro: https://storage.googleapis.com/syzbot-assets/78ffd1ddff6c/mount_0.gz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+ae97a827ae1c3336bbb4@syzkaller.appspotmail.com BTRFS info (device loop1): relocating block group 5242880 flags data|metadata assertion failed: root->reloc_root == reloc_root, in fs/btrfs/relocation.c:1919 ------------[ cut here ]------------ kernel BUG at fs/btrfs/relocation.c:1919! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 12638 Comm: syz-executor311 Not tainted 6.5.0-rc3-syzkaller-00297-gd31e3792919e #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:prepare_to_merge+0x9cc/0xcd0 fs/btrfs/relocation.c:1919 Code: c5 e9 81 fd ff ff e8 e3 59 00 fe b9 7f 07 00 00 48 c7 c2 40 d9 b6 8a 48 c7 c6 20 e6 b6 8a 48 c7 c7 a0 da b6 8a e8 54 bc e3 fd <0f> 0b 4c 8b 7c 24 38 48 8b 5c 24 10 44 8b 6c 24 0c e8 ae 59 00 fe RSP: 0018:ffffc90023e176d0 EFLAGS: 00010282 RAX: 000000000000004f RBX: ffff88801e898560 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff81698120 RDI: 0000000000000005 RBP: ffff88801e898558 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 6f69747265737361 R12: dffffc0000000000 R13: ffff88801e898000 R14: ffff88802d944000 R15: ffff888017616618 FS: 00007fb31aba26c0(0000) GS:ffff88806b600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb31ac3a758 CR3: 000000002e1dc000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: relocate_block_group+0x8d1/0xe70 fs/btrfs/relocation.c:3749 btrfs_relocate_block_group+0x714/0xd90 fs/btrfs/relocation.c:4087 btrfs_relocate_chunk+0x143/0x440 fs/btrfs/volumes.c:3283 __btrfs_balance fs/btrfs/volumes.c:4018 [inline] btrfs_balance+0x20fc/0x3ef0 fs/btrfs/volumes.c:4395 btrfs_ioctl_balance fs/btrfs/ioctl.c:3604 [inline] btrfs_ioctl+0x1362/0x5cf0 fs/btrfs/ioctl.c:4637 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fb31abe6e49 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:00007fb31aba2168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fb31ac73728 RCX: 00007fb31abe6e49 RDX: 00000000200003c0 RSI: 00000000c4009420 RDI: 0000000000000005 RBP: 00007fb31ac73720 R08: 00007fb31aba26c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb31ac7372c R13: 0000000000000006 R14: 00007ffe768d5660 R15: 00007ffe768d5748 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:prepare_to_merge+0x9cc/0xcd0 fs/btrfs/relocation.c:1919 Code: c5 e9 81 fd ff ff e8 e3 59 00 fe b9 7f 07 00 00 48 c7 c2 40 d9 b6 8a 48 c7 c6 20 e6 b6 8a 48 c7 c7 a0 da b6 8a e8 54 bc e3 fd <0f> 0b 4c 8b 7c 24 38 48 8b 5c 24 10 44 8b 6c 24 0c e8 ae 59 00 fe RSP: 0018:ffffc90023e176d0 EFLAGS: 00010282 RAX: 000000000000004f RBX: ffff88801e898560 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff81698120 RDI: 0000000000000005 RBP: ffff88801e898558 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 6f69747265737361 R12: dffffc0000000000 R13: ffff88801e898000 R14: ffff88802d944000 R15: ffff888017616618 FS: 00007fb31aba26c0(0000) GS:ffff88806b600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb31ac3a758 CR3: 000000002e1dc000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 --- If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing.