From: Dario Faggioli <raistlin@linux.it>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: BUG: sleeping function called from invalid context
Date: Tue, 11 Oct 2011 19:13:38 +0200 [thread overview]
Message-ID: <1318353219.21925.80.camel@Palantir> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2756 bytes --]
Hello everyone,
Since I really plan to spend some time here, let me introduce myself
first. My name is Dario Faggioli and I just joined the Citrix Platform
Team in Cambridge (although I'll be working from Italy). I've some
experience in Linux kernel (mainly scheduling) and not that much
experience in Xen or virtualization in general, but I really want to
learn and be able to contribute ASAP!
In fact, while "doing my homework", I stumbled against the following
BUG(). I'm able to reproduce it with xen-unstable and by just by
enabling spinlock and mutex debug checks in linus' Linux
(65112dccf8a113737684366349d7f9ec373ddc47) _iff_ using 'tap:qcow2' disk
image, while no such thing happens with 'phy:'.
[ 996.282544] BUG: sleeping function called from invalid context at /local/scratch/dariof/linux/kernel/mutex.c:271
[ 996.282570] in_atomic(): 1, irqs_disabled(): 0, pid: 3256, name: qemu-dm
[ 996.282581] 1 lock held by qemu-dm/3256:
[ 996.282589] #0: (&(&priv->lock)->rlock){......}, at: [<ffffffff813223da>] gntdev_ioctl+0x2bd/0x4d5
[ 996.282628] Pid: 3256, comm: qemu-dm Tainted: G W 3.1.0-rc8+ #5
[ 996.282638] Call Trace:
[ 996.282687] [<ffffffff81054594>] __might_sleep+0x131/0x135
[ 996.282704] [<ffffffff816bd64f>] mutex_lock_nested+0x25/0x45
[ 996.282721] [<ffffffff8131c7c8>] free_xenballooned_pages+0x20/0xb1
[ 996.282735] [<ffffffff8132194d>] gntdev_put_map+0xa8/0xdb
[ 996.282749] [<ffffffff816be546>] ? _raw_spin_lock+0x71/0x7a
[ 996.282763] [<ffffffff813223da>] ? gntdev_ioctl+0x2bd/0x4d5
[ 996.282776] [<ffffffff8132243c>] gntdev_ioctl+0x31f/0x4d5
[ 996.282790] [<ffffffff81007d62>] ? check_events+0x12/0x20
[ 996.282804] [<ffffffff811433bc>] do_vfs_ioctl+0x488/0x4d7
[ 996.282818] [<ffffffff81007d4f>] ? xen_restore_fl_direct_reloc+0x4/0x4
[ 996.282832] [<ffffffff8109168b>] ? lock_release+0x21c/0x229
[ 996.282847] [<ffffffff81135cdd>] ? rcu_read_unlock+0x21/0x32
[ 996.282860] [<ffffffff81143452>] sys_ioctl+0x47/0x6a
[ 996.282873] [<ffffffff816bfd82>] system_call_fastpath+0x16/0x1b
This seems to be due to free_xenballooned_pages(), called by
gntdev_put_map(), taking balloon_mutex, with the latter that can be
called within a spin_lock() (e.g., in gntdev_release()).
I'm not enough confident with the code do attempt fixing it, but I
thought it was worth to at least point it out!
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
----------------------------------------------------------------------
Dario Faggioli, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
PhD Candidate, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2011-10-11 17:13 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 17:13 Dario Faggioli [this message]
2011-10-11 17:32 ` BUG: sleeping function called from invalid context Konrad Rzeszutek Wilk
2011-10-11 19:16 ` [PATCH] xen/gntdev: Fix sleep-inside-spinlock Daniel De Graaf
2011-10-13 15:40 ` Konrad Rzeszutek Wilk
2011-10-13 16:26 ` Dario Faggioli
2011-10-14 11:18 ` Dario Faggioli
2011-10-14 9:57 ` Dario Faggioli
2011-10-14 13:54 ` Konrad Rzeszutek Wilk
-- strict thread matches above, loose matches on Subject: below --
2011-11-23 11:36 BUG: sleeping function called from invalid context Peter Rusko
2011-11-23 12:44 ` Fabio Estevam
2011-11-23 13:05 ` Fabio Estevam
2011-11-23 18:36 ` Uwe Kleine-König
2011-11-23 22:51 ` Russell King - ARM Linux
2011-11-24 6:32 ` Shawn Guo
2011-11-24 7:14 ` Uwe Kleine-König
2011-11-24 9:01 ` Russell King - ARM Linux
2011-11-24 9:05 ` Uwe Kleine-König
2011-11-24 10:29 ` Russell King - ARM Linux
2011-11-24 14:16 ` Uwe Kleine-König
2011-08-30 13:28 sandeep kumar
2011-08-30 15:14 ` Dave Hylands
[not found] ` <CAL7WMDf-VEOBs6o-hup-qP17AYfp+=Eb1E9w=33d93GWYa=fBw@mail.gmail.com>
[not found] ` <CABi1daHSEegXLr4MyK0xkTKxwEwwc-8bNc8jkWrpUN=ujbj_9Q@mail.gmail.com>
2011-08-31 8:15 ` sandeep kumar
2011-05-10 5:38 Amit Virdi
2011-05-10 5:38 ` Amit Virdi
2011-05-10 5:38 ` Amit Virdi
2011-05-10 9:32 ` Alan Cox
2011-05-10 9:32 ` Alan Cox
2011-05-10 9:32 ` Alan Cox
2009-11-28 13:24 Ilpo Järvinen
2008-05-06 9:04 Holger Schurig
2008-05-06 9:22 ` Holger Schurig
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=1318353219.21925.80.camel@Palantir \
--to=raistlin@linux.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.