From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eEx4ExBstmGcTAAAgWs5BA (envelope-from ) for ; Sun, 12 Dec 2021 22:39:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cHApDxBstmHIEwAAB5/wlQ (envelope-from ) for ; Sun, 12 Dec 2021 21:39:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EB718110BA for ; Sun, 12 Dec 2021 22:39:27 +0100 (CET) Received: from localhost ([::1]:59614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwWZ5-0000XC-57 for larch@yhetil.org; Sun, 12 Dec 2021 16:39:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwWYg-0000Ww-GL for guix-patches@gnu.org; Sun, 12 Dec 2021 16:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwWYg-00024Z-2v for guix-patches@gnu.org; Sun, 12 Dec 2021 16:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwWYf-0004KL-VU for guix-patches@gnu.org; Sun, 12 Dec 2021 16:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v3 32/43] gnu: Add node-segfault-handler. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Dec 2021 21:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Pierre Langlois Cc: 51838@debbugs.gnu.org X-Debbugs-Original-Cc: 51838@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163934509816585 (code B ref -1); Sun, 12 Dec 2021 21:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Dec 2021 21:38:18 +0000 Received: from localhost ([127.0.0.1]:53348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwWXy-0004JL-G3 for submit@debbugs.gnu.org; Sun, 12 Dec 2021 16:38:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:33040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwWXx-0004J6-9Z for submit@debbugs.gnu.org; Sun, 12 Dec 2021 16:38:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwWXx-0000V9-34 for guix-patches@gnu.org; Sun, 12 Dec 2021 16:38:17 -0500 Received: from [2607:f8b0:4864:20::92d] (port=40951 helo=mail-ua1-x92d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwWXs-00020i-Iq for guix-patches@gnu.org; Sun, 12 Dec 2021 16:38:16 -0500 Received: by mail-ua1-x92d.google.com with SMTP id y5so26070003ual.7 for ; Sun, 12 Dec 2021 13:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=bsxdj/ZvEV3UzB/8/vYjPS0sAo/FkiD/DZEPXbkdeVA=; b=jEHr6+2f/2L0twvlDLU7xCaptEZyBI6OwlFfog2brwIaZYmcgKQbYMt4TZL4GzIu9e LHkwgQshTEifRSCGtOkMqEK5ZcDuCL7L0P8RAdAnwU7a/DmTpxd4FA31lkGRJt9DtNDx D3njPofQSaUgYNSvYwiXN6p03l2Bh6VzwZTx7KqV9uTAsurffW8yfezYzaikoo/ojS1+ XQMy6MPfrrXd59PPOJWoUYT11J2KK9y9TGftRhgriYbO9pcyqXzrjHdUePifLykXjiJN 22jInRGOVQgrF0Th5VynwM9JJVqBHH80kr/21cPq2R/Sxm4nieLSeOnya+dOu8JMmEuQ s7rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=bsxdj/ZvEV3UzB/8/vYjPS0sAo/FkiD/DZEPXbkdeVA=; b=qa5rzGWiJXq3tJKP3VmQLtqV+7S2PXSlonYSMaNy4NwoP6wKqQUF/BzotKP05QxNBz tBzYN/U5ee3m15hb998wSpzXELq7vlp16/mztn3pYk3zEbLs/HNVEg3KRz3rzkzbQqbT JYSU2N8/b91rBSiKqwH9CcsoYg5A4pjyNqWleS0kEdY82x7LTAD3EDl9NvF0oIubGeQW MRnZ1SIy7bbFRbqcXZllbwOKU+8aEVJorMteu8KFHDNrLTs2sXRNfbIR+ymPPvUyOQXX pgLEJQCOQMxt8jQ8ejBEhxf6ybs9XzbQVfYHyn7UXOUhk4ekOPH7Dni6+xJrN6DSzDk9 H9nQ== X-Gm-Message-State: AOAM533E5P85U/dYglLdW0jJkqBsoPmLMRhoM5QX0Rv2LsnAJn22FkLz ZAVjiW4qmO9eulJEdjFMpPE99w== X-Google-Smtp-Source: ABdhPJwwBxbenQKis7hiAxhndq0e/HqlFEXt3OwBcTKz02v4ukFHugHYI7v9584XeAt4hyjcCL/DWw== X-Received: by 2002:a05:6102:f12:: with SMTP id v18mr25423181vss.0.1639345091487; Sun, 12 Dec 2021 13:38:11 -0800 (PST) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id e7sm3535337vkn.20.2021.12.12.13.38.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 13:38:11 -0800 (PST) Message-ID: <88859ca2-0862-c48b-61c5-3dfe9b5e40bb@philipmcgrath.com> Date: Sun, 12 Dec 2021 16:38:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-US References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> <20211208202838.752542-33-philip@philipmcgrath.com> <87czm1wzlv.fsf@gmx.com> From: Philip McGrath In-Reply-To: <87czm1wzlv.fsf@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::92d (failed) Received-SPF: neutral client-ip=2607:f8b0:4864:20::92d; envelope-from=philip@philipmcgrath.com; helo=mail-ua1-x92d.google.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-2.051, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639345168; h=from:from:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bsxdj/ZvEV3UzB/8/vYjPS0sAo/FkiD/DZEPXbkdeVA=; b=Yz0N6H8hIpkFFbN2QnpL7sD9qmgFiVEM3+Rl2qaNFrBfNACiaDvgK0G+KWICbpKbhcBWnI CkwEwr/iaDGbu8bN4e+VHKnEQVAtV9Vh7qB2snPyiQUzW5EoaRqwIwerzG0FnW62F3Jokt 22VoUtFdLyZ7kOcsD6Op9sR9w8mZ1I9DJEgYhphp7jnB1JC3QuK75n8zPHmuoWc1Giisaq OA5W7GBU94yg6iaRMR5W5eCH51nY5IxII0f6lxxye0HXf2nHjwKKFk8zEUexXM4Nt0MMc3 hRRB2gZ3ZbilvNI3CRvF8Bkks3rtv81I16HeqBk6pqJjUDFQveSuZ89SH0qRsQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639345168; a=rsa-sha256; cv=none; b=rOf5wOGQ1E2NbAams0rKKpYT5oIxsDAOiACbqzvnGD93vtx5KnBatVPszbIzPEOOkY1gtT JN1zrJktA8iBnbDDUFwNNFhazMrvYDDPIHlMyEw9Pl7v510OLdyUa19JLE8h4Xvr7FfAdF of7YSVkl8rjHZDpSxA9bMULQBGGdB++d6TT9W75DVSiPgwHzJnvFSo1R7cODvU2XZkMwTU 5Zu1OXvP6XSZtSX9+1tZN+XCNWMsuwdGuy9Uj1QFEK8Ms+CHZt+nUliJvajaB7UJmOavyD DJuUHJl/Cfnz4VMyvZGNkG6UG0CckYIagO0ymmSNmxkHEt+0UXwkJF74inw+3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=jEHr6+2f; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=jEHr6+2f; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EB718110BA X-Spam-Score: -2.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: QemOrML8lD2H On 12/12/21 11:31, Pierre Langlois wrote: > > Philip McGrath writes: > >> * gnu/packages/node-xyz.scm (node-segfault-handler): New variable. >> --- >> gnu/packages/node-xyz.scm | 35 +++++++++++++++++++++++++++++++++++ >> 1 file changed, 35 insertions(+) >> >> diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm >> index 196fa55a39..27506062ba 100644 >> --- a/gnu/packages/node-xyz.scm >> +++ b/gnu/packages/node-xyz.scm >> @@ -856,3 +856,38 @@ (define-public node-bindings >> checks @emph{all} the possible locations that a native addon would be built >> at, and returns the first one that loads successfully.") >> (license license:expat))) >> + >> +(define-public node-segfault-handler >> + (package >> + (name "node-segfault-handler") >> + (version "1.3.0") >> + (source >> + (origin >> + (method git-fetch) >> + (uri (git-reference >> + (url "https://github.com/ddopson/node-segfault-handler") >> + (commit (string-append "v" version)))) >> + (file-name (git-file-name name version)) >> + (sha256 >> + (base32 "07nbw35wvrr18kmh8f388v4k5mpjgyy0260bx0xzjdv795i3xvfv")))) >> + (native-inputs >> + `(("python" ,python))) >> + (inputs >> + `(("node-bindings" ,node-bindings) >> + ("node-nan" ,node-nan))) >> + (build-system node-build-system) >> + (arguments >> + ;; there are no tests >> + `(#:tests? #f)) >> + (home-page "https://github.com/ddopson/node-segfault-handler") >> + (synopsis "Catches @code{SIGSEGV} and prints diagnostic information") >> + (description "This package is a tool for debugging Node.js C/C++ native >> +code modules, and is safe to use in production environments. Normally, when a >> +bug is triggered in native code, the @code{node} process simply ends with no >> +helpful information. In production, this can manifest as worker processes >> +restarting for seemingly no reason. Running @code{node} in @code{gdb} is >> +messy and infeasible for a production environment. Instead, this module will >> +sit unobtrusively doing nothing (zero perf impact) as long as Node.js is >> +well-behaved. If a @code{SIGSEGV} signal is raised, the module will print a >> +native stack trace to both STDERR and to a timestamped file.") > > I'd suggest for the description to be a little more succint, maybe just: > > --8<---------------cut here---------------start------------->8--- > This package is a tool for debugging Node.js C/C++ native code modules > and getting stack traces when things go wrong. > --8<---------------cut here---------------end--------------->8--- Yes, this is a bit long. I think I'll keep the last sentence, too, though, so something like: --8<---------------cut here---------------start------------->8--- This package is a tool for debugging Node.js C/C++ native code modules and getting stack traces when things go wrong. If a @code{SIGSEGV} signal is raised, the module will print a native stack trace to both STDERR and to a timestamped file. --8<---------------cut here---------------end--------------->8--- (And maybe I should be using texinfo markup for STDERR, too.) -Philip