From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6A08C433F5 for ; Mon, 25 Apr 2022 18:06:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E8B726B0074; Mon, 25 Apr 2022 14:06:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E14066B0075; Mon, 25 Apr 2022 14:06:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C66BD6B0078; Mon, 25 Apr 2022 14:06:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id B29FC6B0074 for ; Mon, 25 Apr 2022 14:06:28 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8E73521DD2 for ; Mon, 25 Apr 2022 18:06:28 +0000 (UTC) X-FDA: 79396181256.26.0055677 Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) by imf05.hostedemail.com (Postfix) with ESMTP id 5480C10004F for ; Mon, 25 Apr 2022 18:06:22 +0000 (UTC) Received: by mail-ua1-f45.google.com with SMTP id i16so3367912uat.5 for ; Mon, 25 Apr 2022 11:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VsCWtGvQdpehXpOnJzf3Xy4LkzxOmS8c7itH/1kQMSU=; b=KeTmEFAL7NujVcG7aypNbHt9mUPTHmIapKOtNOb1rSbp7sY7D18ulNsQ+OWs4CBHpP Ta1EjNmapbeR/qBgcEZhfW1J8aIDhrlx75HHgVSxpg4UZ1i2VHQY0gXr5+R35AUpG3Fr RO0CoBQ5rz8l/z8SecS/fDj+s4LPDDsCU7M4B35wKjeq8y7+/R+zMG1+AnlV4jrJO3sv QVZlhIAAH+IAZMIbEL9ZlKkYZVRy9zJjJltJE7Eq9SQt0m4l9phmmfi2cnB2fxMBEtrF Qoet435VR3xYvNO3eIoYzJ9CYgpb295PmP7ONqd3SZiWt+nzL7ULdZxl0wibOY3y3a9N gXNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VsCWtGvQdpehXpOnJzf3Xy4LkzxOmS8c7itH/1kQMSU=; b=hS9h3fasgslTgDMIAfqNLf8BOKsCnToQD7SMUdaZTwlkvZnWCvOXxDYMO9mv//55/E OW0EoWHmUw41Hd++UU8uAtEvPiR4HBZdmbhh1frC1kQoMQGa0xpevarnPFaY4vmC+Gvl vdymogxD8vAbVQHSRD98fEPAFpq8KkKwRWNYbK5YvmAMomzrMLoCCou6wkSf5k64mPOV HgFVIU01/9IqvDsqiG4Ag5mOaq0LSi8RGNHJ6yuwmRT3EYczeU6+vnus0XodFWUrBECx LdxbnP6UacM7KrE4qFv0BeNW2PBl/0m6lTuIGydWC8/PWh4Bpq39k1hwAsOx/uwfmznG rrog== X-Gm-Message-State: AOAM5325N8a4ar+hRl44HXzYINAIEAq1jTq6jrjrJksI108QSkAe9S7W CT9ZhmlU3SQk+N74/IfVWpwNLycEayPrDV0BOdJizw== X-Google-Smtp-Source: ABdhPJyEjWKt6MQz612hu23UA90+bvp40aD7BMW+buy6PMhx+mCqvc6VvEtk/VNzTsIK/CoeIzcC8MCZfSDNmWZjURY= X-Received: by 2002:ab0:77d5:0:b0:352:42d7:88c2 with SMTP id y21-20020ab077d5000000b0035242d788c2mr5531417uar.1.1650909987129; Mon, 25 Apr 2022 11:06:27 -0700 (PDT) MIME-Version: 1.0 References: <20220414121911.8bb89fc3681b13af1566d79c@linux-foundation.org> <20220416010259.4gbz5hgvm2lgr3sj@revolver> <20220416151923.ig5zavuptjsufm3d@revolver> <20220419155055.qf52xpcftqb3r5nj@revolver> <20220419231748.omnhkl43vl5ep2j5@revolver> <20220420134336.bny7wza3ez2ldjsd@revolver> In-Reply-To: <20220420134336.bny7wza3ez2ldjsd@revolver> From: Yu Zhao Date: Mon, 25 Apr 2022 12:05:51 -0600 Message-ID: Subject: Re: [PATCH v7 00/70] Introducing the Maple Tree To: Liam Howlett Cc: Andrew Morton , "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=KeTmEFAL; spf=pass (imf05.hostedemail.com: domain of yuzhao@google.com designates 209.85.222.45 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5480C10004F X-Stat-Signature: n74cgajs45ar31jp9teswxyd6pnzwpqy X-HE-Tag: 1650909982-19251 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 20, 2022 at 7:43 AM Liam Howlett wrote: > > * Yu Zhao [220419 19:23]: > > On Tue, Apr 19, 2022 at 5:18 PM Liam Howlett wrote: > > > > > > * Yu Zhao [220419 17:59]: > > > > On Tue, Apr 19, 2022 at 9:51 AM Liam Howlett wrote: > > > > > > > > > > * Yu Zhao [220416 15:30]: > > > > > > On Sat, Apr 16, 2022 at 9:19 AM Liam Howlett wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > How did you hit this issue? Just on boot? > > > > > > > > > > > > I was hoping this is known to you or you have something I can verify for you. > > > > > > > > > > > > > > > Thanks, yes. I believe that both crashes are the same root cause. The > > > > > cause is that I was not cleaning up after the kmem bulk allocation > > > > > failure on my side. Please test with this patch. > > > > > > > > Thanks. I applied this patch and hit a LOCKDEP and then a BUG_ON: > > > > > > > > lib/maple_tree.c:847 suspicious rcu_dereference_protected() usage! > > > > Call Trace: > > > > > > > > dump_stack_lvl+0x6c/0x9a > > > > dump_stack+0x10/0x12 > > > > lockdep_rcu_suspicious+0x12c/0x140 > > > > __mt_destroy+0x96/0xd0 > > > > exit_mmap+0x2a0/0x360 > > > > __mmput+0x34/0x100 > > > > mmput+0x2f/0x40 > > > > free_bprm+0x64/0xe0 > > > > kernel_execve+0x129/0x330 > > > > call_usermodehelper_exec_async+0xd8/0x130 > > > > ? proc_cap_handler+0x210/0x210 > > > > ret_from_fork+0x1f/0x30 > > > > > > > > > > Thanks - I'm not sure how this got through, but this should fix it. > > > > > > This should be added to 4236a642ad185 to avoid the LOCKDEP issue. > > > > > > --- a/mm/mmap.c > > > +++ b/mm/mmap.c > > > @@ -3163,9 +3163,9 @@ void exit_mmap(struct mm_struct *mm) > > > > > > BUG_ON(count != mm->map_count); > > > > > > - mmap_write_unlock(mm); > > > trace_exit_mmap(mm); > > > __mt_destroy(&mm->mm_mt); > > > + mmap_write_unlock(mm); > > > vm_unacct_memory(nr_accounted); > > > } > > > > Will try this. > > > Andrew, > > Please add this fix to the commit 4236a642ad185 "mm: start tracking VMAs > with maple tree" > > I've attached the patch for your convenience. Hi Liam, I assume you are still looking at the BUG_ON problem. I'll restart my testing once you have something for me to try. Thanks.