Bug 499621 - F-11 Xen 64-bit domU stack traces when unmounting a disk
F-11 Xen 64-bit domU stack traces when unmounting a disk
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Justin M. Forbes
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
 
Reported: 2009-05-07 09:23 EDT by Chris Lalancette
Modified: 2009-05-22 11:30 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-22 11:30:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Chris Lalancette 2009-05-07 09:23:32 EDT
Description of problem:
I'm following the Fedora Test Day block attach/detach script here: https://fedoraproject.org/wiki/QA:Testcase_Virtualization_XenDomU_Block_attach

So, I attached a disk to my guest using (on the dom0):

# virsh attach-disk f11 --driver file /var/lib/xen/images/disk1.dsk xvdb

That succeeds, and I can now see /dev/xvdb inside my guest.  Next I partition the block device and make an ext4 filesystem inside the guest.  Finally, I mount the partition inside the guest.  This all succeeds.

Now I go to detach this disk (on the dom0):

# virsh detach-disk f11 xvdb

Oops!  I forgot to unmount the disk inside the guest, so I get the following output in dmesg in the guest:

vbd vbd-51728: 16 Device in use; refusing to close

OK, that's fine, that's what it is supposed to do.  I now go to unmount the disk inside the guest, and I get this stack trace:

EXT4-fs: mballoc: 0 blocks 0 reqs (0 success)
EXT4-fs: mballoc: 0 extents scanned, 0 goal hits, 0 2^N hits, 0 breaks, 0 lost
EXT4-fs: mballoc: 0 generated and it took 0
EXT4-fs: mballoc: 0 preallocated, 0 discarded
BUG: sleeping function called from invalid context at include/linux/writeback.h:87
in_atomic(): 0, irqs_disabled(): 1, pid: 1829, name: umount
Pid: 1829, comm: umount Not tainted 2.6.29.2-126.fc11.x86_64 #1
Call Trace:
 [<ffffffff8103ff0f>] __might_sleep+0x10b/0x110
 [<ffffffff810e6ea2>] wait_on_inode+0x22/0x3c
 [<ffffffff810e719f>] ifind+0x71/0x8a
 [<ffffffff810f788c>] ? bdev_test+0x0/0x19
 [<ffffffff810e737b>] iget5_locked+0x50/0x11d
 [<ffffffff810f78a5>] ? bdev_set+0x0/0x15
 [<ffffffff810f788c>] ? bdev_test+0x0/0x19
 [<ffffffff810f8934>] bdget+0x45/0x120
 [<ffffffff811a8204>] bdget_disk+0x28/0x3f
 [<ffffffff811a822e>] invalidate_partition+0x13/0x45
 [<ffffffff811217ec>] del_gendisk+0x3b/0xed
 [<ffffffff8100e885>] ? xen_spin_lock_flags+0x10/0x12
 [<ffffffffa0000d8e>] blkfront_closing+0x3e/0x91 [xen_blkfront]
 [<ffffffffa00012af>] blkif_release+0x48/0x4f [xen_blkfront]
 [<ffffffff810f83dc>] __blkdev_put+0x83/0x13b
 [<ffffffff810f8482>] __blkdev_put+0x129/0x13b
 [<ffffffff810f84a4>] blkdev_put+0x10/0x12
 [<ffffffff810f850d>] close_bdev_exclusive+0x24/0x2b
 [<ffffffff810d728a>] kill_block_super+0x3a/0x3f
 [<ffffffff810d7371>] deactivate_super+0x6e/0x83
 [<ffffffff810ea08d>] mntput_no_expire+0x110/0x150
 [<ffffffff810ea692>] sys_umount+0x2fa/0x328
 [<ffffffff810dc948>] ? path_put+0x22/0x26
 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b
