Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 290E4ECAAA1 for ; Mon, 12 Sep 2022 02:45:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229479AbiILCpm (ORCPT ); Sun, 11 Sep 2022 22:45:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiILCpl (ORCPT ); Sun, 11 Sep 2022 22:45:41 -0400 Received: from libero.it (smtp-18.italiaonline.it [213.209.10.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CED51A805 for ; Sun, 11 Sep 2022 19:45:38 -0700 (PDT) Received: from [192.168.1.10] ([188.153.36.212]) by smtp-18.iol.local with ESMTPA id XZS2oXdYDo7VeXZS2oJRfi; Mon, 12 Sep 2022 04:45:34 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inwind.it; s=s2014; t=1662950734; bh=7/gl2Ljx8QupIC2vX0ptLtcor5zeRV4x5W+fgeSRbdM=; h=From; b=bojkYOqIT+YIJk71Q1ia7JfoC+iTu3AC9sq/SFa2SAb1BHOGJOLAHj/dA4jFQV82w S6NML95k2JZ5hKKCVTusy3TKOvDCwV4W2aioOe9rH2ZQH2yxe/byHcZ9eZhRLfjfcr M6Tqkj16Kf1PF97Ag+fG99Ici4YvUeCup5AvHoP6ayYK/xep7iKZhuqubComBq9OGm SOyCfnQQpdSLB59Aw+khrimuymuwqz5bgoqn481qknDy+935C1KiZyao15cFNz8deS KrEtgNETZwX2RwJZUdYyhTL7L07Z1Df7ryW3nCzfrUOGjGtaicsEo9+lg5H8GuQI7Q VB4Di6viCpOhw== X-CNFS-Analysis: v=2.4 cv=ZtEol/3G c=1 sm=1 tr=0 ts=631e9d4e cx=a_exe a=UwMeCiiNZBIOh9ObVSnZqg==:117 a=UwMeCiiNZBIOh9ObVSnZqg==:17 a=IkcTkHD0fZMA:10 a=VwQbUJbxAAAA:8 a=Uq0mbvy6AAAA:8 a=NEAV23lmAAAA:8 a=kUrw6oTPAtKufaeiCcwA:9 a=QEXdDO2ut3YA:10 a=AjGcO6oz07-iQ99wixmX:22 a=9nAYT2xhiIK_ZOnRzmc7:22 Message-ID: <75ad4f12-dfce-5e9f-4361-5c8c28ea5c1d@inwind.it> Date: Mon, 12 Sep 2022 04:45:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: core dump in btrfs receive (while handling a clone command?) Content-Language: en-US To: Qu Wenruo , linux-btrfs@vger.kernel.org References: From: Antonio Muci In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfCk1AGhWp/8CeU116SYJqK8xUEha1d+K7/kcIBeitNZd9IRUV0prt4ipJLorFRCbJZ60UL54aqofoRYjfNpLzrQZQ0Cz4vK72AGgGvQ76Ge+GtJs5ctY BEeopqfST5Go4JKuYB3yNPQ4GGGfAfbTnve4kTDUNG7rXfPYeVZoVCYXIv62RJ//Vc/x4fUy5HApjzR9Ok532HQEsCZmDGF6vs5aopj/8Vjy6EiNxCXoqfxX Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 12/09/22 03:52, Qu Wenruo wrote: > > > On 2022/9/12 09:43, Antonio Muci wrote: >> >> # gdb btrfs core.btrfs.0.2799d9eb6dbd423aa57676cad3e64ee7.3152.1662942112000000 >> GNU gdb (GDB) Fedora 12.1-1.fc36 >> [...] >> Core was generated by `btrfs --verbose receive --max-errors 0 /main'. >> Program terminated with signal SIGSEGV, Segmentation fault. >> #0  process_clone (path=0x560c9bd24a80 "db.sqlite3", offset=1045131264, len=10760192, clone_uuid=, clone_ctransid=440, >>      clone_path=0x560c9bd24b40 "db.sqlite3", clone_offset=1045131264, user=0x7ffdd23aa3f0) at cmds/receive.c:793 >> 793                     free(si->path); >> (gdb) bt >> #0  process_clone (path=0x560c9bd24a80 "db.sqlite3", offset=1045131264, len=10760192, clone_uuid=, clone_ctransid=440, >>      clone_path=0x560c9bd24b40 "db.sqlite3", clone_offset=1045131264, user=0x7ffdd23aa3f0) at cmds/receive.c:793 > > This looks like a bug recently fixed by this patch: > > https://patchwork.kernel.org/project/linux-btrfs/patch/20220902161327.45283-1-wangyugui@e16-tech.com/ > > Mind to test the latest devel branch which should already have it merged? > > Thanks, > Qu > Thanks, I tried the latest devel branch (as of today, (https://github.com/kdave/btrfs-progs/tree/efd6cfb74bb6a7218c12eaa27e455be453082c81) and I was able to get my data back! The crashes now became error messages from the receiving process, like this: write db.sqlite3 - offset=1041842176 length=4096 ERROR: clone: did not find source subvol write db.sqlite3 - offset=1055891456 length=4096 ERROR: clone: did not find source subvol I have verified that the two files have the same sha256sum, so no data was lost. However that error message is a bit unsettiling: the subvolume reconstruction is only progressing because receive is running with --max-errors 0, i.e. ignoring errors and continuing. Is that error message just a too alarmist wording, or might it be something more serious lingering around? Thanks again everyone for the prompt response: you saved my data in no time! Antonio