From: Keir Fraser <keir.xen@gmail.com>
To: Paulian Bogdan Marinca <paulian@marinca.net>,
xen-devel@lists.xensource.com
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: XEN 4.1.3-rc1 bug, spinlock acquired twice
Date: Sat, 28 Jan 2012 08:13:12 +0000 [thread overview]
Message-ID: <CB495E98.29F01%keir.xen@gmail.com> (raw)
In-Reply-To: <CAFFE2avi4ivVEauq=cgCt5Q9Ua3KuyfT0+ZyY1ZLs21F9uMQhg@mail.gmail.com>
On 27/01/2012 23:20, "Paulian Bogdan Marinca" <paulian@marinca.net> wrote:
> 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
Thanks, the offending patch is xen-unstable:22409, I think. It needs an HVM
guest which maps emulated IRQs onto event channels, but then has event
channel notifications mapped onto an emulated IRQ (rather than 'direct
vector delivery'). An unlikely state of affairs, maybe it's a temporary
setup during guest boot, or maybe it indicates a bug in the guest as well.
In any case, cc'ing the author, Stefano. This ought to be easy to fix. We
could make the irq_lock a recursive lock for example.
-- Keir
> 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
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2012-01-28 8:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 23:20 XEN 4.1.3-rc1 bug, spinlock acquired twice Paulian Bogdan Marinca
2012-01-28 8:13 ` Keir Fraser [this message]
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
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=CB495E98.29F01%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=paulian@marinca.net \
--cc=stefano.stabellini@eu.citrix.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).