From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eGuANxCHZmQmKgAASxT56A (envelope-from ) for ; Thu, 18 May 2023 22:14:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mKNaNxCHZmTo1wAAauVa8A (envelope-from ) for ; Thu, 18 May 2023 22:14:08 +0200 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 7371C2BD31 for ; Thu, 18 May 2023 22:14:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzk0O-0001yD-4w; Thu, 18 May 2023 16:13:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzjzr-0001mV-DQ for bug-guix@gnu.org; Thu, 18 May 2023 16:13:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzjzi-0007Hn-C1 for bug-guix@gnu.org; Thu, 18 May 2023 16:13:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzjzi-0005nf-7i for bug-guix@gnu.org; Thu, 18 May 2023 16:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#53580: /var/run/shepherd/socket is missing on an otherwise functional system Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 18 May 2023 20:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53580 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Attila Lendvai Cc: 53580@debbugs.gnu.org Received: via spool by 53580-submit@debbugs.gnu.org id=B53580.168444077622283 (code B ref 53580); Thu, 18 May 2023 20:13:02 +0000 Received: (at 53580) by debbugs.gnu.org; 18 May 2023 20:12:56 +0000 Received: from localhost ([127.0.0.1]:54671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzjzc-0005nL-Ci for submit@debbugs.gnu.org; Thu, 18 May 2023 16:12:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzjzX-0005n5-5t for 53580@debbugs.gnu.org; Thu, 18 May 2023 16:12:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzjzM-0007F8-Fi; Thu, 18 May 2023 16:12:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=AYXbX35sYV9eA7GfVjctxZvrWaL3hUGo09v4tp1kED4=; b=nJqhUi7v6vu2vniEzGAv i1bQMa7eQjqmhvGIaKzZBULgPn32Rj+UKCB3ERMZy2nx3YwSUPgfM5W1CiJQ2JF53pEWS6JaAbOj7 E6Ybbze96ilYCgC5cj/UwjYpmkfagktyOo1TMwhOr9FU1u6QtFovwowJh/Nl9hwuPOpRX2/Rkr0Ek yakJ1WnvsOU9Ec30lsVaJd8FlnL5/uO1/1nXI58EjrXZRuNTtS8TAXJuVYL6Xga15fAPlGQE2fQgq XA0AenuIjOo+dOXRUX1mlbRV6bRwAD/aEFjvLCg6BdrhKxFJUYOms436XE0RxAtIHEEJ4jZaREo9n sFt30jmqXOz1Bw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzjzL-0002rp-VH; Thu, 18 May 2023 16:12:40 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Thu, 18 May 2023 22:12:37 +0200 In-Reply-To: (Attila Lendvai's message of "Thu, 27 Jan 2022 11:32:18 +0000") Message-ID: <87jzx51jre.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684440848; a=rsa-sha256; cv=none; b=QFRSEAVyuR0SYQzp/38ZMjovyEpCSNgqwfwOGeRhjBLTrPQ/NKh7rewgr0V9kFF861CBFB uf9sSH+ieiM/Cpk8ZhYKRcqDn85WXAJwVkOwHQh0Xw1hhuDeEdgjDYsDGJf1KcVwMSi9gU G6QaBfKkVlSfoj4Xi3qokK8C7QQjfoTnNPwKS4gUYkHQmeN3Kq9ewbb9PGUcUwxTnf1Xe3 oMxZi7rtDA6N/N8Msh8BC2QxC2rUpxj1kY+pSzkUp4bl6Evi+YbIsdquQ3n2706QhSSKUu qz6Vtb66dM+qwrkw4t5lrS2RqFCgIFxXQuuAPRZncrqbCVdCIuFloCv/vilQRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=nJqhUi7v; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684440848; 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=AYXbX35sYV9eA7GfVjctxZvrWaL3hUGo09v4tp1kED4=; b=f6pJvDLqIS0P1f+u4B68r1btpCYTpEdSMph5wuxjJDUVH/vXyc+bSh5zVOKaiqwTeCzHjg Y0Vh2kEOaaiko2wsa8PewXnHB4/5rsV00HoZjqy1MAKW2OMz5u1gHQDY7b5dCTqSzga+kf necT7mjGW9GQIUksSRkFSj/lwpiSRhK1lHSyZod3jIE4wjK4Rz5fPKNQyeNbjV8s2O4H3i KIpCLFTre7N22Xv++e+Z1iBD+nI/+7x4hm5wcBkHKPn2TdnFZGiolFESbelGbBRa6w5UcL 1suuKKG+9z7jQz5qYGY68AqsuRJP398PNHkimMsBBHHhsf3Ig6eUBSRZ6aGe8g== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=nJqhUi7v; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.09 X-Spam-Score: -4.09 X-Migadu-Queue-Id: 7371C2BD31 X-TUID: THseRjJ8r2F4 Hello Attila, I had totally overlooked this bug report. Attila Lendvai skribis: > the systems seems to work fine. Gnome is up, i can log in with my user, a= nd everything seems to work, except herd. > > i encounter this broken state every once in a while. IRC logs also mentio= n this multiple times, but without many insights: > > https://logs.guix.gnu.org/guix/search?query=3D%2Fvar%2Frun%2Fshepherd%2Fs= ocket > > ``` > # herd status > error: connect: /var/run/shepherd/socket: No such file or directory [...] > the issue is that when Shepherd is booting up, i.e. starting from its con= fig file, it calls the start forms without guarding for any possible except= ions. any error propagates up beyond the loop and up until an unwind protec= t that deletes the socket. > > the reason my system seemed fully functional is that my service was prett= y much the last one to be started. Currently (in 0.10.0), the =E2=80=98run-daemon=E2=80=99 procedure loads the= user=E2=80=99s config file before listening on /var/run/shepherd/socket. However, if an exception is thrown from the config file, it stops: --8<---------------cut here---------------start------------->8--- $ echo '(error "oops")' > /tmp/conf.scm $ ./shepherd -I -s sock -c /tmp/conf.scm Starting service root... Service root started. Service root running with value #t. Service root has been started. misc-error(#f "~A" ("oops") #f) Some deprecated features have been used. Set the environment variable GUILE_WARN_DEPRECATED to "detailed" and rerun the program to get more information. Set it to "no" to suppress this message. $ echo $? 1 --8<---------------cut here---------------end--------------->8--- Now, while the config file is being evaluated, shepherd does not listen on its socket, which isn=E2=80=99t great. This is mitigated by the use of =E2=80=98start-in-the-background=E2=80=99 (= introduced in 0.9.0) in the config file, which, as the name implies, doesn=E2=80=99t block further operation. So I *think* we=E2=80=99re mostly okay now. The one thing we could do is l= oad the whole config file in a separate fiber, and maybe it=E2=80=99s fine to k= eep going even when there=E2=80=99s an error during config file evaluation? WDYT? Thanks, Ludo=E2=80=99.