Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6227586ybl; Wed, 15 Jan 2020 00:45:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzdOrQIRlt3UHjA8Ck832rVfwzyUJFf/MfHlyLf18459ToyACWjQdsny92lZaqQMGTx++Ep X-Received: by 2002:a9d:62d9:: with SMTP id z25mr1852314otk.249.1579077901253; Wed, 15 Jan 2020 00:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579077901; cv=none; d=google.com; s=arc-20160816; b=oBySgiCFx6UAvQWoRXFoiX8hAa4TxwN0u0yO3kPb3t/hVTlRArjBEjP/VCqIrASGmY Rqc6mjQqQQVD2ktEyZwycIfBuqx3kZOVER3YhMJqozIBQTEZqs9xKwOvs2i/F8i8xQEd 5wKg+ZuK0ujCNHBXeXsJYOWLwJZmPegpLDBDsriiUAr0xOP/MKHFrsiliYUfGyC3fjX8 sY/LmEdjXtveEefj9ignlvGytt0qkm3NrsPAvbbGUiHbuHJ40yhK3wL7yqsXUr3jwonr +I/b/LqgkZwhe8qs1wDz0x0OdoEjCjngGPDGPmHXrsPhq1G+6usKO3eUsdcZn9aFmeVa YnPg== 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:message-id:subject:cc :to:from:date; bh=S/PNDUAlVVVtYjvRnMN304qOmVqAvWD8J5Xrr48hgz4=; b=HJpJM3lGU9+Zao0Q1/cUBmTPtvqpAO1wqLHi42AOcFxmdFLbYkGPEyINLD2TQ7YBfq tNB3mzFYIB3I9w/jiLEMPLafBtUp5NVEb0BIyl80H1LBNu9jUnWuR1Z6AJFNdh04aU5F HtACqnSbGfhRY9/QDP4ESvheeMc6ZqdWzSc5lLup66S7mrIqCLFBl2cQmESXTHTRZUyy B0D9AuMPsBaj7TrnN/6OBSrHXNDgyQwfHAlQSxdivkKTrrpACGKJRNQfOW2pDCjkHqIC bbhUf3qdnuymmFzOkW+CazfflCkNymGB/aukNo6hu/dmqwok8ZrC9nuvxd0+DTqjp1vn cmBw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j19si8702607oij.51.2020.01.15.00.44.48; Wed, 15 Jan 2020 00:45:01 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgAOInj (ORCPT + 99 others); Wed, 15 Jan 2020 03:43:39 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36263 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726472AbgAOInj (ORCPT ); Wed, 15 Jan 2020 03:43:39 -0500 Received: by mail-wr1-f65.google.com with SMTP id z3so14872847wru.3 for ; Wed, 15 Jan 2020 00:43:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=S/PNDUAlVVVtYjvRnMN304qOmVqAvWD8J5Xrr48hgz4=; b=ZR7bqr2lzCWXVFanap+oLk7W9SrOEm1sfsRPZq9dvLTHUHtUMQZbojiTUK5yo0I7vq qv+ycjJIM8g9ZyriLul+qpwPKny4ixXJq22RXkd3b6X7n1uXHAmQtAvQ4pkB4qlF2STb 0WjKvpnMGMbraSuLunoV1AcOII2Ej+HtUYFYwbfbk1rnVGLUue5zwjEsC5lSNfjzo0iK vmwY7r/+pV5q4/okh4gwDps6XzCApCiE/HF1dZw0mv/VR37xKdprRGejYiRQpXsHYJvC Pxe+bZcNwEr7wjMG60MBHFsyjdbgDXqT1JpjKnx91+SFPwsg47U8JjMCdDnxy16aAD1w OjVw== X-Gm-Message-State: APjAAAX0FGMklDhUv5LeTGd/dFd/yIhYmddVkSXJsi2QrfYXWeSBxglr NGZGNn/XEwVRN8M4UO4ODAQ= X-Received: by 2002:adf:d4ca:: with SMTP id w10mr28545870wrk.53.1579077817600; Wed, 15 Jan 2020 00:43:37 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id t8sm23840123wrp.69.2020.01.15.00.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 00:43:36 -0800 (PST) Date: Wed, 15 Jan 2020 09:43:36 +0100 From: Michal Hocko To: David Rientjes Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, oom: dump stack of victim when reaping failed Message-ID: <20200115084336.GW19428@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 14-01-20 15:20:04, David Rientjes wrote: > When a process cannot be oom reaped, for whatever reason, currently the > list of locks that are held is currently dumped to the kernel log. > > Much more interesting is the stack trace of the victim that cannot be > reaped. If the stack trace is dumped, we have the ability to find > related occurrences in the same kernel code and hopefully solve the > issue that is making it wedged. > > Dump the stack trace when a process fails to be oom reaped. Yes, this is really helpful. > Signed-off-by: David Rientjes Acked-by: Michal Hocko Thanks! > --- > mm/oom_kill.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -620,6 +621,7 @@ static void oom_reap_task(struct task_struct *tsk) > > pr_info("oom_reaper: unable to reap pid:%d (%s)\n", > task_pid_nr(tsk), tsk->comm); > + sched_show_task(tsk); > debug_show_all_locks(); > > done: -- Michal Hocko SUSE Labs