All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] hostdev / iSCSI issue in QEMU 2.7
@ 2016-09-01 20:21 Holger Schranz
  2016-09-05  9:16 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Holger Schranz @ 2016-09-01 20:21 UTC (permalink / raw)
  To: QEMU Developers

Hello,

we need help for an issue we have sice QEMU 2.7.
May be we use the wrong mailing list. If so please let me know which
mail list we have to use to report problems in QEMU.

Best regards

Holger

===================================================================================

We use the following libvirt-descrption for a tape-device and a
changer-device:

     <hostdev mode='subsystem' type='scsi' managed='no' rawio='yes'>
       <source protocol='iscsi'
name='iqn.2008-09.net.fsc:server.LT260_61005/1'>
       <host name='192.168.200.53' port='3260'/>
       </source>
       <address type='drive' controller='2' bus='0' target='2' unit='2'/>
     </hostdev>

<!-- Media changer -->
     <hostdev mode='subsystem' type='scsi' managed='no' rawio='yes'>
       <source protocol='iscsi'
name='iqn.2008-09.net.fsc:server.LT260_61005/3'>
       <host name='192.168.200.53' port='3260'/>
       </source>
       <address type='drive' controller='2' bus='0' target='2' unit='6'/>
     </hostdev>

We use tgt as iSCSI-Server.

With qemu 2.6 it works fine.

With qemu 2.7RC4 we got the following error:

Thread 1 "qemu-system-x86" received signal SIGFPE, Arithmetic exception.
0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
     errp=0x7fffffffcca8) at
/home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
1838        if (iscsilun->bl.max_ws_len < 0xffffffff /
iscsilun->block_size) {

The function iscsi_refresh_limits is changed in 2.7RC4 and devides by
iscsilun->block_size,
but the block size is filled only for SCSI-type TYPE_DISK and TYPE_ROM in
/home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1378 (function
iscsi_readcapacity_sync)

If the libvirt-construction (see above) is correct, there is no chance
in qemu 2.7
to use a tape-device or changer via iscsi.

!!! If we should change the definition, please let us know. !!!

Backtrace:
  Thread 1 "qemu-system-x86" received signal SIGFPE, Arithmetic exception.
0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
     errp=0x7fffffffcca8) at
/home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
1838        if (iscsilun->bl.max_ws_len < 0xffffffff /
iscsilun->block_size) {
(gdb) bt
#0  0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
errp=0x7fffffffcca8) at /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
#1  0x0000555555c018d4 in bdrv_refresh_limits (bs=0x5555568236f0,
errp=0x7fffffffcca8) at /home/kvm/SOURCES/qemu-2.7.0-rc4/block/io.c:121
#2  0x0000555555b9627a in bdrv_open_common (bs=0x5555568236f0, file=0x0,
options=0x555556827950, errp=0x7fffffffcd58)
     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1013
#3  0x0000555555b97e3b in bdrv_open_inherit (filename=0x5555567de840
"iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
reference=0x0, options=0x555556827950, flags=57346,
parent=0x55555681d450, child_role=
     0x555556165360 <child_file>, errp=0x7fffffffcea8)
     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1687
#4  0x0000555555b97524 in bdrv_open_child (filename=0x5555567de840
"iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
options=0x5555568216b0, bdref_key=0x555555d78112 "file",
parent=0x55555681d450, child_role=
     0x555556165360 <child_file>, allow_none=true, errp=0x7fffffffcea8)
     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1449
#5  0x0000555555b97cb9 in bdrv_open_inherit (filename=0x5555567de840
"iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
reference=0x0, options=0x5555568216b0, flags=8194, parent=0x0, child_role=
     0x0, errp=0x7fffffffd1d8) at
/home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1648
#6  0x0000555555b9825c in bdrv_open (filename=0x5555567de840
"iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
reference=0x0, options=0x5555567ed240, flags=2, errp=0x7fffffffd1d8)
     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1778
#7  0x0000555555beef4f in blk_new_open (filename=0x5555567de840
"iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
reference=0x0, options=0x5555567ed240, flags=2, errp=0x7fffffffd1d8)
     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block/block-backend.c:160
#8  0x00005555558ce2bb in blockdev_init (file=0x5555567de840
"iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
bs_opts=0x5555567ed240, errp=0x7fffffffd1d8) at
/home/kvm/SOURCES/qemu-2.7.0-rc4/blockdev.c:597
#9  0x00005555558cf576 in drive_new (all_opts=0x555556766fd0,
block_default_type=IF_IDE) at
/home/kvm/SOURCES/qemu-2.7.0-rc4/blockdev.c:1132
#10 0x00005555558eaec9 in drive_init_func (opaque=0x5555567787b0,
opts=0x555556766fd0, errp=0x0) at /home/kvm/SOURCES/qemu-2.7.0-rc4/vl.c:1138
#11 0x0000555555c9ab9d in qemu_opts_foreach (list=0x555556184fe0
<qemu_drive_opts>, func=0x5555558eae8a <drive_init_func>,
opaque=0x5555567787b0, errp=0x0)
     at /home/kvm/SOURCES/qemu-2.7.0-rc4/util/qemu-option.c:1116
