From: John Weekes <lists.xen@nuclearfallout.net>
To: Keir Fraser <keir.xen@gmail.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
George Dunlap <george.dunlap@citrix.com>
Subject: Re: [PATCH] Fix locking bug in vcpu_migrate
Date: Fri, 22 Apr 2011 15:33:26 -0700 [thread overview]
Message-ID: <4DB20236.4020604@nuclearfallout.net> (raw)
In-Reply-To: <C9D78ADC.16C2F%keir.xen@gmail.com>
On 4/22/2011 11:43 AM, Keir Fraser wrote:
> It's odd that it seemed to lead to such a big difference for me, then.
> > I'll do some further tests -- maybe I changed something else to cause
> > the behavior, or the problem is more random than I thought and just
> > hasn't occurred for me yet in all the new tests.
I did further testing and determined that my domU was starting properly
because I had only tested once or twice with Debian Squeeze after
applying the patch; I had then done more extensive testing only under a
Win2k3 domU. It seems that Win2k3 domUs don't have the same issue.
Back on the Squeeze domU, I am reliably seeing the BUG again, with
either configuration.
I have rolled back schedule.c to pre-22948, when it was much simpler,
and that seems to have resolved this particular bug.
Now, a different credit2 bug has occurred, though only once for me so
far; with the other bug, I was seeing a panic with every 1 or 2 domU
startups, but I have seen the new bug on one test out of 15.
Specifically, I have triggered the BUG_ON in csched_domcntl. The line
number is not the standard one because I have added further debugging,
but the BUG_ON is:
BUG_ON(svc->rqd != RQD(ops, svc->vcpu->processor));
The bt being:
(XEN) [<ffff82c480119578>] csched_dom_cntl+0x11a/0x185
(XEN) [<ffff82c48011f24d>] sched_adjust+0x102/0x1f9
(XEN) [<ffff82c480102ee5>] do_domctl+0xb25/0x1250
(XEN) [<ffff82c4801ff0e8>] syscall_enter+0xc8/0x122
Also, in three of those last 15 startups, my domU froze three times
(consuming no CPU and seemingly doing nothing), somewhere in this block
of code in ring_read in tools/firmware/hvmloader/xenbus.c -- I added
debug information that allowed me to narrow it down. This function is
being called when it is writing the SMBIOS tables. I can't tell whether
this is related to the credit2 problem. (The domU can be "destroyed" to
get out of it).
/* Don't overrun the producer pointer */
while ( (part = MASK_XENSTORE_IDX(rings->rsp_prod -
rings->rsp_cons)) == 0 )
ring_wait();
/* Don't overrun the end of the ring */
if ( part > (XENSTORE_RING_SIZE -
MASK_XENSTORE_IDX(rings->rsp_cons)) )
part = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(rings->rsp_cons);
/* Don't read more than we were asked for */
if ( part > len )
part = len;
Note that I am using stubdoms.
I would be happy to temporarily turn over the reins on this machine to
you or George, if you'd like to debug any of these issues directly. I
may not be able to continue experimenting in the short term here myself
due to time constraints.
-John
next prev parent reply other threads:[~2011-04-22 22:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 10:00 [PATCH] Fix locking bug in vcpu_migrate John Weekes
2011-04-22 10:30 ` Keir Fraser
2011-04-22 18:23 ` John Weekes
2011-04-22 18:43 ` Keir Fraser
2011-04-22 22:33 ` John Weekes [this message]
2011-04-23 7:01 ` Keir Fraser
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=4DB20236.4020604@nuclearfallout.net \
--to=lists.xen@nuclearfallout.net \
--cc=george.dunlap@citrix.com \
--cc=keir.xen@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).