Re: Log rotation issue with runit

2018-12-30 Thread Jonathan de Boyne Pollard
Dmitry Bogatov: After some investigation I found code, that caused issue, but it seems that it was written with some purpose, yet I fail to understand that purpose. What you need are manuals that tell you about this mechanism. (-: *

Re: Log rotation issue with runit

2018-12-29 Thread Steve Litt
On Sat, 29 Dec 2018 18:33:06 + 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 ?

Re: Log rotation issue with runit

2018-12-29 Thread Guillermo
El sáb., 29 dic. 2018 a las 15:33, Dmitry Bogatov escribió: > > > > And this issue happens not only on crash, it happens after every > > > termination of svlogd, due any signal. I would agree that SIGKILL is > > > crash, but issue reproduces with SIGINT and SIGTERM. > > > > SIGTERM should make

Re: Log rotation issue with runit

2018-12-29 Thread Dmitry Bogatov
[2018-12-27 20:39] Guillermo > El jue., 27 dic. 2018 a las 6:36, Dmitry Bogatov escribió: > > > > And this issue happens not only on crash, it happens after every > > termination of svlogd, due any signal. I would agree that SIGKILL is > > crash, but issue reproduces with SIGINT and SIGTERM. >

Re: Log rotation issue with runit

2018-12-29 Thread Dmitry Bogatov
[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

Re: Log rotation issue with runit

2018-12-27 Thread Jonathan de Boyne Pollard
Alex Efros: I'm not sure is it good idea to include .u files in usual rotation process at all, and especially handle them just like .s files. If several crashes happens for some reason in a short period of time this will result in deletion of all log files except last (say) 10 .u files,

Re: Log rotation issue with runit

2018-12-27 Thread Jonathan de Boyne Pollard
Laurent Bercot: If loggers kept appending to "current" instead, it could have corrupt information in the middle of a "current" file, which would them be archived as a .s (intact file), which wouldn't be good. Examples: * https://unix.stackexchange.com/questions/237321/ *

Re: Log rotation issue with runit

2018-12-27 Thread Guillermo
El jue., 27 dic. 2018 a las 10:47, Steve Litt escribió: > > [...] Simply run a program, invoked by cron, > that deletes .u files over a certain age, as long as it doesn't delete > the latest .u file. Daemontools-style loggers like svlogd delete files themselves during a rotation for a reason,..

Re: Log rotation issue with runit

2018-12-27 Thread Guillermo
El jue., 27 dic. 2018 a las 6:36, Dmitry Bogatov escribió: > > And this issue happens not only on crash, it happens after every > termination of svlogd, due any signal. I would agree that SIGKILL is > crash, but issue reproduces with SIGINT and SIGTERM. SIGTERM should make svlogd exit cleanly,

Re: Log rotation issue with runit

2018-12-27 Thread Laurent Bercot
Why would it be wrong to just keep appending to `current' instead of moving it to `.u' file? (see my patch at end of bug thread) On a crash, it is possible that a file you're writing to gets corrupted. For the integrity of your logs, it's better to move that potentially corrupted file to

Re: Log rotation issue with runit

2018-12-27 Thread Dmitry Bogatov
[2018-12-26 00:05] Steve Litt > part text/plain1664 > On Tue, 25 Dec 2018 13:39:17 + > Dmitry Bogatov wrote: > > > Hello! > > > > I am Debian maintainer of `runit' supervision suite. Recently, I > > received bug report [^1] about stray .u logfiles. After some > >

Re: Log rotation issue with runit

2018-12-27 Thread Dmitry Bogatov
[2018-12-26 03:58] Alex Efros > Hi! > > I'm not sure is it good idea to include .u files in usual rotation process > at all, and especially handle them just like .s files. If several crashes > happens for some reason in a short period of time this will result in > deletion of all log files

Re: Log rotation issue with runit

2018-12-25 Thread Alex Efros
Hi! I'm not sure is it good idea to include .u files in usual rotation process at all, and especially handle them just like .s files. If several crashes happens for some reason in a short period of time this will result in deletion of all log files except last (say) 10 .u files, which are usually

Re: Log rotation issue with runit

2018-12-25 Thread Guillermo
> […] Both .u and .s files are supposed to > be deleted when they are the oldest file in the logging directory, to > honor 'u' lines in 'config' files, […] Sorry, that should have read: to honor 'n' lines in 'config' files. G.

Re: Log rotation issue with runit

2018-12-25 Thread Guillermo
El mar., 25 dic. 2018 a las 10:39, Dmitry Bogatov escribió: > > Hello! > > I am Debian maintainer of `runit' supervision suite. Recently, I > received bug report [^1] about stray .u logfiles. After some > investigation I found code, that caused issue, but it seems that it was > written with some

Re: Log rotation issue with runit

2018-12-25 Thread Alex Efros
Hi! On Tue, Dec 25, 2018 at 01:39:17PM +, Dmitry Bogatov wrote: > Recently, I received bug report [^1] about stray .u logfiles. After > some investigation I found code, that caused issue, but it seems that it > was written with some purpose, yet I fail to understand that purpose. > > [^1]