#12 0x00005555558f434a in main (argc=85, argv=0x7fffffffd6e8,
envp=0x7fffffffd998) at /home/kvm/SOURCES/qemu-2.7.0-rc4/vl.c:4401

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] hostdev / iSCSI issue in QEMU 2.7
  2016-09-01 20:21 [Qemu-devel] hostdev / iSCSI issue in QEMU 2.7 Holger Schranz
@ 2016-09-05  9:16 ` Kevin Wolf
  2016-09-06 15:52   ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2016-09-05  9:16 UTC (permalink / raw)
  To: Holger Schranz; +Cc: QEMU Developers, eblake, pl, pbonzini, qemu-block

Am 01.09.2016 um 22:21 hat Holger Schranz geschrieben:
> Hello,
> 
> we need help for an issue we have sice QEMU 2.7.
> May be we use the wrong mailing list. If so please let me know which
> mail list we have to use to report problems in QEMU.
> 
> Best regards
> 
> Holger

Eric, a quick look suggests that this might be related to your recent
changes to the iscsi driver. Can you have a look?

Maybe what we really need to do is avoid calling bdrv_refresh_limits()
for devices with bs->sg == true.

Kevin

> ===================================================================================
> 
> We use the following libvirt-descrption for a tape-device and a
> changer-device:
> 
>     <hostdev mode='subsystem' type='scsi' managed='no' rawio='yes'>
>       <source protocol='iscsi'
> name='iqn.2008-09.net.fsc:server.LT260_61005/1'>
>       <host name='192.168.200.53' port='3260'/>
>       </source>
>       <address type='drive' controller='2' bus='0' target='2' unit='2'/>
>     </hostdev>
> 
> <!-- Media changer -->
>     <hostdev mode='subsystem' type='scsi' managed='no' rawio='yes'>
>       <source protocol='iscsi'
> name='iqn.2008-09.net.fsc:server.LT260_61005/3'>
>       <host name='192.168.200.53' port='3260'/>
>       </source>
>       <address type='drive' controller='2' bus='0' target='2' unit='6'/>
>     </hostdev>
> 
> We use tgt as iSCSI-Server.
> 
> With qemu 2.6 it works fine.
> 
> With qemu 2.7RC4 we got the following error:
> 
> Thread 1 "qemu-system-x86" received signal SIGFPE, Arithmetic exception.
> 0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
>     errp=0x7fffffffcca8) at
> /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
> 1838        if (iscsilun->bl.max_ws_len < 0xffffffff /
> iscsilun->block_size) {
> 
> The function iscsi_refresh_limits is changed in 2.7RC4 and devides by
> iscsilun->block_size,
> but the block size is filled only for SCSI-type TYPE_DISK and TYPE_ROM in
> /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1378 (function
> iscsi_readcapacity_sync)
> 
> If the libvirt-construction (see above) is correct, there is no chance
> in qemu 2.7
> to use a tape-device or changer via iscsi.
> 
> !!! If we should change the definition, please let us know. !!!
> 
> Backtrace:
>  Thread 1 "qemu-system-x86" received signal SIGFPE, Arithmetic exception.
> 0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
>     errp=0x7fffffffcca8) at
> /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
> 1838        if (iscsilun->bl.max_ws_len < 0xffffffff /
> iscsilun->block_size) {
> (gdb) bt
> #0  0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
> errp=0x7fffffffcca8) at /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
> #1  0x0000555555c018d4 in bdrv_refresh_limits (bs=0x5555568236f0,
> errp=0x7fffffffcca8) at /home/kvm/SOURCES/qemu-2.7.0-rc4/block/io.c:121
> #2  0x0000555555b9627a in bdrv_open_common (bs=0x5555568236f0, file=0x0,
> options=0x555556827950, errp=0x7fffffffcd58)
>     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1013
> #3  0x0000555555b97e3b in bdrv_open_inherit (filename=0x5555567de840
> "iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
> reference=0x0, options=0x555556827950, flags=57346,
> parent=0x55555681d450, child_role=
>     0x555556165360 <child_file>, errp=0x7fffffffcea8)
>     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1687
> #4  0x0000555555b97524 in bdrv_open_child (filename=0x5555567de840
> "iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
> options=0x5555568216b0, bdref_key=0x555555d78112 "file",
> parent=0x55555681d450, child_role=
>     0x555556165360 <child_file>, allow_none=true, errp=0x7fffffffcea8)
>     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1449
> #5  0x0000555555b97cb9 in bdrv_open_inherit (filename=0x5555567de840
> "iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
> reference=0x0, options=0x5555568216b0, flags=8194, parent=0x0, child_role=
>     0x0, errp=0x7fffffffd1d8) at
> /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1648
> #6  0x0000555555b9825c in bdrv_open (filename=0x5555567de840
> "iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
> reference=0x0, options=0x5555567ed240, flags=2, errp=0x7fffffffd1d8)
>     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block.c:1778
> #7  0x0000555555beef4f in blk_new_open (filename=0x5555567de840
> "iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
> reference=0x0, options=0x5555567ed240, flags=2, errp=0x7fffffffd1d8)
>     at /home/kvm/SOURCES/qemu-2.7.0-rc4/block/block-backend.c:160
> #8  0x00005555558ce2bb in blockdev_init (file=0x5555567de840
> "iscsi://192.168.200.53:3260/iqn.2008-09.net.fsc%3Aserver.LT260_61005/1",
> bs_opts=0x5555567ed240, errp=0x7fffffffd1d8) at
> /home/kvm/SOURCES/qemu-2.7.0-rc4/blockdev.c:597
> #9  0x00005555558cf576 in drive_new (all_opts=0x555556766fd0,
> block_default_type=IF_IDE) at
> /home/kvm/SOURCES/qemu-2.7.0-rc4/blockdev.c:1132
> #10 0x00005555558eaec9 in drive_init_func (opaque=0x5555567787b0,
> opts=0x555556766fd0, errp=0x0) at /home/kvm/SOURCES/qemu-2.7.0-rc4/vl.c:1138
> #11 0x0000555555c9ab9d in qemu_opts_foreach (list=0x555556184fe0
> <qemu_drive_opts>, func=0x5555558eae8a <drive_init_func>,
> opaque=0x5555567787b0, errp=0x0)
>     at /home/kvm/SOURCES/qemu-2.7.0-rc4/util/qemu-option.c:1116
> #12 0x00005555558f434a in main (argc=85, argv=0x7fffffffd6e8,
> envp=0x7fffffffd998) at /home/kvm/SOURCES/qemu-2.7.0-rc4/vl.c:4401
> 
> ---
> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
> https://www.avast.com/antivirus
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] hostdev / iSCSI issue in QEMU 2.7
  2016-09-05  9:16 ` Kevin Wolf
