qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Remove line buffering from log file


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Remove line buffering from log file
Date: Thu, 29 Sep 2011 08:57:00 +0100

On 29 September 2011 06:03, Peter Chubb <address@hidden> wrote:
> Stefan> That's the reason why line buffering is needed today.  I
> Stefan> enable log file output to see what happened last before the
> Stefan> crash.
>
> Thanks for this, I didn't think of this use-case.  I don't think I've
> ever seen a qemu crash that wasn't caused by something  really obvious.

You don't need the logging for the obvious ones :-)

> abort() already flushes all open streams.  So only signals that cause
> immediate death are a problem: SIGSEGV is the obvious one.  If its
> handler called abort() then that would flush too. abort() is
> guaranteed by the POSIX spec to be callable from a signal handler.

Catching SIGSEGV is likely to interact badly with the signal
handling in linux-user mode, I expect.

> Stefan> Speed is not the primary target when somebody runs qemu -d ...
>
> It is if it takes hours to reach the problem that causes
> the abort().  Speeding up by an order of magnitude is worth it.

One tactic I've found useful in these cases is to run without
logging up to nearly the point where things fail, and then
do a savevm. Then you can loadvm on a qemu with logging enabled
and only look at the section of execution that causes the problem.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]