------------[ cut here ]------------
WARNING: at kernel/softirq.c:124 _local_bh_enable_ip+0x53/0xeb() (Not tainted)
Modules linked in: sco bridge stp llc bnep l2cap bluetooth sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 dm_multipath kvm_amd kvm uinput pcspkr xen_netfront joydev xen_blkfront [last unloaded: scsi_wait_scan]
Pid: 1829, comm: umount Not tainted 2.6.29.2-126.fc11.x86_64 #1
Call Trace:
 [<ffffffff81048a63>] warn_slowpath+0xbc/0xf0
 [<ffffffff8100e609>] ? __spin_time_accum+0x21/0x37
 [<ffffffff811b7328>] ? number+0x12e/0x224
 [<ffffffff811b7142>] ? put_dec+0x1b/0xd3
 [<ffffffff811b7328>] ? number+0x12e/0x224
 [<ffffffff8100e600>] ? __spin_time_accum+0x18/0x37
 [<ffffffff81383339>] ? unix_shutdown+0xe8/0x12d
 [<ffffffff810cd0d1>] ? kmem_cache_free+0x9e/0xbc
 [<ffffffff8131b340>] ? sk_filter+0x85/0x91
 [<ffffffff8104e05b>] _local_bh_enable_ip+0x53/0xeb
 [<ffffffff8104e115>] local_bh_enable+0x12/0x14
 [<ffffffff8131b340>] sk_filter+0x85/0x91
 [<ffffffff8132925a>] netlink_broadcast+0x14b/0x26b
 [<ffffffff811b40ef>] kobject_uevent_env+0x2bd/0x36b
 [<ffffffff811b41a8>] kobject_uevent+0xb/0xd
 [<ffffffff81250f6e>] device_del+0x162/0x189
 [<ffffffff81121086>] delete_partition+0x5e/0x79
 [<ffffffff811217fc>] del_gendisk+0x4b/0xed
 [<ffffffff8100e885>] ? xen_spin_lock_flags+0x10/0x12
 [<ffffffffa0000d8e>] blkfront_closing+0x3e/0x91 [xen_blkfront]
 [<ffffffffa00012af>] blkif_release+0x48/0x4f [xen_blkfront]
 [<ffffffff810f83dc>] __blkdev_put+0x83/0x13b
 [<ffffffff810f8482>] __blkdev_put+0x129/0x13b
 [<ffffffff810f84a4>] blkdev_put+0x10/0x12
 [<ffffffff810f850d>] close_bdev_exclusive+0x24/0x2b
 [<ffffffff810d728a>] kill_block_super+0x3a/0x3f
 [<ffffffff810d7371>] deactivate_super+0x6e/0x83
 [<ffffffff810ea08d>] mntput_no_expire+0x110/0x150
 [<ffffffff810ea692>] sys_umount+0x2fa/0x328
 [<ffffffff810dc948>] ? path_put+0x22/0x26
 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b
---[ end trace bdd5f17758189721 ]---
------------[ cut here ]------------
WARNING: at block/blk-core.c:255 blk_remove_plug+0x33/0x9d() (Tainted: G        W )
Modules linked in: sco bridge stp llc bnep l2cap bluetooth sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 dm_multipath kvm_amd kvm uinput pcspkr xen_netfront joydev xen_blkfront [last unloaded: scsi_wait_scan]
Pid: 1829, comm: umount Tainted: G        W  2.6.29.2-126.fc11.x86_64 #1
Call Trace:
 [<ffffffff81048a63>] warn_slowpath+0xbc/0xf0
 [<ffffffff811b3341>] ? dynamic_kobj_release+0x9/0xb
 [<ffffffff810ccedd>] ? kfree+0xd4/0xe2
 [<ffffffff811b358e>] ? kobject_release+0x5e/0x66
 [<ffffffff811b3530>] ? kobject_release+0x0/0x66
 [<ffffffff811b4299>] ? kref_put+0x4b/0x55
 [<ffffffff811b3489>] ? kobject_put+0x47/0x4b
 [<ffffffff81250188>] ? put_device+0x1a/0x1c
 [<ffffffff811a237d>] blk_remove_plug+0x33/0x9d
 [<ffffffff811a2466>] blk_stop_queue+0x16/0x28
 [<ffffffffa0000d9a>] blkfront_closing+0x4a/0x91 [xen_blkfront]
 [<ffffffffa00012af>] blkif_release+0x48/0x4f [xen_blkfront]
 [<ffffffff810f83dc>] __blkdev_put+0x83/0x13b
 [<ffffffff810f8482>] __blkdev_put+0x129/0x13b
 [<ffffffff810f84a4>] blkdev_put+0x10/0x12
 [<ffffffff810f850d>] close_bdev_exclusive+0x24/0x2b
 [<ffffffff810d728a>] kill_block_super+0x3a/0x3f
 [<ffffffff810d7371>] deactivate_super+0x6e/0x83
 [<ffffffff810ea08d>] mntput_no_expire+0x110/0x150
 [<ffffffff810ea692>] sys_umount+0x2fa/0x328
 [<ffffffff810dc948>] ? path_put+0x22/0x26
 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b
---[ end trace bdd5f17758189722 ]---
Comment 1 Chris Lalancette 2009-05-18 10:18:25 EDT
It looks like patches to fix this were posted here:

http://lists.xensource.com/archives/html/xen-devel/2009-05/msg00700.html

Chris Lalancette
Comment 2 Justin M. Forbes 2009-05-18 12:22:46 EDT
Adding these to the F-11 kernel.  Hopefully they will make .30 upstream as well.
Comment 3 Justin M. Forbes 2009-05-22 11:30:13 EDT
These patches are in F-11 kernel 2.6.29.3-155

Note You need to log in before you can comment on or make changes to this bug.