xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* XEN 4.1.3-rc1 bug, spinlock acquired twice
@ 2012-01-27 23:20 Paulian Bogdan Marinca
  2012-01-28  8:13 ` Keir Fraser
  0 siblings, 1 reply; 7+ messages in thread
From: Paulian Bogdan Marinca @ 2012-01-27 23:20 UTC (permalink / raw)
  To: xen-devel

I have a testing intel machine with 4 physical cpus running 64 bit Xen
4.1.3-rc1.

I have a particular linux VM for which at its kernel boot time ( as
domU ) it makes the XEN and Dom0 unresponsive (even the XEN serial
console freezes indefinitely). The domU linux kernel is 3.2.1 and has
XEN compiled in.

Trying to find where the problem is, I found this: at the point where
XEN/Dom0 freezes, the physical cpus 0, 1 and 2 are executing the
idle_loop() from xen/arch/x86/domain.c and the cpu 3 spins
indefinitely in the

d->arch.hvm_domain.irq_lock

( where "d" is the domain of my domU )

This is the Xen call trace of the cpu 3, at the point where it spins forever:

(XEN) [<ffff82c480126a06>] _spin_lock+0x56/0x110
(XEN)    [<ffff82c4801d0814>] hvm_set_callback_irq_level+0x34/0x150
(XEN)    [<ffff82c4801d1245>] hvm_assert_evtchn_irq+0x65/0x90
(XEN)    [<ffff82c48016e505>] vcpu_mark_events_pending+0x35/0x40
(XEN)    [<ffff82c4801073f5>] evtchn_set_pending+0x135/0x1c0
(XEN)    [<ffff82c4801075e7>] send_guest_pirq+0x57/0x70
(XEN)    [<ffff82c4801d04cb>] assert_gsi+0x5b/0x60
(XEN)    [<ffff82c4801d07bb>] hvm_isa_irq_assert+0x9b/0xc0
(XEN)    [<ffff82c4801cd642>] do_hvm_op+0x1982/0x22e0
(XEN)    [<ffff82c480235ffe>] compat_hypercall+0xae/0x107


A history of acquiring d->arch.hvm_domain.irq_lock shows that cpu 3
tries to acquire the same lock twice

first here:

(XEN) [<ffff82c480126a06>] _spin_lock+0x56/0x110
(XEN)    [<ffff82c4801d0762>] hvm_isa_irq_assert+0x42/0xc0
(XEN)    [<ffff82c4801cd642>] do_hvm_op+0x1982/0x22e0
(XEN)    [<ffff82c480235ffe>] compat_hypercall+0xae/0x107


at hvm_isa_irq_assert()

and then next at hvm_set_callback_irq_level()

and it thus spins indefinitely.  Also, the vcpu 0 of Dom0 is bound to
cpu 3 at that time.

I am not familiar with XEN internals so I don't know the best way to
create a patch for fixing this. That's why I am posting this to the
xen developers list.

All the best,
Paulian

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-30 14:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-27 23:20 XEN 4.1.3-rc1 bug, spinlock acquired twice Paulian Bogdan Marinca
2012-01-28  8:13 ` Keir Fraser
2012-01-30 11:32   ` Stefano Stabellini
2012-01-30 13:13     ` Paulian Bogdan Marinca
2012-01-30 14:11       ` Stefano Stabellini
2012-01-30 14:14         ` Paulian Bogdan Marinca
2012-01-30 14:18           ` Stefano Stabellini

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).