WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] PV console bug in 4.0 / unstable

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] PV console bug in 4.0 / unstable
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Thu, 21 Jan 2010 17:51:04 -0700
Delivery-date: Thu, 21 Jan 2010 16:55:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
I'm chasing a console bug in Xen 4.0 that only appears with managed PV
domains - and even then only after an initial start-->stop sequence.

Legacy PV domain config files generally do not specify a console device
explicitly but instead get one via qemu with

vfb=['type=vnc,vncunused=1']

When starting a PV domain, xend will create a console device if one is
not specified in the domain's config.  Details of the device are added
to the domain's config and, if the domain is managed, written to xend's
internal "db".  All of this occurs after the console details are written
to xenstore, so life is good for qemu backend reading xenstore.  If the
managed domain is subsequently stopped and started again, the console
device, now included in the domain's device refs, is created before
console info is written to xenstore.  The console backend in qemu fails
to read xenstore, causing con_init() to fail.  Meanwhile the frontend in
domU is waiting for backend and booting does not progress.  In
pseudo-operations

create_domain
for each device in device_refs: # no console device in device_refs
  create_device
write_device_info_to_xenstore
update_consoles
  # Console device found in xenstore.  If it does not exist in
  # domain device refs, add it and call DevController.createDevice
..
shutdown_domain
create_domain
for each device in device_refs: # now contains console device
  create_device # device created before info written to xenstore
write_device_info_to_xenstore

As a workaround, I've patched con_init() in
tools/ioemu-dir/hw/xen_console.c to retry xenstore read.  I suspect xend
could be patched to write required console details to xenstore before
creating the console device.  But the current behavior in xend has not
changed since Xen 3.3, the last version I found that doesn't exhibit
this issue.  The console code in qemu did change significantly between
3.3 and 3.4 however.

Any comments regarding a fix in xend vs qemu?  Perhaps alternate
solutions to this race?

Also noteworthy is that the issue does not appear when using 'ol
xenconsoled, i.e. removing vfb entry in domain config.

Regards,
Jim
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] PV console bug in 4.0 / unstable, Jim Fehlig <=