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

Re: [Xen-devel] Detecting deadlocks with hypervisor..

To: T S <thileepan_@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Detecting deadlocks with hypervisor..
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Fri, 07 Apr 2006 12:41:20 -0500
Cc: rthelen@xxxxxxxxxx, Xen-devel@xxxxxxxxxxxxxxxxxxx, ewan@xxxxxxxxxxxxx, edwin.zhai@xxxxxxxxx
Delivery-date: Fri, 07 Apr 2006 10:41:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <BAY108-F4E6955F5CB48CF58AB23CF6C90@xxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BAY108-F4E6955F5CB48CF58AB23CF6C90@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mail/News 1.5 (X11/20060309)
T S wrote:
From: Anthony Liguori <aliguori@xxxxxxxxxx>
To: T S <thileepan_@xxxxxxxxxxx>
CC: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Detecting deadlocks with hypervisor..
Date: Fri, 24 Mar 2006 13:24:46 -0600

T S wrote:
This may sound a silly question (pardon me because i am relatively new to linux kernel) .. will it be possible to continue running reboot.c (or for that matter any kernel thread) when the kernel is deadlocked ? In Linux, is the kernel a single process or a bunch of parallelly executing entities? If later, then during a kernel deadlock (eg: by loading a faulty module that disables interrupts and do something silly) there can still be some other processes/threads run, right?

Sorry for not making this more clear previously. You cannot restore a dead-locked domain if a normal xm save doesn't work. One thing that makes Xen unique is that guests actually are aware of what physical pages are assigned to them. When one does a save/restore, the guest has to canonicalize all of it's internal references to physical pages. When it's restored, it then remaps it's newly assigned physical pages to all the old places where it needed to know about them for some reason or another.

We took a look at the xc_linux_save() function ... and what we see is that the canonicalize action is actually done by the Dom-0 (and not by the Dom-U);

Take a look at linux-2.6-sparse/drivers/core/reboot.c:__do_suspend(). Canonicalization is done both in Dom-0 and in the guest itself. Dom-0 attempts to do as much of it as it can but as I've said before, it cannot do all of it.

Also, given that Dom-0 can access the page tables and other structures of the deadlocked guest, can one of you be able to tell me what changes I need to do to xm_linux_save( ) (and other related functions) to save the state of the deadlocked guest without doing any handshake with the guest OS ?

If you want to attempt to futz with the state of a guest while it's running without the guest cooperating, your best bet is to do as Keir suggested and pause the domain, make your changes, and then unpause.

Regards,

Anthony Liguori


thanks!
- T


If the guest isn't responsive when you do a save, then it will never canonicalize itself and there is no way to restore the domain.

Regards,

Anthony Liguori

thanks
TS


If a suspend completes correctly, Xend will see it (another watch will fire),
and xc_linux_save will be free to complete the save.

> Also, does it seem viable to clone a copy of a deadlocked guest OS in the
> first place?

If you have a byte-for-byte copy of a deadlocked guest, even if you could suspend it, surely it will be deadlocked when it is resumed. How do you intend to break the deadlock, and how is it easier to do that from outside
than it is to perform deadlock detection in the guest?

Ewan.


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

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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