From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EFbcHAwWsWE0CQAAgWs5BA (envelope-from ) for ; Wed, 08 Dec 2021 21:31:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CPW3GAwWsWGregAA1q6Kng (envelope-from ) for ; Wed, 08 Dec 2021 20:31:08 +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 387B5909C for ; Wed, 8 Dec 2021 21:31:08 +0100 (CET) Received: from localhost ([::1]:47654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mv3al-00008O-EB for larch@yhetil.org; Wed, 08 Dec 2021 15:31:07 -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 Content-Transfer-Encoding: 8bit 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=1638995468; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=QnGpL2rtIevxwBrEqqArN2uKxmedeFyThj9SVraaMrM=; b=sxfuY0VB3deSrKjuWFNsYaePVFN1ANlp9Mb4CYsUMizThDP5HSbjzmV5M2WiXz0Z65iB8w m1aA3DMpqS2QXetTbMIPt4nb8Sm4EdLuyBcfKNOouR9pkWAJhSsHVj5iuzjzahS2Dt7LO+ 31xbpmu9bxLzg7n6SRThN7g++JGiSrWYMlhXzPe+xvrfeZQ4pa44A6+hqmaVmQJ0pf6ync h4mXY4RQOdHEUa9ikQa4aIeyuRq5UZYaj4bk3TLtTw4+oCI+gbCMctvKNj/P2Wulhr6wB4 dY00DcB/228fqJ2YRu1Sbwb7NIpuGz2hk4T4mM94l8U/zgYMjysRz1eTYxSppQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638995468; a=rsa-sha256; cv=none; b=jGsUkNqVK6fprVIMbNG29X5YRw2Tlatf8MHaVMHS7cHFFtsqdpC/lJx2js2tpzHJMkzM2k 8bB4xtpjm8VklH9/znGgZoNQgFEAF6lqIqSCTn6taoJdvQ05OV0410dz43jArd6YsRLgTE qsdIFJmFCsI0TDBZ/cHVlk2rWaK09WNMV0rphzdHCGfvugPcHSOyf/ff6y30cGEG7fJH6f ZJ9wCGx6CRMuD+EAjn+NmhvNIhhjYBIdsZO5KxrVbmWw9wHDvpjrcpSUVj2CZjz9gLQhvH jfdBMu0poqCCLCqvFha0KtF3iMiLDEZ6BB7fovFTEFTzdAnCrXncAOqJtvAHJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=V+0UgfTx; 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: -0.45 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=V+0UgfTx; 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: 387B5909C X-Spam-Score: -0.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9pI4N22oFfUy * 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))) -- 2.32.0