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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Deadload between sched_adjust() in schedule.c and compat_failsafe_callback in entry.S
From: hj lee <kerdosa@xxxxxxxxx>
Date: Tue, 7 Apr 2009 23:41:36 -0600
Delivery-date: Tue, 07 Apr 2009 22:42:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=gnMDmXAEsQ4K77CmAI8OGPLf98ewKrCcyVErwyIKpl4=; b=TK5U+c/jAuRqEZJQnorUIW+Xhy0wGO8jeeQrjCNN0l8WYL7KZRvyFHlWv6WbAuGckR s3FRTd8YebpsB9agv00Rnjog0fse0U6FmB5t3l8RwHatt3y8cwYSxprOxBUTMm8T3xC7 AOlCF/4WlY8QB5+3PnK7tlBptOzji9GNIEbx8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=g2bttFYyI86tsW4Vz0fnVwsJQdebVj4GpdSo2oQvNhgMnvRrmGW1ncLnjXATN9k1+F AMHqg+1sT6+1fqTdrlMYvjdT0l3kowEck2GKzSRRxVLYSP4JWqIGhpSMbVYvcuqrWx62 IEIL8/dpI/LlDPDH7lErEUtRpn585ZXGuDebE=
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
Hi,

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?

Thanks in advance
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>