Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2298758rdb; Sun, 3 Dec 2023 10:33:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWj386i91vna8A2zbo47fOVJfj5quSytGawoHOGtTzgWJSuJnIdx2F/UFb19wrtwuZ+Czw X-Received: by 2002:a17:903:1104:b0:1d0:8876:7082 with SMTP id n4-20020a170903110400b001d088767082mr552572plh.72.1701628409277; Sun, 03 Dec 2023 10:33:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701628409; cv=none; d=google.com; s=arc-20160816; b=VVWiNuXk7qo3rJk6DmSDueAo4XBV09PvvX9VshSSdcCz1OJM3isg/3ueaibXVhrcoG f1MMYx9AIuNY8UaXGgVxx8EPzRbPHuaddm9R4AThPm1Ga86M1893fF3DJ9PPIIdYrF6o MvEzFERNZQwf/LqCDx2R5WQCG86udUAWcA7MDAp1ctfyz8ExM+qdC9iXs1C+3X0TkRUq 2wOsxuix6w7es9fITKVPZFv+rO7zHUgOXG7TXtpORbDfbCfdN9IN8ZkvqgLMjPLbDaAS 9XZfWWxR5RZR8PlQSTf6X5RUfVFaoHbJSp0N3t0VmmWWSm/ZXxs65sNt7Maihe9OT8ba ZiEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=FowQ/5sWrP2WT5J/Mx1Lbri0pmb1bWbatWSIzB8moBY=; fh=Q3wogKQ93Y7O46kFQNHxeDIJfxj/8PlxwGifo6CENQM=; b=rEvtpPIOGeMs4kknyJNvzCLMQStKeRQRbgRL/KJYtxzJcQQ7aCqJcmW0lvIQ1jf4nR RghECUh4BWNBAg0a8+R+b8AndRUVasLGckhQh1iJ6SpqfNx2jFRl4hyvSShOsUM53cPp EsTSxHFA5sNALx8wBVFiWQO4LtsApfQZl9eBp6lAZfQYhqXJgQQO9/o4ckjXGYeAYg/k 80yw/pOWqGGJoU81Ffp2mVkygb5KqAdWH9iao5tuJKpUjYjG1IlG8DSY8NwhTkRbiN9K m85uRd05Ou08Dq5dZN2PUZJ6ACQJnzOhOxptYHySTLie1IRSkYlNySTMtcAUvhM4nhcs tBzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u8-20020a170902e5c800b001d094766f1fsi874402plf.404.2023.12.03.10.33.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 10:33:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EA681280401 for ; Sun, 3 Dec 2023 18:33:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADFFF179B8 for ; Sun, 3 Dec 2023 18:33:28 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8615FC for ; Sun, 3 Dec 2023 08:52:36 -0800 (PST) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R411e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VxgSxzN_1701622352; Received: from 30.27.64.151(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VxgSxzN_1701622352) by smtp.aliyun-inc.com; Mon, 04 Dec 2023 00:52:34 +0800 Message-ID: <5a0e8b44-6feb-b489-cdea-e3be3811804a@linux.alibaba.com> Date: Mon, 4 Dec 2023 00:52:31 +0800 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Weird EROFS data corruption To: Juhyung Park , Gao Xiang , linux-erofs@lists.ozlabs.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-crypto@vger.kernel.org, Yann Collet References: From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Juhyung, On 2023/12/4 00:22, Juhyung Park wrote: > (Cc'ing f2fs and crypto as I've noticed something similar with f2fs a > while ago, which may mean that this is not specific to EROFS: > https://lore.kernel.org/all/CAD14+f2nBZtLfLC6CwNjgCOuRRRjwzttp3D3iK4Of+1EEjK+cw@mail.gmail.com/ > ) > > Hi. > > I'm encountering a very weird EROFS data corruption. > > I noticed when I build an EROFS image for AOSP development, the device > would randomly not boot from a certain build. > After inspecting the log, I noticed that a file got corrupted. Is it observed on your laptop (i7-1185G7), yes? or some other arm64 device? > > After adding a hash check during the build flow, I noticed that EROFS > would randomly read data wrong. > > I now have a reliable method of reproducing the issue, but here's the > funny/weird part: it's only happening on my laptop (i7-1185G7). This > is not happening with my 128 cores buildfarm machine (Threadripper > 3990X).> > I first suspected a hardware issue, but: > a. The laptop had its motherboard replaced recently (due to a failing > physical Type-C port). > b. The laptop passes memory test (memtest86). > c. This happens on all kernel versions from v5.4 to the latest v6.6 > including my personal custom builds and Canonical's official Ubuntu > kernels. > d. This happens on different host SSDs and file-system combinations. > e. This only happens on LZ4. LZ4HC doesn't trigger the issue. > f. This only happens when mounting the image natively by the kernel. > Using fuse with erofsfuse is fine. I think it's a weird issue with inplace decompression because you said it depends on the hardware. In addition, with your dataset sadly I cannot reproduce on my local server (Xeon(R) CPU E5-2682 v4). What is the difference between these two machines? just different CPU or they have some other difference like different compliers? Thanks, Gao Xiang