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 6FruCqjGXmRGzQAASxT56A (envelope-from ) for ; Sat, 13 May 2023 01:07:20 +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 YHb7CqjGXmRiFAAAauVa8A (envelope-from ) for ; Sat, 13 May 2023 01:07:20 +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 07BCEF397 for ; Sat, 13 May 2023 01:07:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxbqr-0002bL-KE; Fri, 12 May 2023 19:07:05 -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 1pxbqo-0002b1-Od for bug-guix@gnu.org; Fri, 12 May 2023 19:07:04 -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 1pxbqo-0004Gv-GC for bug-guix@gnu.org; Fri, 12 May 2023 19:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxbqo-0002kv-8G for bug-guix@gnu.org; Fri, 12 May 2023 19:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63190: [Shepherd] Nested calls lead to a hang Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 12 May 2023 23:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63190 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 63190@debbugs.gnu.org, Bruno Victal Received: via spool by 63190-submit@debbugs.gnu.org id=B63190.168393276910529 (code B ref 63190); Fri, 12 May 2023 23:07:02 +0000 Received: (at 63190) by debbugs.gnu.org; 12 May 2023 23:06:09 +0000 Received: from localhost ([127.0.0.1]:34028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxbpx-0002jl-6V for submit@debbugs.gnu.org; Fri, 12 May 2023 19:06:09 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:56624 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxbpu-0002jd-V8 for 63190@debbugs.gnu.org; Fri, 12 May 2023 19:06:07 -0400 Received: from psyduck (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id AFB2BA812; Fri, 12 May 2023 19:05:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1683932766; bh=r1f8PDufBpHhnSzJylmw57rTyvj1/cP+ujxvJIgcCyk=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=Vv3iauYQGE+tSGrnE/cul8Iaqr2clwPHcji319fWuOjOsTiR5NGRmSC1wCbTwHgdP loHwmsLG2AX8l0kHvDuI+w4QkVTnl9PYwyCx8cHizxiwTulpGRzd0Nvy0Z8y4Fxbi/ 8FGm0IokYMmAygj+VeoYqO1wgQaxHPRpPn92E6QA= References: <87wn1lid69.fsf@gnu.org> User-agent: mu4e 1.10.2; emacs 28.2 Date: Fri, 12 May 2023 19:01:08 -0400 In-reply-to: <87wn1lid69.fsf@gnu.org> Message-ID: <87h6shduaw.fsf@psyduck.jhoto.kublai.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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: , Reply-to: Brian Cully From: Brian Cully via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683932840; a=rsa-sha256; cv=none; b=hV1hIdlqFYnbkISOo8VjExHI8eOcyrRUMeC10qmftY0cIzQ8dx8v1h5Fdry0g17SMixTrj 1oFnBLYV2vbtL+5Sf0iH0l+Vpmrv3TYL0sSf/HvIET0bA2kB9P2PNMxV3slpyll/7uq+yB BLp/bUQRkuJytI8YkEncHwkZkpF5++4F0AoibkQA7GkXNa0Mmqo+TrlG4+kDbvIdn9WiJm ROCPlS+Iom7dMt49RHEeooEM5MC/pCNPEDNY4OV2uB6OFR/qHzs8FtnFLJb1Xv0hg5uJIi mAvuZIJsGSzKTPWca47ZyQuVJOAZcsZhGYi4s0dYQCG+PvP0nRVcl/n3cfdA/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=Vv3iauYQ; 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=1683932840; h=from:from:sender:sender:reply-to: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=r1f8PDufBpHhnSzJylmw57rTyvj1/cP+ujxvJIgcCyk=; b=EVqg5mAackBvkB5hLMl5vDISlFBEv/3dMLe8K3n3Quc2OOylqgz3j5O+EWkfNIZMF8/KWJ LDuEzzSbM6+9vNCw0k2EzVW5lEZf9kfuGFCiBoi7AlUi2yHXdPapzNPQuIiIBPQHP/2vur oJrckDLOHFSUzW7SdSBefzA9X38aDvsQX1c83tCSckyhbcznyoxrUU+6SJAjUhxJ4SZLnW EML+w2zjG/SNh4DYQtz8URDeeJcbGQk0ChiIOPfxBflpKh3YJBBduvIal4hQScn5rnvdx2 hJQPA5Jb54/6/Ts7IhX8HUOpSBa6IKgyV9ccqat8oNp+Ov5E2pT8AlmRqmm+JA== X-Migadu-Spam-Score: -4.48 X-Spam-Score: -4.48 X-Migadu-Queue-Id: 07BCEF397 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=Vv3iauYQ; 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-TUID: 70hzazF1A/CU Ludovic Court=C3=A8s writes: > (Whether that leads to a deadlock depends; at first sight, I=E2=80=99d=20 > say > there=E2=80=99s no reason for this to deadlock in general, but you can=20 > of course > end up with a logic bug like A starts B, which spawns a client=20 > to start > A, which doesn=E2=80=99t start because it=E2=80=99s waiting for B.) It's been a while since I looked at this, but my rough=20 recollection is the deadlock occurs because shepherd can only=20 process one request over its socket at a time. If that request=20 happens to *also* try to talk over the same socket, it'll hang=20 indefinitely waiting for its turn to come off the accept queue. I'm not sure there's much to be done in the 0.9 version of=20 shepherd about it. I'm hoping that 0.10 and up will be able to=20 cope with situations like this without completely deadlocking the=20 shepherd itself. It's obviously pretty bad if pid 1 hangs for any=20 reason at all, even user error. -bjc