From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2427 Path: news.gmane.org!.POSTED!not-for-mail From: Steve Litt Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Log rotation issue with runit Date: Sat, 29 Dec 2018 20:20:29 -0500 Message-ID: <20181229202029.054723df@mydesk.domain.cxm> References: <20181226000505.1e82b362@mydesk.domain.cxm> <20181227080707.099b9c75@mydesk.domain.cxm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1546132709 3686 195.159.176.226 (30 Dec 2018 01:18:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Dec 2018 01:18:29 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2017-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Dec 30 02:18:25 2018 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gdPkG-0000qo-2z for gcsg-supervision@m.gmane.org; Sun, 30 Dec 2018 02:18:24 +0100 Original-Received: (qmail 6514 invoked by uid 89); 30 Dec 2018 01:21:00 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 6507 invoked from network); 30 Dec 2018 01:21:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:MIME-Version:Content-Type:Content-Transfer-Encoding; s=default; d=troubleshooters.com; b=mYQPq3LC+rhEG8q9w12L5lMTLihha7G7nh8DvciCtfGdODV4MOjvYcJ+FT8Xxf8AOswWuYbZ1dgZ2Iil4OYHK6KuT03Awf9nZ+PGSNFvehSPKcxaML25e5b+u1UfsmQAo16xjjPp6tCTZgww9D9QKnCV6l7liqPI+9IP38bsiVc=; DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=troubleshooters.com; s=default; t=1546132831; bh=glAuvt4x2bBjvg809dtprnqWJpQ=; l=2129; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To: References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; b=abZ2sIlCWLEWFjxd4FFiKyCOanogJ4crKMUYokQihh1FX0++/O2dBtcAuMxhcJiKm O8V+GiFaRpL1FsGrmoTwktk/AAjMecK05DDsN6F5u9ku3zmPLTLhYZS9Y1X8HBrzQE qS6KeA/r+KFp12QRLL84CRx0iWCDcR9uXOkDzglA= X-Originating-IP: [72.188.224.222] In-Reply-To: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2427 Archived-At: On Sat, 29 Dec 2018 18:33:06 +0000 Dmitry Bogatov wrote: > [2018-12-27 08:07] Steve Litt > > > [ Dmitry Bogatov ] > > > No, it is reproducible. See end of bug thread. > > > > Hi Dmitry, > > > > Just so we're all on the same page, do you mean the end of > > https://bugs.debian.org/916230 ? Could you please provide a message > > number? I briefly looked over https://bugs.debian.org/916230, paying > > particular attention to the later half, and could see no > > reproduction sequence articulated. But sometimes I miss things. > > Sure. Message 17: > > Offending .u file is created by rename(2) call at line 532, in > logdir_open() function. It happens, when 'current' file exists, > non-executable and non-empty. > [...] OK, so you can reproduce it with echo bogus > current; chmod a-x current That's pretty bizarre logic. I can understand why an empty current would be overwritten --- what do you lose. But why only if it's non-executable? Are they using the executable bit as some sort of flag to keep processes from overwriting each others' writes to the file? I once wrote a program in which, when an invocation of my program opened a file, it set the file to read-write, and other invocations of my program would decline to try to open a read-write version of the file. Bizarre, but it worked, and no process clobbered the other. I guess what I'm asking is this: Are you sure the original poster's (OP's) .u files were caused by the rename call when non-empty non-exec current exists, or is he experiencing a different reproduction sequence. I still wouldn't mess with the existing code. I don't think anyone here is positive of the purpose of the logic you described, and therefore what side effects would happen if it were modified. The OP didn't have enough .u files to really inconvenience him, and there are other ways of getting rid of .u files. And the OP could switch to s6. SteveT Steve Litt December 2018 featured book: Rapid Learning for the 21st Century http://www.troubleshooters.com/rl21