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 82939EB64DC for ; Mon, 3 Jul 2023 14:46:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E14BE28000A; Mon, 3 Jul 2023 10:46:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC4C3280001; Mon, 3 Jul 2023 10:46:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8C4128000A; Mon, 3 Jul 2023 10:46:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B8E09280001 for ; Mon, 3 Jul 2023 10:46:10 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 675BD408A3 for ; Mon, 3 Jul 2023 14:46:10 +0000 (UTC) X-FDA: 80970575700.15.6BEE8CA Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by imf13.hostedemail.com (Postfix) with ESMTP id 2FE8620030 for ; Mon, 3 Jul 2023 14:46:07 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=fNWqBGfo; spf=pass (imf13.hostedemail.com: domain of surenb@google.com designates 209.85.128.173 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688395568; a=rsa-sha256; cv=none; b=kPeuf+Mw0RcpwfEgvMo/NnGbT20BnA/hRp15q4f3ktchWzDUcj/UKjrgP2/HUDpFGo0PMF Rq1BmfIGDX1NSLpuyF9iI6aozs6EBVAHa1lDMglAHYwYYOzkjxOCieyMR71SWdysWI+sR/ zX8S/PcfXWWq1afMOE6yT0J9qwSM2Pw= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=fNWqBGfo; spf=pass (imf13.hostedemail.com: domain of surenb@google.com designates 209.85.128.173 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688395568; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QLyiex5PW9q4KQwt5e4n8aHbWkDUPN3E55RgcwH/ExQ=; b=UavRvnZapCYo8mAuMzoQMABSJlqJorfu2bec5Aym/pyVTkjSaAP1Hxgi9zFr2bBf5cGpda ouuUx0IDAYijp565jDuV1p/FbNrAk98J3tHNlJKE1biFrDBqfaws8rWc88AwWx+fLeNB+a G4MHipxQnzswoZ9Ox2Ftcrcf4YE402k= Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-5728df0a7d9so57132337b3.1 for ; Mon, 03 Jul 2023 07:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688395567; x=1690987567; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QLyiex5PW9q4KQwt5e4n8aHbWkDUPN3E55RgcwH/ExQ=; b=fNWqBGfovkHhjiDMElLlcfFD18HU7ZhSdxBp6R2U37bQASQhmag9T2ZONC6tqyadEB gi7QZeb8dhgulQCBIZbvRMKOxyJa3Jj0pluEAVzZN5NWktnGzqrHUjqQthCcPdAP6+H5 DCiaQSXvsemc5Vod9X9MI5RcKIjW81Hd7lu/KCpjdP6VZ8++d4mk94iJ8Rq8cQQC4XHk Rez3f9f1ObbCPLUg2ePAc/qrGjAhYlcRSLsE1lyV10nGsHs1V47+I+/OZESKViJyo3Sx Z+4+auTAbClpO41I0cI28SudWfdxItmPVzxUQd9y4mrWdeFsIu6aKCZDCDFi1exZQvnf nHsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688395567; x=1690987567; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QLyiex5PW9q4KQwt5e4n8aHbWkDUPN3E55RgcwH/ExQ=; b=FdAYaaXKgrMFaayknJ+7nEMXSX0uHcdwf3P5vAVjxaLmeHqmUJFKpQnRlaSZeVcWrG GAWJ9ukpPw6PkuQEwy00n5TJbLixrpe6FKiaXlEIVKGNC36Q4ZYlhi1Gh++tSXlFBhjX whPOhlChbg+IdfviTxnA3yDcNMKxJkZiZ7E5zvBOgaKE9HkVxCkxVzopyQqQmuM1lx7f F4nmOaubRImpD0MHZBb4GPaFsp/ZhcLbDkBRtAoZNdX6GcVkfZLqABz16//yVE4SLQH0 9ynP2T4KvTJarerkQAh6v3hNJhqQeD75T3rmFmoKcGruuzE/zR+9mWs7tVAk0pVmP/0y +7fg== X-Gm-Message-State: ABy/qLZid6zej31/hNZzPY5OBF15rC+1dA+jOf8+ZOl0BFdI7UitOnSS udXC08SyBH7gwBL60xxznBshbULbCuIMewwoqx/u1A== X-Google-Smtp-Source: APBJJlHikAq0tILRjLqGCYRu4BKOE9T/Q78EnU5DnbFpi4lkIFeo8ccr4sfyJea6G3BGW52R0Q7/ZqT1G4XYB9gHtvs= X-Received: by 2002:a25:bf90:0:b0:c39:9e09:2c71 with SMTP id l16-20020a25bf90000000b00c399e092c71mr10191121ybk.41.1688395566816; Mon, 03 Jul 2023 07:46:06 -0700 (PDT) MIME-Version: 1.0 References: <20230227173632.3292573-1-surenb@google.com> <20230227173632.3292573-30-surenb@google.com> <9a8d788c-b8ba-1b8a-fd79-0e25b1b60bed@kernel.org> <2f150512-e460-a9ae-65db-39dc54fe99d6@kernel.org> In-Reply-To: From: Suren Baghdasaryan Date: Mon, 3 Jul 2023 07:45:55 -0700 Message-ID: Subject: Re: [PATCH v4 29/33] x86/mm: try VMA lock-based page fault handling first To: =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= Cc: Jiri Slaby , akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, chriscli@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, rppt@kernel.org, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, linux-mm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 2FE8620030 X-Stat-Signature: 3njrdjcdryxa5x18pgbyhi6zboto96h6 X-Rspam-User: X-HE-Tag: 1688395567-671207 X-HE-Meta: U2FsdGVkX1+EG+akPzK5sxEV/dajwfePsf2exYN4ufKkYaX57emlzmHwwP01riXEzs4cIj/5pXQsjNoeq4olUFnVocuPNn2kzphgcY5T3TIvHCqu5PYcWzVqZ8P1nU1O51j8qbIW0eCaYnWimXZn730M93kwZPscWhK+vlGDy1MC5/mGmatTAyAfa/T3XrWbojDyT250q6psozFuL1bRZW4AYg/iB2kgcqBuT1mSDdee4rovmE82y1+0RbyHXfAxNzW5f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ham, tests=bogofilter, spamicity=0.000155, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jul 3, 2023 at 6:52=E2=80=AFAM Holger Hoffst=C3=A4tte wrote: > > On 2023-07-03 12:47, Jiri Slaby wrote: > > Cc Jacob Young (from kernel bugzilla) > > > > On 30. 06. 23, 19:40, Suren Baghdasaryan wrote: > >> On Fri, Jun 30, 2023 at 1:43=E2=80=AFAM Jiri Slaby wrote: > >>> > >>> On 30. 06. 23, 10:28, Jiri Slaby wrote: > >>>> > 2348 > >>>> clone3({flags=3DCLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_TH= READ|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, c= hild_tid=3D0x7fcaa5882990, parent_tid=3D0x7fcaa5882990, exit_signal=3D0, st= ack=3D0x7fcaa5082000, stack_size=3D0x7ffe00, tls=3D0x7fcaa58826c0} =3D> {pa= rent_tid=3D[2351]}, 88) =3D 2351 > >>>> > 2350 <... clone3 resumed> =3D> {parent_tid=3D[2372]}, 88) =3D 2= 372 > >>>> > 2351 <... clone3 resumed> =3D> {parent_tid=3D[2354]}, 88) =3D 2= 354 > >>>> > 2351 <... clone3 resumed> =3D> {parent_tid=3D[2357]}, 88) =3D 2= 357 > >>>> > 2354 <... clone3 resumed> =3D> {parent_tid=3D[2355]}, 88) =3D 2= 355 > >>>> > 2355 <... clone3 resumed> =3D> {parent_tid=3D[2370]}, 88) =3D 2= 370 > >>>> > 2370 mmap(NULL, 262144, PROT_READ|PROT_WRITE, > >>>> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 > >>>> > 2370 <... mmap resumed>) =3D 0x7fca68249000 > >>>> > 2372 <... clone3 resumed> =3D> {parent_tid=3D[2384]}, 88) =3D 2= 384 > >>>> > 2384 <... clone3 resumed> =3D> {parent_tid=3D[2388]}, 88) =3D 2= 388 > >>>> > 2388 <... clone3 resumed> =3D> {parent_tid=3D[2392]}, 88) =3D 2= 392 > >>>> > 2392 <... clone3 resumed> =3D> {parent_tid=3D[2395]}, 88) =3D 2= 395 > >>>> > 2395 write(2, "runtime: marked free object in s"..., 36 >>>> ...> > >>>> > >>>> I.e. IIUC, all are threads (CLONE_VM) and thread 2370 mapped ANON > >>>> 0x7fca68249000 - 0x7fca6827ffff and go in thread 2395 thinks for som= e > >>>> reason 0x7fca6824bec8 in that region is "bad". > >> > >> Thanks for the analysis Jiri. > >> Is it possible from these logs to identify whether 2370 finished the > >> mmap operation before 2395 tried to access 0x7fca6824bec8? That access > >> has to happen only after mmap finishes mapping the region. > > > > Hi, > > > > it's hard to tell, but I assume so. > > > > For now, forget about this go's overly complicated, hard to reproduce c= ase and concentrate on the very nice reduced testcase in: > > https://bugzilla.kernel.org/show_bug.cgi?id=3D217624 > > ;) > > > > FWIW, I can reproduce using the test case too. Thanks for the reproducer, Jiri! Let me try it and see if I can figure this one out. > > > > thanks, > > As another (admittedly correlation-only) data point, I noticed at least h= ourly crashes > of Firefox-114 after upgrading to 6.4.1, which had never happened before = with 6.3.x. > After reverting 0bff0aaea03e2a3ed6 - with a bit of context fixup due to f= ollow-up > commits in 6.4.1 - it has been rock stable again, for several hours now. > > cheers > Holger