[pkg-go] Bug#920827: Error parsing smartmon.prom after upgrade

Martín Ferrari tincho at tincho.org
Wed Jan 30 18:25:21 GMT 2019


On 30/01/2019 17:42, Antoine Beaupré wrote:

> Hmm... I just noticed I don't see the errors in the logs anymore, so
> it's quite likely you won't be able to reproduce with the given file,
> which might explain why I couldn't find a problem with the given line...
> 
> Is it possible that the exporter is trying to read the file while it's
> being written, and therefore getting an incomplete record?

Yes. That must be the issue.

> If the file is not written atomically (ie. written to a tmp and moved
> into place), then it's quite likely such race conditions will
> (eventually) occur...

I thought this would not be a problem, since the timer service is using
sponge, but now I see in the manpage that:

       When possible, sponge creates or updates the output file
atomically by
       renaming a temp file into place. (This cannot be done if TMPDIR
is not
       in the same filesystem.)

So I will look into using the same dir as TMPDIR.

-- 
Martín Ferrari (Tincho)



More information about the Pkg-go-maintainers mailing list