[libvirt-users] serial console locking for a domain (concurrent access = garbled output)

Hi, I am seeing an issue in libvirt-0.9.4-23.el6_2.7.x86_64.rpm where my virsh console output for a domain gets garbled because I have virt-manager running and it is also trying to access the serial device for the guest domain. Basically there is concurrent serial access and half the text ends up on one end while the rest ends up on the other end. Closing virt-manager does not help. Disconnecting and reconnecting using virsh console does not help. The only way to recover is to destroy the domain and then start the guest again and never start virt-manager. Note that the domain does not have VNC graphics so virt-manager defaults to try to access the serial port when started for a particular domain. Should there be locking within libvirt to only allow for a single client to access a specific serial port of a domain? Thanks, Dusty Mabe

On 05/01/2012 12:51 PM, Dusty Mabe wrote:
Hi,
I am seeing an issue in libvirt-0.9.4-23.el6_2.7.x86_64.rpm where my virsh console output for a domain gets garbled because I have virt-manager running and it is also trying to access the serial device for the guest domain. Basically there is concurrent serial access and half the text ends up on one end while the rest ends up on the other end.
Sounds like you are running into the issue that was fixed for 0.9.11 with this patch: commit 4716138229ae47c5492c13a8622b779889560fd7 Author: Peter Krempa <pkrempa@redhat.com> Date: Thu Oct 6 12:24:47 2011 +0200 qemu: Add ability to abort existing console while creating new one This patch fixes console corruption, that happens if two concurrent sessions are opened for a single console on a domain. Result of this corruption was that each of the console streams recieved just a part of the data written to the pipe so every console rendered unusable. and which is already present in the RHEL 6.3 beta build of libvirt, thanks to https://bugzilla.redhat.com/show_bug.cgi?id=729940. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Ahh... Thank you Eric. That does look like the same issue. I had searched through the open bugs here https://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Red%20Hat%20Enterprise%20Linux%206 but it looks like 729940 is not view-able to the public (at least I don't have permission to view it). Thank you for the pointer! Dusty Mabe On Tue, May 1, 2012 at 3:12 PM, Eric Blake <eblake@redhat.com> wrote:
On 05/01/2012 12:51 PM, Dusty Mabe wrote:
Hi,
I am seeing an issue in libvirt-0.9.4-23.el6_2.7.x86_64.rpm where my virsh console output for a domain gets garbled because I have virt-manager running and it is also trying to access the serial device for the guest domain. Basically there is concurrent serial access and half the text ends up on one end while the rest ends up on the other end.
Sounds like you are running into the issue that was fixed for 0.9.11 with this patch:
commit 4716138229ae47c5492c13a8622b779889560fd7 Author: Peter Krempa <pkrempa@redhat.com> Date: Thu Oct 6 12:24:47 2011 +0200
qemu: Add ability to abort existing console while creating new one
This patch fixes console corruption, that happens if two concurrent sessions are opened for a single console on a domain. Result of this corruption was that each of the console streams recieved just a part of the data written to the pipe so every console rendered unusable.
and which is already present in the RHEL 6.3 beta build of libvirt, thanks to https://bugzilla.redhat.com/show_bug.cgi?id=729940.
-- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Dusty Mabe
-
Eric Blake