From: Anthony Liguori <aliguori@us.ibm.com>
To: Thileepan Subramaniam <thileepan_@hotmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Detecting deadlocks with hypervisor..
Date: Sun, 19 Mar 2006 10:30:09 -0600 [thread overview]
Message-ID: <441D8711.2090502@us.ibm.com> (raw)
In-Reply-To: <BAY108-F1559EBC532E859A0955BCF6DA0@phx.gbl>
Thileepan Subramaniam wrote:
> Hello,
>
> I am trying to see if the hypervisor can be used to detect deadlocks
> in the guest VMs. My goal is to detect if a guest OS is deadlocked,
> and if it is, then create a clone of the deadlocked OS without the
> locking condition, and letting the clone run. While the clone runs I
> am hoping to generate some hints that could tell me what caused the
> deadlock.
>
> I simulated a deadlock/hang situation in a guest OS (by loading a
> badly written module to the kernel) and when the guestOS kernel was
> hanging, I ran "xm save" from Dom-0. But this command waits forever.
>
> I tried to follow the flow of the .py files (XendCheckpoint.py etc.).
> These seem to be called when I run 'xm save'. But beyond a point I am
> not sure what the python scripts do. I also see some libxc files such
> as xc_linux_save.c, but I am not sure who is using it (Dom-0 or Xen or
> the XenU). Can someone help me by explaining me what happens behind
> the scene when "xm save" is called ? Is there any good documentation
> explaining which actions are done by which layers (eg: python layer, C
> layer etc).
>
> Also, does it seem viable to clone a copy of a deadlocked guest OS in
> the first place?
As Ewan pointed out, xm save is guest-assisted so a hung guest will not
be savable.
You may want to look at xc_domain_dumpcore(). You could do some
post-analysis of the core dump to determine where it locked.
Determining why it dead-locked is of course impossible for the general
case but you may be able to develop some interesting heuristics with
appropriate static analysis.
As for recovering the guest, a really clever approach would be to
rewrite some of the locking code (maybe temporarily?) by mapping the
guest's code page into dom0's memory after examining EIP in the core.
I reckon there's a rather interesting paper to be written on something
like this :-)
Regards,
Anthony Liguori
> thanks!
> - ts
>
> _________________________________________________________________
> On the road to retirement? Check out MSN Life Events for advice on how
> to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2006-03-19 16:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-19 2:14 Detecting deadlocks with hypervisor Thileepan Subramaniam
2006-03-19 6:37 ` Randy Thelen
2006-03-19 10:16 ` Edwin Zhai
2006-03-19 13:17 ` Ewan Mellor
2006-03-24 18:57 ` T S
2006-03-24 19:04 ` T S
2006-03-24 19:24 ` Anthony Liguori
2006-03-24 20:30 ` T S
2006-04-07 17:11 ` T S
2006-04-07 17:22 ` Keir Fraser
2006-04-07 17:45 ` Anthony Liguori
2006-04-07 17:41 ` Anthony Liguori
2006-04-08 1:47 ` T S
2006-04-08 14:38 ` Anthony Liguori
2006-03-19 16:30 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=441D8711.2090502@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=thileepan_@hotmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.