Logging in future upstart

Matthias Urlichs smurf at smurf.noris.de
Sun Mar 22 18:37:57 GMT 2009


Hi,

Casey Dahlin:
> Matthias Urlichs wrote:
> > Hi,
> > 
> >> To do this, we must assume ptracing all the services isn't horrible and
> >> stupid.
> > 
> > I'd contend that this assumption, at least after the service is up and
> > running, is wrong.
> 
> The progression here is we've gone from /no/ way to do this to a
> /bad/ way to do this. Its progress, but we aren't there yet.

IMHO I have outlined a reasonably /good/ way to do this (in the portion
you have deleted). If you disagree, please tell me where I was wrong.

In fact, I just had an better idea: don't use a named pipe. upstart
could simply read the stderr of all processes it starts, store that in a
ring buffer, and feed a logger process from that (via stdin).

Replace any lines which the logger doesn't read fast enough (i.e. the
ring buffer overflows) with a "<skipped>" marker. Auto-kill+restart the
logger if it doesn't want to read its standard input for too long.

That's it, you're done. Total time required for implementation:
a day, at most. Performance impact: Negligible to None.


What you want to do, on the other hand, is to ptrace any process (and its
children) which happens not to close its stderr. Forever. This is not
something I'd accept (speaking as somebody who is responsible for a
bunch of nontrivial servers, with nontrivial load).

Not ever.

Out of the question.

The additional load is prohibitive. Moreover, this would reduce my 8-CPU
system to something with a 1-CPU bottleneck, and thus would more than
negate a few years of the kernel's progress in parallelisation.

Also, you'd prevent any "real" tracing or debugging of those processes,
since you can only attach one ptrace to a process. That, too, is
unacceptable. If I wanted non-debuggable systems, I'd've stayed with
Windows.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf at smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
v4sw7$Yhw6+8ln7ma7u7L!wl7DUi2e6t3TMWb8HAGen6g3a4s6Mr1p-3/-6 hackerkey.com
 - -
When in doubt, lead trump.



More information about the upstart-devel mailing list