Description of problem:
Rebasing glib2 in RHEL 7.4 (bug 1386874) has introduced a bug
which affects the qemu main loop, originally reported in Fedora
in bug 1438539 (glib2) and bug 1435432 (qemu).
The bug causes the emulated ISA serial port in qemu to hang because
wakeup events get lost.
It's difficult to reliably reproduce this bug. The best we have is
to run the following command:
while libguestfs-test-tool -t 180 >& /tmp/log; do echo -n .; done
which should run forever (printing lots of dots), but where the bug
is present will sometimes fail, although often not for many iterations.
This bug can be fixed by backporting the following upstream commits:
main: Create a helper function for "owner wakeup" optimization
gmain: Signal wakeups if context has never been acquired as well
gmain: only signal GWakeup right before or during a blocking poll
These commits cherry pick cleanly on top of glib2 2.50.3. I have
built a scratch build containing the fix here:
BTW we really need this fixed in RHEL 7.4-z.
Weren't the qemu patches backported to RHEL? If not, why not?
I asked upstream about this and it sounded like that was going to happen quickly. Is the scenario here new base RHEL with old qemu?
No idea, but this affects qemu-kvm-1.5.3-141.el7_4.1.x86_64 right now.
The upstream commit is this one:
Author: Richard W.M. Jones <email@example.com>
Date: Fri Mar 31 21:51:33 2017 +0100
main-loop: Acquire main_context lock around os_host_main_loop_wait.
This made it into the QEMU 2.9.0 release, and thus *is* present in qemu-kvm-rhev (that's used by RHEV and OpenStack).
It is *not*, however, present in the qemu-kvm 1.5.3 that is shipped in base RHEL, since that version doesn't rebase and no one backported the patch to it.
OK, well can we at least get a backport of that patch scheduled for 7.5 for qemu?
I'll move this bug to 7.5, and clone it for 7.4z if that decision is made.
It's okay to backport the fix to RHEL. All the previous discussions were centered around upstream and Fedora.
Doesn't affect layered products.
I opened this to request the QEMU fix be backported to qemu-kvm in 7.4.z https://bugzilla.redhat.com/show_bug.cgi?id=1474405
The upstream bug is still a bit stalled: https://bugzilla.gnome.org/show_bug.cgi?id=761102
We could sync to what's in glib master today, but...since the qemu-kvm fix went out in https://bugzilla.redhat.com/show_bug.cgi?id=1473536 is it really worth the risk? Let's just tell people to upgrade qemu?