From patchwork Wed Dec 8 20:28:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35038 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6FDB127BBEA; Wed, 8 Dec 2021 20:31:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D4E7727BBE9 for ; Wed, 8 Dec 2021 20:31:05 +0000 (GMT) Received: from localhost ([::1]:47654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mv3ai-00008O-SZ for patchwork@mira.cbaines.net; Wed, 08 Dec 2021 15:31:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mv3a0-0006lU-1z for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:21 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mv3Zw-0000T2-AK for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:19 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mv3Zw-000625-7M for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:16 -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: Wed, 08 Dec 2021 20:30:16 +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: 51838@debbugs.gnu.org Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163899539422866 (code B ref 51838); Wed, 08 Dec 2021 20:30:16 +0000 Received: (at 51838) by debbugs.gnu.org; 8 Dec 2021 20:29:54 +0000 Received: from localhost ([127.0.0.1]:41639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3ZZ-0005we-HL for submit@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:53 -0500 Received: from mail-vk1-f177.google.com ([209.85.221.177]:35799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3Z1-0005rL-Er for 51838@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:19 -0500 Received: by mail-vk1-f177.google.com with SMTP id q21so2367846vkn.2 for <51838@debbugs.gnu.org>; Wed, 08 Dec 2021 12:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QnGpL2rtIevxwBrEqqArN2uKxmedeFyThj9SVraaMrM=; b=V+0UgfTxrBjDBseg8V/pm3VoSSKK5rJLdOKwICnjCRoIO2CN25v8GXrGHOv85azWlN /HBD8ZKUMcitEtmEq9BOR7i4izpq7vNsHZ1P9pSGTAsVuw0ybRknDM59pXmod5kXdHyz LShGqoNgihmdvLRfufomI+ZsPlbXnYMBf1xLtZ/WtblPp5o1rD3r2D5fw1nRwZL1NP6Q UAImPfd5tyqqeYiO9Lm++jDalWus9rqxoQEYgeUWJcaRqxg52KHtlfUbzcFmzmkCztzf vya3lwig4YVXAGUqs7N5XwJtSZIDUsQ6Mq/5J3Eh8WkfbHb7m1FfMZgGC9rNrHH4x6IN SxHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QnGpL2rtIevxwBrEqqArN2uKxmedeFyThj9SVraaMrM=; b=pbzolqEncpzxfGylquIYE06wqp03XlcBlbwpMdS6+3gLmMtiuPqPZPGFdXWmRE4Jdt mQ6kze5gTh+hTsfRRwcXuUW1TnBiIEviqL+va4yvP6T4NgZHtjYlMFRKLmi/wpma2z8r p5snCOQ4aZwCGdhb9jR2KOJ9WwrnutwFBwMj8FJt8X5WgWAopMjVBJTJruqNmfjaYShd 2qQtMdi/4d4nCU0nAweWIinb7WphxLmIDfsZT4nEZMnRowPfP2zkcXqXETkKSYFPIdm2 V9mE9ILMF1QF3IQno8mnp+ZPr6TasN25w7RPQN9QrpmjOWZEI5WWvBIZPkBiCbETlaFQ +zOw== X-Gm-Message-State: AOAM532dViCMlRYclclo4/1PaGp7DFqjkc+KUCPYy4iKoQBCQCUi+ElP aZSEWfl3SVitYGYkQLPIfSnj//SBvAmLrpvTtas= X-Google-Smtp-Source: ABdhPJzRkkVjTISu2BrvgriYboZQ4Nto1RjSf4L9/x2/GlM+lzo8oqbt+bE/pHkFIODV3PXMWDjGjA== X-Received: by 2002:a05:6122:16a3:: with SMTP id 35mr1282660vkl.12.1638995353857; Wed, 08 Dec 2021 12:29:13 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id y7sm2492118uad.2.2021.12.08.12.29.13 for <51838@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Dec 2021 12:29:13 -0800 (PST) From: Philip McGrath Date: Wed, 8 Dec 2021 15:28:27 -0500 Message-Id: <20211208202838.752542-33-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211208202838.752542-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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.") + (license license:bsd-3)))