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] Deadload between sched_adjust() in schedule.c and compat

To: hj lee <kerdosa@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Deadload between sched_adjust() in schedule.c and compat_failsafe_callback in entry.S
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 08 Apr 2009 07:03:59 +0100
Cc:
Delivery-date: Tue, 07 Apr 2009 23:10:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f75feb220904072241v23d477b9meb67f9b6d972b11@xxxxxxxxxxxxxx>
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
Thread-index: Acm4DL+Pmri53FbkSdGOMC54JXhVAAAAw86Q
Thread-topic: [Xen-devel] Deadload between sched_adjust() in schedule.c and compat_failsafe_callback in entry.S
User-agent: Microsoft-Entourage/12.15.0.081119
This should be easily fixable. I’ll look into it.

 -- Keir

On 08/04/2009 06:41, "hj lee" <kerdosa@xxxxxxxxx> wrote:

We have a deadlock in dom0 running X86_64 CentOs 5.2 when dom0 runs libvirtd and xentop together, this deadlock is easily reproducible. The dom0 has four vcpus assigned. The libvirt is running on vcpu#0 and xentop is running on vcpu#3. The vcpu#0 is processing XEN_DOMCTL_scheduler_op of domctl.c which calls sched_adjust(). The sched_adjust() calls vcpu_pause(v) for each vcpu in the domain, and vcpu_pause(v) calls vcpu_sleep_sync(v) where it waits for vcpu#3 pause. On the other hand vcpu#3 is executing vcpu_runstate_get() in schedule.c called from XEN_SYSCTL_getdomaininfolist in sysctl.c. At the time of deadlock somehow this vcpu#3's exception RIP is pointing [compat_failsafe_callback+86], which is cmpb $0x0,87987(%rip)    # 0xffff828c8019ef00 <domctl_lock.10183>. I am not sure how vcpu#3 gets into this code, but what I believe it is trying to get the spinlock on domctl_lock. But vcpu#0 had a lock on the domctl_lock when it enters do_comctl(). So two vcpus are in deadlock.

Can anybody explain how and when compat_failsafe_callback in entry.S is get called? Why does it try to get a lock on domctl_lock?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>