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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9DE7CA9EBD for ; Fri, 25 Oct 2019 11:50:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9980A21D81 for ; Fri, 25 Oct 2019 11:50:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9980A21D81 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 45CA36B0003; Fri, 25 Oct 2019 07:50:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 40D976B0006; Fri, 25 Oct 2019 07:50:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 32BEE6B0007; Fri, 25 Oct 2019 07:50:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 0AC6E6B0003 for ; Fri, 25 Oct 2019 07:50:42 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 631CA8249980 for ; Fri, 25 Oct 2019 11:50:41 +0000 (UTC) X-FDA: 76082139882.09.hat16_2316128d8e216 X-HE-Tag: hat16_2316128d8e216 X-Filterd-Recvd-Size: 2427 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Fri, 25 Oct 2019 11:50:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 77D88B49A; Fri, 25 Oct 2019 11:50:39 +0000 (UTC) Date: Fri, 25 Oct 2019 13:50:38 +0200 From: Michal Hocko To: snazy@snazy.de Cc: Randy Dunlap , linux-kernel@vger.kernel.org, Linux MM , Andrew Morton , "Potyra, Stefan" Subject: Re: mlockall(MCL_CURRENT) blocking infinitely Message-ID: <20191025115038.GF17610@dhcp22.suse.cz> References: <4576b336-66e6-e2bb-cd6a-51300ed74ab8@snazy.de> <20191025092143.GE658@dhcp22.suse.cz> <70393308155182714dcb7485fdd6025c1fa59421.camel@gmx.de> <20191025114633.GE17610@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191025114633.GE17610@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Fri 25-10-19 13:46:33, Michal Hocko wrote: > On Fri 25-10-19 13:02:23, Robert Stupp wrote: > > On Fri, 2019-10-25 at 11:21 +0200, Michal Hocko wrote: > > > On Thu 24-10-19 16:34:46, Randy Dunlap wrote: > > > > [adding linux-mm + people] > > > > > > > > On 10/24/19 12:36 AM, Robert Stupp wrote: > > > > > Hi guys, > > > > > > > > > > I've got an issue with `mlockall(MCL_CURRENT)` after upgrading > > > > > Ubuntu 19.04 to 19.10 - i.e. kernel version change from 5.0.x to > > > > > 5.3.x. > > > > > > > > > > The following simple program hangs forever with one CPU running > > > > > at 100% (kernel): > > > > > > Can you capture everal snapshots of proc/$(pidof $YOURTASK)/stack > > > while > > > this is happening? Btw. I have tested $ cat test_mlockall.c #include #include int main(char** argv) { printf("Before mlockall(MCL_CURRENT|MCL_FUTURE)\n"); // works in 5.0 // hangs forever w/ 5.1 and newer int e = mlockall(MCL_CURRENT|MCL_FUTURE); printf("After mlockall(MCL_CURRENT|MCL_FUTURE) %d\n", e); } $./test_mlockall Before mlockall(MCL_CURRENT|MCL_FUTURE) After mlockall(MCL_CURRENT|MCL_FUTURE) 0 -- Michal Hocko SUSE Labs