innfeed does not reopen (rotated) log file

Florian Schlichting fschlich at cis.fu-berlin.de
Wed Aug 8 08:54:57 UTC 2012


Hi,

I just noticed that innfeed keeps open a deleted log/innfeed.log, while
the current log/innfeed.log as well as all the available OLD logs are
empty!

The reason seems to be that rotation of innfeed.log was added to
scanlogs for INN 2.5, but scanlogs doesn't send a signal for innfeed to
reopen its log; and indeed there is (currently) no way to cause a
running innfeed to do so. 

I think the assumption in scanlogs is that the LIVEFILES may be opened
for writing at any time, even while scanlogs is processing them, but
will only be held open for a short while. This is probably true for the
other LIVEFILES (${NNTPSEND} ${SENDNNTP} ${SENDUUCP}), but innfeed.log
is opened once at innfeed startup as its stdout and stderr, and remains
open during its entire lifetime - which in funnel-file mode can be quite
long!

I'm not sure about the best remedy; the issue probably doesn't surface
when using innfeed's channel mode. innfeed isn't normally writing to the
file, so IMHO there's no real need for regular rotation and the innfeed
stuff could just be removed from scanlogs. Otherwise, innfeed/main.c's
openLogFile() should be called from a signal handler, either added to
sighup() or some new signal, and that signal sent from scanlogs after
moving innfeed.log.

...but in general, I think scanlogs is a mess that should be reduced and
replaced by a logrotate configuration file, rather than extended with
even more functionality! :-)

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5557 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20120808/b84544f1/attachment.bin>


More information about the inn-workers mailing list