Squelch 'eof from qemu monitor' error on normal VM shutdown

Michal Prívozník mprivozn at redhat.com
Mon Oct 4 14:55:40 UTC 2021


On 9/30/21 7:15 PM, Jim Fehlig wrote:
> On 9/29/21 21:29, Jim Fehlig wrote:
>> Hi All,
>>
>> Likely Christian received a bug report that motivated commit
>> aeda1b8c56, which was later reverted by Michal with commit 72adaf2f10.
>> In the past, I recall being asked about "internal error: End of file
>> from qemu monitor" on normal VM shutdown and gave a hand wavy response
>> using some of Michal's words from the revert commit message.
>>
>> I recently received a bug report (sorry, but no public link) from a
>> concerned user about this error and wondered if there is some way to
>> improve it? I went down some dead ends before circling back to
>> Christian's patch. When rebased to latest master, I cannot reproduce
>> the hangs reported by Michal [1]. Perhaps Nikolay's series to resolve
>> hangs/crashes of libvirtd [2] has now made Christian's patch viable?
> 
> Hmm, Nikolay's series improves thread management at daemon shutdown and
> doesn't touch VM shutdown logic. But there has been some behavior change
> from the time aeda1b8c56 was committed (3.4.0 dev cycle) to current git
> master. At least I don't see libvirtd hanging when running Michal's test
> on master + rebased aeda1b8c56.

That's sort of expected - back in that era we had one event loop for
everything. Thus things like virGetLastErrorCode() which use thread
local variables did not work as expected and thus we needed to save the
error in mon->lastError. But now we have one additional thread per each
QEMU just for handling monitor IO, thus virGetLastErrorCode() works now
and we could lift some restrictions. Therefore I think we can revisit
Christian's patch again. I too see some concerned users who think it's a
true error.

Michal




More information about the libvir-list mailing list