Bug 1266311
Summary: | Buffer IO error when using usb flash disk as SCSI generic-device by hostdev | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Han Han <hhan> |
Component: | qemu-kvm-rhev | Assignee: | Fam Zheng <famz> |
Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | dyuan, famz, hannsj_uhl, hhan, huding, juzhang, knoel, kraxel, rh, virt-maint, xfu, xuzhang, yama, yanyang, yisun |
Target Milestone: | rc | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-10 08:47:27 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Han Han
2015-09-25 02:59:34 UTC
One more error may have relationship with the bug(the sdc is a usb disk): 1. Start a guest with following xml(the): <disk type='block' device='lun'> <driver name='qemu' type='raw' cache='none'/> <source dev='/dev/sdc'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> 2. In guest, do disk opterations: # parted -s /dev/sda mklabel gpt [ 102.514706] blk_update_request: critical target error, dev sda, sector 0 [ 102.516566] Buffer I/O error on device sda, logical block 0 [ 102.519592] blk_update_request: critical target error, dev sda, sector 0 [ 102.521252] Buffer I/O error on device sda, logical block 0 [ 102.524023] blk_update_request: critical target error, dev sda, sector 0 [ 102.526591] blk_update_request: critical target error, dev sda, sector 0 [ 102.528274] Buffer I/O error on device sda, logical block 0 [ 102.530647] blk_update_request: critical target error, dev sda, sector 0 [ 102.532230] Buffer I/O error on device sda, logical block 0 [ 102.534501] blk_update_request: critical target error, dev sda, sector 0 [ 102.536094] Buffer I/O error on device sda, logical block 0 [ 102.538344] blk_update_request: critical target error, dev sda, sector 0 [ 102.539894] Buffer I/O error on device sda, logical block 0 [ 102.541276] blk_update_request: critical target error, dev sda, sector 0 [ 102.542820] Buffer I/O error on device sda, logical block 0 [ 102.545454] blk_update_request: critical target error, dev sda, sector 0 [ 102.546978] Buffer I/O error on device sda, logical block 0 [ 102.548432] blk_update_request: critical target error, dev sda, sector 0 [ 102.549954] Buffer I/O error on device sda, logical block 0 [ 102.552065] Buffer I/O error on device sda, logical block 0 Error: Input/output error during read on /dev/sda Error: Input/output error during write on /dev/sda Warning: Error fsyncing/closing /dev/sda: Input/output error # parted -s /dev/sda print [ 378.090490] blk_update_request: critical target error, dev sda, sector 0 [ 378.092543] Buffer I/O error on device sda, logical block 0 [ 378.095709] blk_update_request: critical target error, dev sda, sector 0 [ 378.097440] Buffer I/O error on device sda, logical block 0 [ 378.100452] blk_update_request: critical target error, dev sda, sector 0 [ 378.103084] blk_update_request: critical target error, dev sda, sector 0 [ 378.104828] Buffer I/O error on device sda, logical block 0 [ 378.107182] blk_update_request: critical target error, dev sda, sector 0 [ 378.108819] Buffer I/O error on device sda, logical block 0 [ 378.111092] blk_update_request: critical target error, dev sda, sector 0 [ 378.112739] Buffer I/O error on device sda, logical block 0 [ 378.115025] blk_update_request: critical target error, dev sda, sector 0 [ 378.116591] Buffer I/O error on device sda, logical block 0 [ 378.118774] blk_update_request: critical target error, dev sda, sector 0 [ 378.120338] Buffer I/O error on device sda, logical block 0 [ 378.121799] blk_update_request: critical target error, dev sda, sector 0 [ 378.123357] Buffer I/O error on device sda, logical block 0 [ 378.125953] blk_update_request: critical target error, dev sda, sector 0 [ 378.127435] Buffer I/O error on device sda, logical block 0 [ 378.128792] Buffer I/O error on device sda, logical block 0 Error: /dev/sda: unrecognised disk label Model: Alcor Flash Disk (scsi) Disk /dev/sda: 1048MB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: It seems more serious than what comment0 says. The mklabel operation isn't effective while the comment0 is. Just as comment0, when replace the source dev to iscsi disk, it's ok to read&write. Can you try sg3_utils (e.g. sg_read, sg_write) on the scsi_host6's corresponding device from the host /dev/sdc? On host: # sg_read bs=512 count=2 if=/dev/sg2 2+0 records in, SCSI READ commands issued: 1 # sg_write_buffer --in=/dev/urandom --length=512 /dev/sg2 Write buffer command not supported # sg_write_long --in=/dev/urandom /dev/sg2 SCSI WRITE LONG (10) command not supported For qemu-kvm-rhev-2.5.0-4.el7.x86_64, format the hostdev scsi disk in guest: # mkfs.ext4 /dev/sda1 The dmesg: [ 22.625681] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.631576] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.632316] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.632979] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 c4 33 e8 00 03 f0 00 [ 22.633738] blk_update_request: I/O error, dev sda, sector 12858344 [ 22.634429] Buffer I/O error on device sda1, logical block 1607037 [ 22.635108] lost page write due to I/O error on sda1 [ 22.635661] Buffer I/O error on device sda1, logical block 1607038 [ 22.636348] lost page write due to I/O error on sda1 [ 22.636898] Buffer I/O error on device sda1, logical block 1607039 [ 22.637576] lost page write due to I/O error on sda1 [ 22.638127] Buffer I/O error on device sda1, logical block 1607040 [ 22.638805] lost page write due to I/O error on sda1 [ 22.639356] Buffer I/O error on device sda1, logical block 1607041 [ 22.640035] lost page write due to I/O error on sda1 [ 22.640585] Buffer I/O error on device sda1, logical block 1607042 [ 22.641267] lost page write due to I/O error on sda1 [ 22.641817] Buffer I/O error on device sda1, logical block 1607043 [ 22.642494] lost page write due to I/O error on sda1 [ 22.643040] Buffer I/O error on device sda1, logical block 1607044 [ 22.643730] lost page write due to I/O error on sda1 [ 22.644284] Buffer I/O error on device sda1, logical block 1607045 [ 22.644963] lost page write due to I/O error on sda1 [ 22.645518] Buffer I/O error on device sda1, logical block 1607046 [ 22.646200] lost page write due to I/O error on sda1 [ 22.646929] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.648686] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.649388] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.650056] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 c4 2f f8 00 03 f0 00 [ 22.650823] blk_update_request: I/O error, dev sda, sector 12857336 [ 22.651572] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.652685] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.653383] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.654044] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 c4 2c 08 00 03 f0 00 [ 22.654801] blk_update_request: I/O error, dev sda, sector 12856328 [ 22.655546] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.656522] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.657362] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.658211] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 c4 28 18 00 03 f0 00 [ 22.659184] blk_update_request: I/O error, dev sda, sector 12855320 [ 22.660431] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.662172] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.663422] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.664592] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 00 23 a8 00 03 f0 00 [ 22.665909] blk_update_request: I/O error, dev sda, sector 9128 [ 22.667136] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.668015] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.668552] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.669044] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 00 1f b8 00 03 f0 00 [ 22.669623] blk_update_request: I/O error, dev sda, sector 8120 [ 22.670160] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.671993] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.673289] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.674488] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 00 1b c8 00 03 f0 00 [ 22.675885] blk_update_request: I/O error, dev sda, sector 7112 [ 22.677167] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.678937] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.680229] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.681465] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 00 17 d8 00 03 f0 00 [ 22.682861] blk_update_request: I/O error, dev sda, sector 6104 [ 22.684143] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.685948] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.687234] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.688434] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 00 13 e8 00 03 f0 00 [ 22.689815] blk_update_request: I/O error, dev sda, sector 5096 [ 22.691074] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 22.692878] sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] [ 22.694174] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated [ 22.695378] sd 2:0:0:0: [sda] CDB: Write(10) 2a 00 00 00 0f f8 00 03 f0 00 [ 22.696763] blk_update_request: I/O error, dev sda, sector 4088 [ 22.989380] ------------[ cut here ]------------ [ 22.990146] WARNING: at fs/block_dev.c:67 bdev_inode_switch_bdi+0x7a/0x90() [ 22.991054] Modules linked in: ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device ppdev snd_pcm sg snd_timer pcspkr virtio_balloon snd soundcore i2c_piix4 parport_pc parport nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common ata_generic pata_acpi virtio_blk virtio_console virtio_scsi 8139too qxl syscopyarea [ 22.999614] sysfillrect sysimgblt drm_kms_helper ttm ata_piix drm libata serio_raw 8139cp mii virtio_pci virtio_ring virtio i2c_core floppy dm_mirror dm_region_hash dm_log dm_mod [ 23.001471] CPU: 0 PID: 2377 Comm: mkfs.ext4 Not tainted 3.10.0-366.el7.x86_64 #1 [ 23.002322] Hardware name: Red Hat KVM, BIOS 1.9.1-2.el7 04/01/2014 [ 23.003005] 0000000000000000 000000006aca0131 ffff88003ba27db0 ffffffff81646497 [ 23.003866] ffff88003ba27de8 ffffffff8107f3e0 ffff88003dc25130 ffff88003dc251b8 [ 23.004736] ffffffff819dc940 000000000000009f 0000000000000000 ffff88003ba27df8 [ 23.005592] Call Trace: [ 23.005879] [<ffffffff81646497>] dump_stack+0x19/0x1b [ 23.006445] [<ffffffff8107f3e0>] warn_slowpath_common+0x70/0xb0 [ 23.007114] [<ffffffff8107f52a>] warn_slowpath_null+0x1a/0x20 [ 23.007753] [<ffffffff812226ba>] bdev_inode_switch_bdi+0x7a/0x90 [ 23.008425] [<ffffffff81223284>] __blkdev_put+0x74/0x1a0 [ 23.009016] [<ffffffff81223cfe>] blkdev_put+0x4e/0x140 [ 23.009598] [<ffffffff81223ea5>] blkdev_close+0x25/0x30 [ 23.010189] [<ffffffff811e9319>] __fput+0xe9/0x260 [ 23.010726] [<ffffffff811e95ce>] ____fput+0xe/0x10 [ 23.011271] [<ffffffff810a64c7>] task_work_run+0xa7/0xe0 [ 23.011867] [<ffffffff81014b12>] do_notify_resume+0x92/0xb0 [ 23.012499] [<ffffffff81656b7d>] int_signal+0x12/0x17 [ 23.013064] ---[ end trace efccf90fd91908e5 ]--- [ 36.895488] sda: [ 49.632851] sda: This means the host device is incapable of handling scsi requests. Please test with disks that at least _work_ with sg3_utils. (In reply to Fam Zheng from comment #7) > This means the host device is incapable of handling scsi requests. Please > test with disks that at least _work_ with sg3_utils. Most likely the usb scsi host has a pretty crappy scsi implementation and possibly supports only READ(6) and WRITE(6). /me suggests to pass through the usb flash drive using usb pass-through instead of scsi pass-through. Has the advantage that the guest will actually see it's backed by usb (and which usb scsi host it is) and can apply quirks accordingly. [ explicitly not vetoing the closed/notabug here ] I checked the strace on qemu-kvm which said the issued WRITE (10) request is invalid in size (namely 0x3f0 blocks). I still need to check why guest decides to issue this size (or whether it makes sense. I can only tell sg_raw is refusing such a size), or why it's rejected by usb host scsi. Hi Fam, Per we talked in IRC, you may still need sometime to debug this issue. Do you think it's worth to reopen this bug for now? since we need to track it somewhere. *** This bug has been marked as a duplicate of bug 1318199 *** |