Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1570342imm; Wed, 1 Aug 2018 19:24:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc9iQTvMhGr8e+g7drgV16qU1WixX0x30478NqKgJD1IWqE5e9NTxMMHbhH6QjrDkuUHdrM X-Received: by 2002:a63:115e:: with SMTP id 30-v6mr813212pgr.53.1533176662989; Wed, 01 Aug 2018 19:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533176662; cv=none; d=google.com; s=arc-20160816; b=BOYDDhfy3Tg4cRAi+TkCf6J4PzfnVCZJVs5lBzKTJFD/GAAaZE8Q+7UAvLlX8oE4dP Zf5GFJppKjUk8Y7jBv8KA0NjHSYWppAGfQx7oFm7UfUSrsJJfSG3Oy+LXXPk/TT+gVim KIbhcN2l9ZWMT6+FN2atV6RxmOd5aSPT8yhMhHSZoXiz+U6lHBpIxtMEo6KWbedh2/zI 4FGkYfnfemdfE4DSQX15BuGzDQHwthJ6j/n5QW0C6UbBDMGq8gyBRK/+hfBav1tDsMMV yvmfaFJsrTV5Nh3HMeyQynxs7c/3fv0I15Bvp8KPprsNetjM9QwkjV3BT0IYDS5iirGn SKxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=Hf0RVeCmjbcg556nsNajsYYcXeOA1A//TJ/osF6VAy0=; b=tpngw11+ikibnAzUJbi5r3kMhPU+rQ1Y761PJWxhQCWrdfqaUwexf3YNe02P9jhclq ZKbKSW6KzQEz3d7Y+Pb03MZbBvW5EIrnvWGjsvZSxBSm8+ACgRmpRYYf2lT883mXU1lN 7wKI7WQplgO+H+smMdqnObY0pF7EwROVsr5kP4YoWOwkWNRmLx5sCK7fOcuiAQtLaLby 2xQdI0a/1RIvixjvfeXJBM2xYWrv6jn9CGygDZ1OYAFHMnS/k/L16rpYGA/BQafq2BEj pFN7b2iDTUC6Blr7MEo2fhBsmZAGrbF+Kn8jligvbxaB2E/9VnVtn0+t36+DG21/OrzX 6qmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=hpDnHZ2w; dkim=pass header.i=@codeaurora.org header.s=default header.b=hpDnHZ2w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69-v6si518811pla.505.2018.08.01.19.24.05; Wed, 01 Aug 2018 19:24:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=hpDnHZ2w; dkim=pass header.i=@codeaurora.org header.s=default header.b=hpDnHZ2w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbeHBEMA (ORCPT + 99 others); Thu, 2 Aug 2018 00:12:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48180 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725921AbeHBEMA (ORCPT ); Thu, 2 Aug 2018 00:12:00 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B6AA1602B7; Thu, 2 Aug 2018 02:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533176591; bh=JN5I1dnxDyziBpQOLN5udr7oKu/3RV3FSL2Ye4jtXuM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hpDnHZ2wGMjlv0aba6xpYMICvo+FLRjHjB+S6QnZUgrfPCAV5fthrYaENbMXWdRIg hgMknB/SmTj2KMFwjdJn5VPQiXheHh3axyJre3AM806ClKKbXLKSEB7AbXiJknCqsQ 1L1s5nkDJBu2+tFyEiPrQRmUzvjhM28SlfTKbbMg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id F3DEF6079C; Thu, 2 Aug 2018 02:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533176591; bh=JN5I1dnxDyziBpQOLN5udr7oKu/3RV3FSL2Ye4jtXuM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hpDnHZ2wGMjlv0aba6xpYMICvo+FLRjHjB+S6QnZUgrfPCAV5fthrYaENbMXWdRIg hgMknB/SmTj2KMFwjdJn5VPQiXheHh3axyJre3AM806ClKKbXLKSEB7AbXiJknCqsQ 1L1s5nkDJBu2+tFyEiPrQRmUzvjhM28SlfTKbbMg= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Aug 2018 19:23:10 -0700 From: Sodagudi Prasad To: "Darrick J. Wong" Cc: "Theodore Y. Ts'o" , adilger.kernel@dilger.ca, wen.xu@gatech.edu, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Remounting filesystem read-only In-Reply-To: <20180728074704.GA4203@magnolia> References: <366cf3ac534bbadaaa61714a43006ac7@codeaurora.org> <20180727195213.GE13922@thunk.org> <20180728001823.GA28432@thunk.org> <20180728074704.GA4203@magnolia> Message-ID: <91cab9ba274131c4701fe4c1ce444d6b@codeaurora.org> X-Sender: psodagud@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-07-28 00:47, Darrick J. Wong wrote: > On Fri, Jul 27, 2018 at 08:18:23PM -0400, Theodore Y. Ts'o wrote: >> On Fri, Jul 27, 2018 at 01:34:31PM -0700, Sodagudi Prasad wrote: >> > > The error should be pretty clear: "Inode table for bg 0 marked as >> > > needing zeroing". That should never happen. >> > >> > Can you provide any debug patch to detect when this corruption is happening? >> > Source of this corruption and how this is partition getting corrupted? >> > Or which file system operation lead to this corruption? >> >> Do you have a reliable repro? If it's a one-off, it can be caused by >> *anything*. Crappy hardware, a bug in some proprietary, binary-only >> GPU driver dereferencing some wild pointer that corrupts kernel >> memory, etc. >> >> Asking for a debug patch is like asking for "can you create technology >> that can detect when a cockroach enter my house?" > > Well, ext4 *could* add metadata read and write verifiers to complain > loudly in dmesg about stuff that shouldn't be there, so at least we'd > know when we're writing cockroaches into the house... :) > > --D > Hi Ted, Below change fixed this issue. Thanks for your support. https://github.com/torvalds/linux/commit/5012284700775a4e6e3fbe7eac4c543c4874b559 "ext4: fix check to prevent initializing reserved inodes" -Thanks, Prasad >> So if you have a reliable repro, then we know what operations might be >> triggering the corruption, and then you work on creating a minimal >> repro, and only *then* when we have a restricted set of possibilities >> that might be the cause (for example, if removing a GPU call makes the >> problem go away, then the patch would need to be in the proprietary >> GPU driver....) >> >> > I am digging code a bit around this warning to understand more. >> >> The warning means that a flag in block group descriptor #0 is set >> that should never be set. How did the flag get set? There is any >> number of things that could cause that. >> >> You might want to look at the block group descriptor via dumpe2fs or >> debugfs, to see if it's just a single bit getting flipped, or if the >> entire block group descriptor is garbage. Note that under normal code >> paths, the flag *never* gets set by ext4 kernel code. The flag will >> get set on non-block group 0 block group descriptors by ext4, and the >> ext4 kernel code will only clear the flag. >> >> Of course, if there is a bug in some driver that dereferences a >> pointer widely, all bets are off. >> >> - Ted -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, Linux Foundation Collaborative Project