@ 2016-09-06 15:52   ` Eric Blake
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Blake @ 2016-09-06 15:52 UTC (permalink / raw)
  To: Kevin Wolf, Holger Schranz; +Cc: QEMU Developers, pl, pbonzini, qemu-block

[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]

On 09/05/2016 04:16 AM, Kevin Wolf wrote:
> Am 01.09.2016 um 22:21 hat Holger Schranz geschrieben:
>> Hello,
>>
>> we need help for an issue we have sice QEMU 2.7.
>> May be we use the wrong mailing list. If so please let me know which
>> mail list we have to use to report problems in QEMU.
>>
>> Best regards
>>
>> Holger
> 
> Eric, a quick look suggests that this might be related to your recent
> changes to the iscsi driver. Can you have a look?

Indeed, it looks like we'll have to write a patch, and downstreams will
have to backport it until 2.7.1 stable includes it automatically.

> 
> Maybe what we really need to do is avoid calling bdrv_refresh_limits()
> for devices with bs->sg == true.

Seems like a good idea; I'll give that idea a try and post a patch
shortly, although getting Holger's help in testing it would be appreciated.
>> Thread 1 "qemu-system-x86" received signal SIGFPE, Arithmetic exception.
>> 0x0000555555c207e2 in iscsi_refresh_limits (bs=0x5555568236f0,
>>     errp=0x7fffffffcca8) at
>> /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1838
>> 1838        if (iscsilun->bl.max_ws_len < 0xffffffff /
>> iscsilun->block_size) {
>>
>> The function iscsi_refresh_limits is changed in 2.7RC4 and devides by
>> iscsilun->block_size,
>> but the block size is filled only for SCSI-type TYPE_DISK and TYPE_ROM in
>> /home/kvm/SOURCES/qemu-2.7.0-rc4/block/iscsi.c:1378 (function
>> iscsi_readcapacity_sync)
>>
>> If the libvirt-construction (see above) is correct, there is no chance
>> in qemu 2.7
>> to use a tape-device or changer via iscsi.
>>
>> !!! If we should change the definition, please let us know. !!!

The libvirt usage seems correct, rather, this is an unfortunate qemu
regression, and sadly was not reported in time for us to fix it for last
week's 2.7 release.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-06 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 20:21 [Qemu-devel] hostdev / iSCSI issue in QEMU 2.7 Holger Schranz
2016-09-05  9:16 ` Kevin Wolf
2016-09-06 15:52   ` Eric Blake

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.