From debbugs-submit-bounces@debbugs.gnu.org Wed May 19 17:36:48 2021 Received: (at 48521) by debbugs.gnu.org; 19 May 2021 21:36:48 +0000 Received: from localhost ([127.0.0.1]:60864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljTs0-0008I0-3f for submit@debbugs.gnu.org; Wed, 19 May 2021 17:36:48 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:38790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljTry-0008Hm-5e for 48521@debbugs.gnu.org; Wed, 19 May 2021 17:36:46 -0400 Received: by mail-qt1-f173.google.com with SMTP id h21so11323873qtu.5 for <48521@debbugs.gnu.org>; Wed, 19 May 2021 14:36:46 -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=WCJHCGcF8matyptbA2eRkFGJ7yxl41N+qNP7Zk/dxYY=; b=pWvJ9rmHOzefjkcdnrmhGEl2Hmtccu9/NcWkAStRS4U6NMOKuBeQzhyAvCVwr7BHCL fIb7MJH5L7AdQwnNNG+IplAHF3s/US76Q3QNdJg7JHckn4nr+7BpyrTYHHBWcfngQ33A MkpkqBHl0nwfRPOkRvqq3QjzLuWCCL3aYTbYI0eA/OBoT99DaAtLCa9hgJTgOLpdE7oD ppmmkd4LtZvkDpjADI63/Hd6H8JPd9srY5hpqwyYvdoSqKiJdcZts+KKHNSjH/NZnELv tbwuVsfLZXCN3s9jS9XF3VgI+5EOCOgmvYhyfuema9lhsWqMDdEWP/EXSb/G6b+SNMdW uPAA== 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=WCJHCGcF8matyptbA2eRkFGJ7yxl41N+qNP7Zk/dxYY=; b=B/PI/hs2AahQNWkq39N0Rjq1r/V12g4aiKBs0ST2KjoakdTIQ1G+rPW1VQowpOOUuv 2RR2kTkqlZTMjrdo1g26lPGoPheEq8QSd6AHbaqeAe+qQDXJbKG8thI8xLSePOW2OlE4 IMbCop5dTPdQu5E5QA65e1qtNNFGm7hHoc22G65nq6w7GlL6+MVjNOCkkEjY+y2tWzKt KR+f3UTqVlmkBXXeSp9YmNmgbZcwQhmzcJ4AmIToWqsWmV8k0Om5sr18l4KjHOL6AYdA x3T/tXiXK0JmLuFIO/2F5sA+ACooRrzZgapOZgbgNsmDlJwUrnK5sh2LbhGxwV22FSjF Rm6A== X-Gm-Message-State: AOAM531ueqmTa5PMxA5CljnETsXlhf1DD2euYsuVCMveeosEj5A46B9w 4s1ooBeOyu6igepn65u0O2g+cXBhzO8= X-Google-Smtp-Source: ABdhPJwpCccrRtYbDH9m1PQ35q+9BElgHyKpkbtREAbxzYR5tFR32xs5hbAF+CKCwow9t3J4KzUUNQ== X-Received: by 2002:a05:622a:588:: with SMTP id c8mr1707548qtb.49.1621460200196; Wed, 19 May 2021 14:36:40 -0700 (PDT) Received: from hurd (dsl-150-81.b2b2c.ca. [66.158.150.81]) by smtp.gmail.com with ESMTPSA id i9sm577263qtg.18.2021.05.19.14.36.39 for <48521@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 14:36:39 -0700 (PDT) From: Maxim Cournoyer To: 48521@debbugs.gnu.org Subject: Re: bug#48521: opendht-service-type hangs Shepherd at boot References: <874kezhr3c.fsf@gmail.com> Date: Wed, 19 May 2021 17:36:38 -0400 In-Reply-To: <874kezhr3c.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 19 May 2021 07:59:19 -0400") Message-ID: <87zgwqh0d5.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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48521 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 ? After much trial and error, the service can be made to not hang Shepherd with the removal of the mappings argument: --8<---------------cut here---------------start------------->8--- modified gnu/services/networking.scm @@ -845,9 +845,9 @@ CONFIG, an object." (requirement '(user-processes networking 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))) + ;; #:mappings (list (file-system-mapping + ;; (source "/dev/log") ;for syslog + ;; (target source))) #:user "opendht")) (stop #~(make-kill-destructor)))) --8<---------------cut here---------------end--------------->8--- I have no idea why that is, but given that the tor-service-type does the same thing, I can only conclude that it is some strange interaction between dhtnode and syslog. The above fixes the hang, but breaks logging to syslog. Ideas? Maxim