GNU logs - #56674, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#56674: [Shepherd] Use of =?UTF-8?Q?=E2=80=98waitpid=E2=80=99,_?= =?UTF-8?Q?=E2=80=98system*=E2=80=99,?= etc. in service code can cause deadlocks
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Wed, 20 Jul 2022 21:40:01 +0000
Resent-Message-ID: <handler.56674.B.165835315420280 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 56674
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 56674 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.165835315420280
          (code B ref -1); Wed, 20 Jul 2022 21:40:01 +0000
Received: (at submit) by debbugs.gnu.org; 20 Jul 2022 21:39:14 +0000
Received: from localhost ([127.0.0.1]:36196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oEHPW-0005H1-FD
	for submit <at> debbugs.gnu.org; Wed, 20 Jul 2022 17:39:14 -0400
Received: from lists.gnu.org ([209.51.188.17]:56904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oEHPT-0005Gs-NI
 for submit <at> debbugs.gnu.org; Wed, 20 Jul 2022 17:39:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34104)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oEHPT-0001Ia-IN
 for bug-guix@HIDDEN; Wed, 20 Jul 2022 17:39:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39164)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oEHPT-0001TV-AK
 for bug-guix@HIDDEN; Wed, 20 Jul 2022 17:39:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=M8w5WeDxJS14gBGGsfc8CvBrW4CYqhv18DUTdfvx+EU=; b=HBRZBuMtbWN9u3
 zm3KRNpSPuVelXLB6WvH2dvU2YbVqCxFLNGQkiD8MfxsjY9q78jQeQQK5OB/8MRhI7UaSsfEjgy/w
 zDOEyY7mCcTyPZXHaGLEzO/3m+00nAz4K39gCA5KEHYkkYl18VW1r7GAyU6jvhBpikmlXtCPjr8vF
 CIds4JmF3KO6LCWdCEBf+23EPMNoerp9LFcaZisTscpqoTbhTVU4wsm/ZISSuO1Va7LWi2cc1ofKX
 0shWBs0cxQhIuqvl9bmnPZiqSoZ2pTgZ3Gy0/GyrtLu1SMRSoIoiwnUkn/3HctM2lxfZoGb0HDvxz
 udLc9tiWBxbuQjp9g9Dw==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64292
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oEHPS-00062Y-F2
 for bug-guix@HIDDEN; Wed, 20 Jul 2022 17:39:11 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Duodi 2 Thermidor an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Bouillon-blanc
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 20 Jul 2022 23:39:08 +0200
Message-ID: <8735evpipv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

We=E2=80=99ve just had a bad experience with the nginx service on berlin, w=
here
=E2=80=98herd restart nginx=E2=80=99 would cause shepherd to get stuck fore=
ver in
=E2=80=98waitpid=E2=80=99 on the process that was supposed to start nginx.

The details are unclear, but one thing is clear is that using =E2=80=98wait=
pid=E2=80=99
(either directly or indirectly with =E2=80=98system*=E2=80=99, which is what
=E2=80=98nginx-service-type=E2=80=99 does) is not great:

  1. In the best case, shepherd (as of 0.9.1) is stuck while =E2=80=98syste=
m*=E2=80=99
     is in =E2=80=98waitpid=E2=80=99 waiting for child process completion (=
=E2=80=9Cstuck=E2=80=9D as
     in: doesn=E2=80=99t do anything, not even answering =E2=80=98herd=E2=
=80=99 requests or
     inetd connections.)

  2. I don=E2=80=99t think that can happen with =E2=80=98system*=E2=80=99 (=
because it=E2=80=99s in C),
     but generally speaking, there=E2=80=99s a possibility that shepherd=E2=
=80=99s event
     loop will handle child process termination before some other
     user-made =E2=80=98waitpid=E2=80=99 call does.

Anyway, that=E2=80=99s a bad situation.

So I can think of several ways to address it:

  1. Change the nginx service =E2=80=98stop=E2=80=99 method to just
     (make-kill-destructor), which should work just as well as invoking
     =E2=80=9Cnginx -s stop=E2=80=9D.

  2. Have Shepherd provide a replacement for =E2=80=98system*=E2=80=99.

Thoughts?

Ludo=E2=80=99.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: bug#56674: Acknowledgement ([Shepherd] Use of =?UTF-8?Q?=E2=80=98waitpid=E2=80=99,_?=
 =?UTF-8?Q?=E2=80=98system*=E2=80=99,?= etc. in service code can cause
 deadlocks)
Message-ID: <handler.56674.B.165835315420280.ack <at> debbugs.gnu.org>
References: <8735evpipv.fsf@HIDDEN>
X-Gnu-PR-Message: ack 56674
X-Gnu-PR-Package: guix
Reply-To: 56674 <at> debbugs.gnu.org
Date: Wed, 20 Jul 2022 21:40:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 56674 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
56674: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D56674
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 20 Jul 2022 21:43:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 20 17:43:11 2022
Received: from localhost ([127.0.0.1]:36208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oEHTL-0005Oz-ER
	for submit <at> debbugs.gnu.org; Wed, 20 Jul 2022 17:43:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50134)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oEHTK-0005Om-4O
 for control <at> debbugs.gnu.org; Wed, 20 Jul 2022 17:43:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39210)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oEHTE-00029J-PI
 for control <at> debbugs.gnu.org; Wed, 20 Jul 2022 17:43:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to:
 references; bh=tIo1vtE8LHkt1DuBdsJ0yek3wP8Rl64wxcfRDApbZUk=; b=f3LdNjX52ey0HH
 5Bik/51O4cNPDrHp5CJAfNhhGH/bTp4NdAGrp9j/eC5Xcay6Hs6cBhb5V/9j7nJpteZPA7oKaOoph
 2iKr8oahzE8t+VY+Y8kw2sIOktA0lNGdhe3M6d0mCufWxei1j7tnmAz1cQRjddl+Oii9qfMkT5UGJ
 Mxx9gx3fh1RQLRfoiO6mWCP1eE/DXcN4fdRYSoA1vhX0/E+WMMBJogpwdgIIvRFzwdqqhYyYj0qPJ
 KZvtaZFW4Lo9JHnf5U7vp2PvfNZ8tKhVI3p8YfsyfttLudW9Im8V+Rdxgp/Zhw5LDfis5IgNpxmDQ
 PCq5LU8mI5vO+CD6+Nug==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:58000
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oEHTE-0006UW-D2
 for control <at> debbugs.gnu.org; Wed, 20 Jul 2022 17:43:04 -0400
Date: Wed, 20 Jul 2022 23:43:02 +0200
Message-Id: <87y1wno3yx.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #56674
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

severity 56674 important
quit






Last modified: Wed, 20 Jul 2022 21:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.