From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17047 invoked from network); 16 Nov 2020 22:05:31 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 16 Nov 2020 22:05:31 -0000 Received: (qmail 29284 invoked by uid 89); 16 Nov 2020 22:05:53 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 29277 invoked from network); 16 Nov 2020 22:05:53 -0000 From: "Laurent Bercot" To: "Xavier Stonestreet" , supervision@list.skarnet.org Subject: Re: s6-permafailon not acting as expected Date: Mon, 16 Nov 2020 22:05:26 +0000 Message-Id: In-Reply-To: References: Reply-To: "Laurent Bercot" User-Agent: eM_Client/8.0.3385.0 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudefuddgudehiecutefuodetggdotffvucfrrhhofhhilhgvmecupfgfoffgtffkveetuefngfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucggtffrrghtthgvrhhnpedtfeekueetieektefhveeuveevtdekgeefhfeutedvieeiheduueeiudehvdetveenucffohhmrghinhepshhkrghrnhgvthdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht >The service did die with exit code 0, but s6-permafail is wrong, since >exit code 0 is not specified in the filter. > >Looking at the source code in s6-permafailon.c, it seems to me that >the codes[32] bitarray is not initialized with zeroes before calling >bitarray_set(n). You're probably right that it is the issue! (codes was a static variable in the first iteration; static variables do not need to be 0-initialized. But then I reworked the code, made codes an automatic variable, and failed to initialize it to zero. And that is why relying on magic features is a bad thing, and I should stop doing this out of laziness.) I fixed it in the latest git of s6; if you prefer numbered releases, I'm working on a bigger release (with some interface changes and a major version bump) that should happen before the end of the year, but not right now ^^' Please try the fixed version. If you don't want to use the git head, you can apply the very simple diff: =20 https://git.skarnet.org/cgi-bin/cgit.cgi/s6/diff/src/supervision/s6-permafa= ilon.c If that version doesn't solve your problem, then I'll investigate further. Thanks for the report! -- Laurent