Bug 849003 - unplug the using disk cause fail to remove other pci device(Call Trace)
unplug the using disk cause fail to remove other pci device(Call Trace)
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.9
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Asias He
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-16 23:35 EDT by Sibiao Luo
Modified: 2013-10-31 20:04 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-17 11:36:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-08-16 23:35:09 EDT
Description of problem:
boot a guest and attach a virtio disk, use dd command to write date to the disk and unplug this disk in monitor, and then unplug other pci device(e.g. virtio NIC) will fail, call trance will occor. 

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q kvm
2.6.18-336.el5
kvm-83-259.el5
guest info:
RHEL-Server-5.9-64bit
# uname -r
2.6.18-336.el5

How reproducible:
always

Steps to Reproduce:
1.boot a guest with a virtio data disk attached.
eg. # /usr/libexec/qemu-kvm -m 2G -smp 2,cores=2,threads=1,sockets=1 -M rhel5.6.0 -cpu qemu64,+sse2 -name stress_test -drive file=/home/RHEL-Server-5.9-64-virtio.qcow2,format=qcow2,media=disk,if=virtio,cache=none,werror=stop,boot=on -uuid `uuidgen` -balloon virtio -serial unix:/tmp/ttyS0,server,nowait -usbdevice tablet -soundhw ac97 -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -balloon virtio -net nic,vlan=0,model=virtio,macaddr=08:2E:5F:0A:0D:9A -net tap,sndbuf=0,vlan=0,script=/etc/qemu-ifup,downscript=no -boot c -vnc :1 -monitor stdio -drive file=/home/my-data-disk.qcow2,format=qcow2,media=disk,if=virtio,cache=none,werror=stop
2.use dd command to write date to disk.
dd if=/dev/urandom of=/dev/vdb bs=1M count=2048
3.hot-unplug the using data disk.
4.hot-remove other pci device(e.g. virtio NIC).

Actual results:
after the step 3, fail to remove the using data disk and dd would not fail.
after the step 4, fail to remove the virtio NIC device and call trance will occor after a while.
# nc -U /tmp/ttyS0
INFO: task kacpid:34 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kacpid        D ffff810002536420     0    34     27           106    33 (L-TLB)
 ffff81007fcab750 0000000000000046 0000000000000001 0000000000000246
 ffff81007a0cb2a8 0000000000000009 ffff810037f657e0 ffffffff80319b60
 0000002fd9c72e58 0000000000630741 ffff810037f659c8 000000008006e665
Call Trace:
 [<ffffffff8006ecd9>] do_gettimeofday+0x40/0x90
 [<ffffffff800637de>] io_schedule+0x3f/0x67
 [<ffffffff80028da1>] get_request_wait+0xe7/0x130
 [<ffffffff800a3444>] autoremove_wake_function+0x0/0x2e
 [<ffffffff8002dd67>] blk_recount_segments+0x17/0x28
 [<ffffffff8000c190>] __make_request+0x40a/0x4ce
 [<ffffffff8001c344>] generic_make_request+0x211/0x228
 [<ffffffff80023340>] mempool_alloc+0x31/0xe7
 [<ffffffff8008d297>] __wake_up_common+0x3e/0x68
 [<ffffffff800330e1>] submit_bio+0xe6/0xed
 [<ffffffff8001ab0b>] submit_bh+0xf4/0x114
 [<ffffffff8001c54b>] __block_write_full_page+0x1f0/0x2fd
 [<ffffffff800e92a0>] blkdev_get_block+0x0/0x46
 [<ffffffff8001d0c3>] mpage_writepages+0x1bf/0x37d
 [<ffffffff800e849a>] blkdev_writepage+0x0/0xf
 [<ffffffff8005a86f>] do_writepages+0x20/0x2f
 [<ffffffff8004f75f>] __filemap_fdatawrite_range+0x50/0x5b
 [<ffffffff800c9880>] filemap_write_and_wait+0x17/0x31
 [<ffffffff8014d154>] invalidate_partition+0x28/0x40
 [<ffffffff8010f6db>] del_gendisk+0x30/0x131
 [<ffffffff88097049>] :virtio_blk:virtblk_remove+0x39/0x70
 [<ffffffff88075153>] :virtio:virtio_dev_remove+0x15/0x43
 [<ffffffff801ce720>] __device_release_driver+0x9f/0xe9
 [<ffffffff801cea29>] device_release_driver+0x2c/0x4e
 [<ffffffff801cdee5>] bus_remove_device+0xa4/0xb9
 [<ffffffff801ccbd3>] device_del+0x129/0x1a9
 [<ffffffff801ccc70>] device_unregister+0x9/0x12
 [<ffffffff8808b04a>] :virtio_pci:virtio_pci_remove+0x19/0x58
 [<ffffffff80164560>] pci_device_remove+0x24/0x3a
 [<ffffffff801ce720>] __device_release_driver+0x9f/0xe9
 [<ffffffff801cea29>] device_release_driver+0x2c/0x4e
 [<ffffffff801cdee5>] bus_remove_device+0xa4/0xb9
 [<ffffffff801ccbd3>] device_del+0x129/0x1a9
 [<ffffffff801ccc70>] device_unregister+0x9/0x12
 [<ffffffff80160884>] pci_stop_dev+0x25/0x57
 [<ffffffff888267ab>] :acpiphp:acpiphp_disable_slot+0x66/0x12a
 [<ffffffff8018403e>] acpi_os_execute_deferred+0x0/0x27
 [<ffffffff88826e5f>] :acpiphp:handle_hotplug_event_func+0x10c/0x13e
 [<ffffffff8019cfc7>] acpi_bus_get_device+0x1d/0x2e
 [<ffffffff80189ba9>] acpi_ev_notify_dispatch+0x57/0x60
 [<ffffffff8018405c>] acpi_os_execute_deferred+0x1e/0x27
 [<ffffffff8004d2e4>] run_workqueue+0x9e/0xfb
 [<ffffffff80049aed>] worker_thread+0x0/0x122
 [<ffffffff800a322c>] keventd_create_kthread+0x0/0xc4
 [<ffffffff80049bdd>] worker_thread+0xf0/0x122
 [<ffffffff8008ee72>] default_wake_function+0x0/0xe
 [<ffffffff800a322c>] keventd_create_kthread+0x0/0xc4
 [<ffffffff800a322c>] keventd_create_kthread+0x0/0xc4
 [<ffffffff80032679>] kthread+0xfe/0x132
 [<ffffffff8005dfb1>] child_rip+0xa/0x11
 [<ffffffff800a322c>] keventd_create_kthread+0x0/0xc4
 [<ffffffff8003257b>] kthread+0x0/0x132
 [<ffffffff8005dfa7>] child_rip+0x0/0x11 

Expected results:
1.remove the using data disk should success and 'dd' will fail with a prompt that I/O error.
2.remove other pci device (e.g. virtio NIC) should success and no call trance.

Additional info:
exsiting a similar bug in rhel6.3(bug 734051) has been fixed.
I tried the latest rhel6.4 guest (kernel-2.6.32-298.el6), it has no such issue, we can remove the using data disk successfully and 'dd' fail with a prompt: I/O error.
Comment 1 Ronen Hod 2012-08-19 10:16:42 EDT
Too late for RHEL5.9.
Will reconsider in 5.10.

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