Fwd: runit: timewarp during log processing causes spin lock

From: Tom Bereknyei <tom_at_dds.mil>
Date: Sat, 14 Oct 2017 00:26:55 +0000

Also submitted to the Debian bug lists.

Dear maintainer,

While using runit on an odd embedded system with a poor clock, we found
that when the oldest file in the log directory is the file being processed,
it is deleted. This causes later logic to spin lock. Runit should exclude
*.u from being deleted, even if it is the oldest.

-Tom

--- svlogd.c 2014-08-10 18:22:34.000000000 +0000
+++ svlogd.c 2017-01-30 00:08:52.881220920 +0000
_at__at_ -234,7 +234,7 @@
         if (unlink(f->d_name) == -1)
           warn2("unable to unlink processor leftover", f->d_name);
       }
- else {
+ else if (f->d_name[26] != 'u') {
         ++n;
         if (str_diff(f->d_name, oldest) < 0) byte_copy(oldest, 27,
f->d_name);
       }

-- 
Maj Tom Bereknyei
Defense Digital Service
tom_at_dds.mil
(571) 225-1630‬
-- 
Maj Tom Bereknyei
Defense Digital Service
tom_at_dds.mil



Received on Sat Oct 14 2017 - 00:26:55 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC