
On Fri, 2018-12-14 at 13:04 +0000, Daniel P. Berrangé wrote:
The virtualization driver has two connections to the virtlogd daemon, one pipe fd for writing to the log file, and one socket fd for making RPC calls. The typical sequence is to write some data to the pipe fd and then make an RPC call to determine the current log file offset.
Unfortunately these two operations are not guaranteed to be handling in order by virtlogd. The event loop for virtlogd may identify an incoming event on both the pipe fd and socket fd in the same iteration of the event loop. It is then entirely possible that it will process the socket fd RPC call before reading the pending log data from the pipe fd.
As a result the virtualization driver will get an outdated log file offset reported back.
This can be seen with the QEMU driver where, when a guest fails to start, it will randomly include too much data in the error message it has fetched from the log file.
It looks like this patch will address https://bugzilla.redhat.com/show_bug.cgi?id=1356108 If that's indeed the case, you can consider adding the link to the commit message before pushing. -- Andrea Bolognani / Red Hat / Virtualization