From mboxrd@z Thu Jan 1 00:00:00 1970 From: valdis.kletnieks@vt.edu Subject: Re: [PATCH] kernel/signal: Signal-based pre-coredump notification Date: Mon, 15 Oct 2018 20:33:51 -0400 Message-ID: <5192.1539650031@turing-police.cc.vt.edu> References: <87va62lri4.fsf@xmission.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1539650031_2195P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87va62lri4.fsf@xmission.com> Sender: linux-kernel-owner@vger.kernel.org To: "Eric W. Biederman" Cc: Enke Chen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Arnd Bergmann , Khalid Aziz , Kate Stewart , Helge Deller , Greg Kroah-Hartman , Al Viro , Andrew Morton , Christian Brauner , Catalin Marinas , Will Deacon , Dave Martin , Mauro Carvalho Chehab , Michal Hocko , Rik van Riel List-Id: linux-arch.vger.kernel.org --==_Exmh_1539650031_2195P Content-Type: text/plain; charset=us-ascii On Mon, 15 Oct 2018 18:28:03 -0500, Eric W. Biederman said: > Enke Chen writes: > > > For simplicity and consistency, this patch provides an implementation > > for signal-based fault notification prior to the coredump of a child > > process. A new prctl command, PR_SET_PREDUMP_SIG, is defined that can > > be used by an application to express its interest and to specify the > > signal (SIGCHLD or SIGUSR1 or SIGUSR2) for such a notification. A new > > signal code (si_code), CLD_PREDUMP, is also defined for SIGCHLD. > > > > Background: > > > > As the coredump of a process may take time, in certain time-sensitive > > applications it is necessary for a parent process (e.g., a process > > manager) to be notified of a child's imminent death before the coredump > > so that the parent process can act sooner, such as re-spawning an > > application process, or initiating a control-plane fail-over. > > You talk about time senstive and then you talk about bash scripts. > I don't think your definition of time-sensitive and my definition match. When the process image is measured in hundreds of gigabytes, the corefile can take a while even by /bin/bash standards. You want fun, watch an HPC process manage to OOM a machine with 3T of RAM in a way that produces a full image coredump. To network storage. --==_Exmh_1539650031_2195P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.8.0 04/21/2017 iQEVAwUBW8Ux740DS38y7CIcAQJpSAf8CFlhML3n1ezv9Www7szL9y4zQSSV/ELG HvVFpEvQrLIU8cc3TvFIN0zBVIfdyNUwU01fmUT2CasrmdNQiDfZg88e6dUFdNgH Sm5MRVZJqlfBH8NycbmVs4RclMlbyNgYz9Dk9vAnw2FqBehjoQPvVmAhGr4KiFpP oF9xSDEMm2URShb/g0PCaB64dOHPObqnRaNtdYYrTeIw6fKSC8ravOiLzRp9u2uA JrQZE0WwKM0aE5EQNur0DucH7VJ5tpBxdTqDWkTtivHt81Z+SZ/w6/yliScupxt3 4ByNw0CeSreIV4VLyJuZyZkUi3I+s2nXn+JuOjrZxu2AL/eurFwG5A== =p90O -----END PGP SIGNATURE----- --==_Exmh_1539650031_2195P-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound.smtp.vt.edu ([198.82.183.121]:50940 "EHLO omr1.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726946AbeJPIVm (ORCPT ); Tue, 16 Oct 2018 04:21:42 -0400 Received: from mr1.cc.vt.edu (inbound.smtp.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr1.cc.vt.edu (8.14.4/8.14.4) with ESMTP id w9G0Y0o3008783 for ; Mon, 15 Oct 2018 20:34:00 -0400 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id w9G0Xts2009532 for ; Mon, 15 Oct 2018 20:34:00 -0400 Received: by mail-qt1-f200.google.com with SMTP id y23-v6so22601276qtc.7 for ; Mon, 15 Oct 2018 17:34:00 -0700 (PDT) From: valdis.kletnieks@vt.edu Subject: Re: [PATCH] kernel/signal: Signal-based pre-coredump notification In-Reply-To: <87va62lri4.fsf@xmission.com> References: <87va62lri4.fsf@xmission.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1539650031_2195P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Mon, 15 Oct 2018 20:33:51 -0400 Message-ID: <5192.1539650031@turing-police.cc.vt.edu> Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Eric W. Biederman" Cc: Enke Chen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Arnd Bergmann , Khalid Aziz , Kate Stewart , Helge Deller , Greg Kroah-Hartman , Al Viro , Andrew Morton , Christian Brauner , Catalin Marinas , Will Deacon , Dave Martin , Mauro Carvalho Chehab , Michal Hocko , Rik van Riel , "Kirill A. Shutemov" , Roman Gushchin , Marcos Paulo de Souza , Oleg Nesterov , Dominik Brodowski , Cyrill Gorcunov , Yang Shi , Jann Horn , Kees Cook , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, "Victor Kamensky (kamensky)" , xe-linux-external@cisco.com, Stefan Strogin Message-ID: <20181016003351.omD9PIsQjB0zJH1FsDGlCQGhezbz-70prTl8X68vleA@z> --==_Exmh_1539650031_2195P Content-Type: text/plain; charset=us-ascii On Mon, 15 Oct 2018 18:28:03 -0500, Eric W. Biederman said: > Enke Chen writes: > > > For simplicity and consistency, this patch provides an implementation > > for signal-based fault notification prior to the coredump of a child > > process. A new prctl command, PR_SET_PREDUMP_SIG, is defined that can > > be used by an application to express its interest and to specify the > > signal (SIGCHLD or SIGUSR1 or SIGUSR2) for such a notification. A new > > signal code (si_code), CLD_PREDUMP, is also defined for SIGCHLD. > > > > Background: > > > > As the coredump of a process may take time, in certain time-sensitive > > applications it is necessary for a parent process (e.g., a process > > manager) to be notified of a child's imminent death before the coredump > > so that the parent process can act sooner, such as re-spawning an > > application process, or initiating a control-plane fail-over. > > You talk about time senstive and then you talk about bash scripts. > I don't think your definition of time-sensitive and my definition match. When the process image is measured in hundreds of gigabytes, the corefile can take a while even by /bin/bash standards. You want fun, watch an HPC process manage to OOM a machine with 3T of RAM in a way that produces a full image coredump. To network storage. --==_Exmh_1539650031_2195P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.8.0 04/21/2017 iQEVAwUBW8Ux740DS38y7CIcAQJpSAf8CFlhML3n1ezv9Www7szL9y4zQSSV/ELG HvVFpEvQrLIU8cc3TvFIN0zBVIfdyNUwU01fmUT2CasrmdNQiDfZg88e6dUFdNgH Sm5MRVZJqlfBH8NycbmVs4RclMlbyNgYz9Dk9vAnw2FqBehjoQPvVmAhGr4KiFpP oF9xSDEMm2URShb/g0PCaB64dOHPObqnRaNtdYYrTeIw6fKSC8ravOiLzRp9u2uA JrQZE0WwKM0aE5EQNur0DucH7VJ5tpBxdTqDWkTtivHt81Z+SZ/w6/yliScupxt3 4ByNw0CeSreIV4VLyJuZyZkUi3I+s2nXn+JuOjrZxu2AL/eurFwG5A== =p90O -----END PGP SIGNATURE----- --==_Exmh_1539650031_2195P--