Received: by 10.223.185.116 with SMTP id b49csp7607546wrg; Thu, 1 Mar 2018 08:08:34 -0800 (PST) X-Google-Smtp-Source: AG47ELu5ioaA2zzZRmZY/BMyI7jXjh3eC3FRG+haIJ9Hgvmy7DPKiqYJ8xZkFTXYOBtb4JM25Lo+ X-Received: by 10.101.86.1 with SMTP id l1mr1980604pgs.140.1519920514060; Thu, 01 Mar 2018 08:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519920514; cv=none; d=google.com; s=arc-20160816; b=kOYCWJjUOga9zxxN8N1Mx7zA/GTtB4rpnwGwZViowpLxD4xtlg6QYeREziuzsLc7Mh G/plScIgz/lDBXS8ugoDqtLlKGG1Fyp/0c+EvL997qcsIA5zCOigXxYcwqnRrT80gKR9 /SBZqTYu+ZMjRAbiIkkXayCdylyEm4E79Vr6kpC22h7uG6tFKn71He+5Cm9kiKI2oBAt udVoFdR7/stG1CvYxlDXaaexTA8CqpHo0ioynBZvkCO9B8J8bXvB/ot9Tb+691wNFZDf qM88JD1VKGr/68tt2VP2VlzkBUBRh31PhBtyR7F1Z90vgHmIUIkBune+ggPAn4QiXxnn 2BCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=+8PeOh72EH3F8iy2ahUmk3YOhbAGF/pHDX9m/HIHcrE=; b=GDX8aMoln0sNJUFf1O5wqiZWp/YMoyJLYfRFi7dfxW1xon8t6KGeiEGytLShSDlX5c 2tW1+FJcoXC8dpxguD3vwT+mw8gMxswKiOg3u5sX+Cr0D+Pww8Rm0G1ui2ivG+S9w06A 0GYvp7mlyD+erFVOthbEEDRf9C4Km+mn/7WkIETfCQlq2Zb2nAp7vZjjy0h1csPBWGk0 +7EZmPU892zInVEZpniddIRP1lOKCrxoLE/WKsQ032ZsYTfcj/YvNlMjaXm1CbOYw2vz woizh5D2M3cqQc+7GxVZG8lLB0YAA4iGDP/yqyAUi/S7vZvbjcBk5FUFWTkKrNQydf+A VntA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=S3tQzH9a; 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 f6si2627690pgn.165.2018.03.01.08.08.17; Thu, 01 Mar 2018 08:08:34 -0800 (PST) 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=fail header.i=@thunk.org header.s=ef5046eb header.b=S3tQzH9a; 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 S1032733AbeCAQEo (ORCPT + 99 others); Thu, 1 Mar 2018 11:04:44 -0500 Received: from imap.thunk.org ([74.207.234.97]:42372 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032077AbeCAQEl (ORCPT ); Thu, 1 Mar 2018 11:04:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+8PeOh72EH3F8iy2ahUmk3YOhbAGF/pHDX9m/HIHcrE=; b=S3tQzH9aElQ+kmlexI30mn4s9D 3vFrjT02SYkYZ6W1ao0nnfvzWhUuLbLHbL03UVVDdacst96NWied5E90N9NpOjP34HewsG+juJbua ZO4nVLsq55likQMfb8587ffvI3XFFE5AOwz5v7i8pyddF8pw+zExeZWmxgvL7kg5XejQ=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1erQgt-0004Nz-T4; Thu, 01 Mar 2018 16:04:19 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 8E9C87A01CE; Thu, 1 Mar 2018 11:04:18 -0500 (EST) Date: Thu, 1 Mar 2018 11:04:18 -0500 From: Theodore Ts'o To: Adrian Hunter Cc: Andreas Dilger , Dmitry Osipenko , Ulf Hansson , linux-mmc , linux-block , linux-kernel , Bough Chen , Alex Lemberg , Mateusz Nowak , Yuliy Izrailov , Jaehoon Chung , Dong Aisheng , Das Asutosh , Zhangfei Gao , Sahitya Tummala , Harjani Ritesh , Venu Byravarasu , Linus Walleij , Shawn Lin , Bartlomiej Zolnierkiewicz , Christoph Hellwig , Thierry Reding , Krishna Reddy , linux-ext4@vger.kernel.org Subject: Re: EXT4 Oops (Re: [PATCH V15 06/22] mmc: block: Add blk-mq support) Message-ID: <20180301160418.GA2490@thunk.org> Mail-Followup-To: Theodore Ts'o , Adrian Hunter , Andreas Dilger , Dmitry Osipenko , Ulf Hansson , linux-mmc , linux-block , linux-kernel , Bough Chen , Alex Lemberg , Mateusz Nowak , Yuliy Izrailov , Jaehoon Chung , Dong Aisheng , Das Asutosh , Zhangfei Gao , Sahitya Tummala , Harjani Ritesh , Venu Byravarasu , Linus Walleij , Shawn Lin , Bartlomiej Zolnierkiewicz , Christoph Hellwig , Thierry Reding , Krishna Reddy , linux-ext4@vger.kernel.org References: <1511962879-24262-1-git-send-email-adrian.hunter@intel.com> <1511962879-24262-7-git-send-email-adrian.hunter@intel.com> <829308a3-3bf6-c173-65fa-e2a0f45f7f61@intel.com> <68886f99-97f5-897a-f754-6f414741bd5a@gmail.com> <22580b82-0257-b156-9f0c-79afa34067e5@gmail.com> <8876217f-ede6-fc81-2e05-b4fc976b3235@intel.com> <6a1267b0-6242-fc9f-60ed-02bf34677b62@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a1267b0-6242-fc9f-60ed-02bf34677b62@intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 01, 2018 at 10:55:37AM +0200, Adrian Hunter wrote: > On 27/02/18 11:28, Adrian Hunter wrote: > > On 26/02/18 23:48, Dmitry Osipenko wrote: > >> But still something is wrong... I've been getting occasional EXT4 Ooops's, like > >> the one below, and __wait_on_bit() is always figuring in the stacktrace. It > >> never happened with blk-mq disabled, though it could be a coincidence and > >> actually unrelated to blk-mq patches. > > > >> [ 6625.992337] Unable to handle kernel NULL pointer dereference at virtual > >> address 0000001c > >> [ 6625.993004] pgd = 00b30c03 > >> [ 6625.993257] [0000001c] *pgd=00000000 > >> [ 6625.993594] Internal error: Oops: 5 [#1] PREEMPT SMP ARM > >> [ 6625.994022] Modules linked in: > >> [ 6625.994326] CPU: 1 PID: 19355 Comm: dpkg Not tainted > >> 4.16.0-rc2-next-20180220-00095-ge9c9f5689a84-dirty #2090 > >> [ 6625.995078] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) > >> [ 6625.995595] PC is aht dx_probe+0x68/0x684 > >> [ 6625.995947] LR is at __wait_on_bit+0xac/0xc8 This doesn't seem to make sense; the PC is where we are currently executing, and LR is the "Link Register" where the flow of control will be returning after the current function returns, right? Well, dx_probe should *not* be returning to __wait_on_bit(). So this just seems.... weird. Ignoring the LR register, this stack trace looks sane... I can't see which pointer could be NULL and getting dereferenced, though. How easily can you reproduce the problem? Can you either (a) translate the PC into a line number, or better yet, if you can reproduce, add a series of BUG_ON's so we can see what's going on? + BUG_ON(frame); memset(frame_in, 0, EXT4_HTREE_LEVEL * sizeof(frame_in[0])); frame->bh = ext4_read_dirblock(dir, 0, INDEX); if (IS_ERR(frame->bh)) return (struct dx_frame *) frame->bh; + BUG_ON(frame->bh); + BUG_ON(frame->bh->b_data); root = (struct dx_root *) frame->bh->b_data; if (root->info.hash_version != DX_HASH_TEA && root->info.hash_version != DX_HASH_HALF_MD4 && root->info.hash_version != DX_HASH_LEGACY) { These are "could never" happen scenarios from looking at the code, but that will help explain what is going on. If this is reliably only happening with mq, the only way I could see that if is something is returning an error when it previously wasn't. This isn't a problem we're seeing with any of our testing, though. Cheers, - Ted