pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/48071: qemu 1.5.1 serial console output lossage
The following reply was made to PR pkg/48071; it has been noted by GNATS.
From: Andreas Gustafsson <gson%gson.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: pkg-manager%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost,
paul%whooppee.com@localhost,
Greg Troxel <gdt%ir.bbn.com@localhost>
Subject: Re: pkg/48071: qemu 1.5.1 serial console output lossage
Date: Sun, 22 Jun 2014 20:55:26 +0300
I have now analyzed this problem further by adding some debug logging
to the character device handling code in qemu, and found that it is a
bug in qemu, not NetBSD.
What happens is that qemu is setting its standard output to
non-blocking mode, causing writes to return EAGAIN when the tty output
buffer fills up. When that happens, qemu is supposed to retry the
write once the file descriptor becomes ready for output, but it fails
to retry and ends up discarding the data.
This problem is easily triggered on NetBSD hosts where the default tty
buffer size is only 1 kB, which means that even a relatively small
write() to a tty or pty can cause the buffer to fill up and EAGAIN to
be returned. That it is not happening on Linux hosts may be due to
the larger size of the Linux tty output buffer, or there may be other
differences that make Linux less likely than NetBSD to return EAGAIN
from a write to a tty.
Increasing the tty output buffer size on the NetBSD host using
sysctl -w kern.tty.qsize=65536
alleviates the problem significantly, but does not fix it completely:
with this setting, "anita install" completes successfully, but
"anita test" sometimes fails because the final summary of the ATF test
results still fails to appear in its entirety.
--
Andreas Gustafsson, gson%gson.org@localhost
Home |
Main Index |
Thread Index |
Old Index