From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kMmJFxnPpWCNHAEAgWs5BA (envelope-from ) for ; Thu, 20 May 2021 04:53:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AL0qExnPpWCtbwAAbx9fmQ (envelope-from ) for ; Thu, 20 May 2021 02:53:13 +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 692D7191F7 for ; Thu, 20 May 2021 04:53:12 +0200 (CEST) Received: from localhost ([::1]:47000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljYoA-0000Na-2z for larch@yhetil.org; Wed, 19 May 2021 22:53:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljYo2-0000M6-G7 for bug-guix@gnu.org; Wed, 19 May 2021 22:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljYo2-0006fH-70 for bug-guix@gnu.org; Wed, 19 May 2021 22:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ljYo2-0001V4-6U for bug-guix@gnu.org; Wed, 19 May 2021 22:53:02 -0400 Subject: bug#48521: opendht-service-type hangs Shepherd at boot Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Thu, 20 May 2021 02:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48521 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 48521-done@debbugs.gnu.org Mail-Followup-To: 48521@debbugs.gnu.org, maxim.cournoyer@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 48521-done@debbugs.gnu.org id=D48521.16214791345695 (code D ref 48521); Thu, 20 May 2021 02:53:01 +0000 Received: (at 48521-done) by debbugs.gnu.org; 20 May 2021 02:52:14 +0000 Received: from localhost ([127.0.0.1]:60994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljYnG-0001Tn-Jb for submit@debbugs.gnu.org; Wed, 19 May 2021 22:52:14 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:34589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljYnF-0001TZ-4v for 48521-done@debbugs.gnu.org; Wed, 19 May 2021 22:52:13 -0400 Received: by mail-qt1-f171.google.com with SMTP id v4so11794125qtp.1 for <48521-done@debbugs.gnu.org>; Wed, 19 May 2021 19:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=LgC9vbLDtX+a7WROXApbuADKzP/XOZYBT2Gb203iUew=; b=faklIuPB/cUa8SgsmR6DPyNa1bCSGLuAB1MR9biVzQ6wdsjO+OmveoB0EvVk0JWUh0 HyrLQ0uiSaZ24LYiiHykvQM7Rn4zvQajSoFZweAwKiItLjEyNHQDlN2K+coJdzVqR85H VoavNE0Bl8wS4O5A/QARxcGl+LoAF4/zXDI0ne7dU1wqHG+3flRAKJA2iZMIy5B+gdrb o54FnoN0MDF/HQGn2ysZ7ghUZR743ovFN/KRDNkwTzuU8s+vnqzWuCvMgGiBa9raTGRi e8VIlP/hioynPKnw+91GSHATkq/j1gqkrg3z6VYAGX9xG4VstJD8+wJIQXj2B694DQye bQGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=LgC9vbLDtX+a7WROXApbuADKzP/XOZYBT2Gb203iUew=; b=iCoo3i1LFyZ2/vSnjZet47FyjRPMgOH7Wq72pZHT5CpyGWNO6OFsEZWmLGWDm7z6ZU qNP+hEkLx8akmf9reM77nsPWiLPuJGeBLR5nxoIchf4GZ/nNWM1K5b5o2+SH8o8CDZcH SyfFJde9+8dA+p7ER28ak/3hJUuozCp2NG9oKt2C734jC4m7+98thTmCnpyHN+yB/5z/ f2phMYTYmfWJ107s5R0vBs+oioXDqDeph5xtQ9fJz4KptM3dAifs3iEiVleqmN+sRIWh nYerGP/VqR8dt5oeQNAGlMNQLWNfvOuuhuOHtM81I+yyVCpQtZ8vkKZg7Y0gZ1sx3Cuz qFcw== X-Gm-Message-State: AOAM531OxM6j1eIJ/u8J3D/78ej9cbRfPfgr31N6h40JCW43c8Dc+6du jOCIhkU70npmmS5jOzIaMxioatFQPVk= X-Google-Smtp-Source: ABdhPJxUHNXNZnJscmuGwUPvTuE0d56OycpKhEpqSMRRXhK4LqL2TC5ybHzPSKlKoBQzjcqWUHvawQ== X-Received: by 2002:a05:622a:1044:: with SMTP id f4mr2918434qte.181.1621479127142; Wed, 19 May 2021 19:52:07 -0700 (PDT) Received: from hurd (dsl-150-81.b2b2c.ca. [66.158.150.81]) by smtp.gmail.com with ESMTPSA id u3sm1060811qtg.16.2021.05.19.19.52.06 for <48521-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 19:52:06 -0700 (PDT) From: Maxim Cournoyer References: <874kezhr3c.fsf@gmail.com> Date: Wed, 19 May 2021 22:52:06 -0400 In-Reply-To: <874kezhr3c.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 19 May 2021 07:59:19 -0400") Message-ID: <87v97eglrd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621479193; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-to: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=LgC9vbLDtX+a7WROXApbuADKzP/XOZYBT2Gb203iUew=; b=mxBu+jkZYiwIHDvCnrt8K6oLwCJIro4etLQAUOab3IbXNa2aUxxeVdGfYVIkgkPJZsU7LY Q07tSyhEgUBPCLiqrp8RKNaSSdhB1oxNAVCpp4WoEFKH806JO1BmnLDjoIi0DlfKaqxiJI rMsAK40uVChmqaUvtQuja1sp03m5BHihIbSCoIEZArDbunTqPctVOkk1Z0UDqp4HfUSmlI IfURu/RgrAx/blKVy0QGu5h4w3vfOQWzjNtoDYaLJmU50wUpQzElUUGEej2yAFLTVg09Fm NyRBlf9HzO8MC7CSxZ6NVGzpuZMcHkdHDB01MhvDuaIHSSgJjT0odbbNYcRpbA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621479193; a=rsa-sha256; cv=none; b=BRTlhakLrY+OohsKMq+q1wPw5G/ziagQvhI+MZsaih0bsL3F64NWH4ureYqewdEaR4kjL+ 8urtl06DzjH0CXItJ+Q/cnpK/iFvG/RC8ozQugMFEEHBuzh3OQ6vaMdB5ITfwDjPikUFuS cfjZD4+SLmHy0ne//zPsRgt5ImfK1uv+TeGMkp66PvREfDYEQNpAThWJd9i5QIl5Hb3+KW SUKw1MC2IsTi8cH1SYrPLhQUuckygLi5X9Kx8hAmoBWF1l11dPOJjifgHHlyAYJhfDdBC/ fA0g6w0HOnhL7TaNe6fd+JZ/60qAPa3wYdh31yYqmo10L0Tc+I+F0dpw+pSdlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=faklIuPB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=faklIuPB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 692D7191F7 X-Spam-Score: -1.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: MFXMgqQt9NCf Hello, Maxim Cournoyer writes: > Hello, > > I just noticed about this problem following a reboot. I can also > reproduce it in 'guix system vm', simply adding the opendht-service-type > to my operating-system declaration. > > The boot proceeds until 'error in finalization thread: Success' then > hangs indefinitely. > > What is troubling for me is that the service is rather straightforwardly > defined. It uses the make-forkexec-constructor/container like so: > > (define (opendht-shepherd-service config) > "Return a running OpenDHT." > (shepherd-service > (documentation "Run an OpenDHT node.") > (provision '(opendht dhtnode dhtproxy)) > (requirement '(user-processes syslogd)) > (start #~(make-forkexec-constructor/container > (list #$@(opendht-configuration->command-line-arguments config)) > #:mappings (list (file-system-mapping > (source "/dev/log") ;for syslog > (target source))) > #:user "opendht")) > (stop #~(make-kill-destructor)))) > > I'm not sure how using such basic building blocks could lead to a hang > in Shepherd ? It seems Shepherd can't cope with a failing start procedure/script when a variable was not bound. To diagnose the problem, the best way ended up being to extract the code of the constructor in a separate script to run it separately. This made the error quickly apparent: "Unbound variable: file-system-mapping". We should try to handle this class of errors in Shepherd and report a useful message and *not* crash Shepherd or otherwise hang. Pushed with commit a09cdf1f9d. Closing. Maxim