pci_virtio_block.c Assertion failed: line 216

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

pci_virtio_block.c Assertion failed: line 216

Harry Schmalzbauer
 Dear all,

trying to use bhyve(8) with virtio-blk and Windows guest results in core
dump:
Assertion failed: (n >= 2 && n <= BLOCKIF_IOV_MAX + 2), function
pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line
216.                                                              
Abort trap (core dumped)

Unfortunately this is on a production-test machine which lacks gdb etc.
Will try to reproduce on antoher machine, but maybe someone already
knows that problem?

Thanks,
-harry
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: pci_virtio_block.c Assertion failed: line 216

Peter Grehan
Hi Harry,

> trying to use bhyve(8) with virtio-blk and Windows guest results in core
> dump:
> Assertion failed: (n >= 2 && n <= BLOCKIF_IOV_MAX + 2), function
> pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line
> 216.
> Abort trap (core dumped)
>
> Unfortunately this is on a production-test machine which lacks gdb etc.
> Will try to reproduce on antoher machine, but maybe someone already
> knows that problem?

  virtio-blk isn't currently supported with Windows guests. You'll need
to use ahci-hd for now.

  However, I do have a fix that can hopefully be committed shortly.

later,

Peter.

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: pci_virtio_block.c Assertion failed: line 216

freebsd-virtualization mailing list
In reply to this post by Harry Schmalzbauer

> Wiadomość napisana przez Harry Schmalzbauer <[hidden email]> w dniu 03.01.2017, o godz. 20:33:
>
> Dear all,
>
> trying to use bhyve(8) with virtio-blk and Windows guest results in core
> dump:
> Assertion failed: (n >= 2 && n <= BLOCKIF_IOV_MAX + 2), function
> pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line
> 216.                                                              
> Abort trap (core dumped)
>
> Unfortunately this is on a production-test machine which lacks gdb etc.
> Will try to reproduce on antoher machine, but maybe someone already
> knows that problem?

I've seen that problem and fixed it, will upstream the patch later today.

JFYI, fixing commit: https://github.com/freenas/os/commit/0e4d6e1826f8aa7041cbeeb4365c797eeec5c5f4 <https://github.com/freenas/os/commit/0e4d6e1826f8aa7041cbeeb4365c797eeec5c5f4>

Thanks.
Jakub
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: pci_virtio_block.c Assertion failed: line 216

Harry Schmalzbauer
In reply to this post by Peter Grehan
Bezüglich Peter Grehan's Nachricht vom 03.01.2017 20:36 (localtime):

> Hi Harry,
>
>> trying to use bhyve(8) with virtio-blk and Windows guest results in core
>> dump:
>> Assertion failed: (n >= 2 && n <= BLOCKIF_IOV_MAX + 2), function
>> pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line
>> 216.
>> Abort trap (core dumped)
>>
>> Unfortunately this is on a production-test machine which lacks gdb etc.
>> Will try to reproduce on antoher machine, but maybe someone already
>> knows that problem?
>
>  virtio-blk isn't currently supported with Windows guests. You'll need
> to use ahci-hd for now.
>
>  However, I do have a fix that can hopefully be committed shortly.


Mising in another reply:

>> Wiadomość napisana przez Harry Schmalzbauer <[hidden email]
>> <mailto:[hidden email]>> w dniu 03.01.2017, o godz. 20:33:


>> Will try to reproduce on antoher machine, but maybe someone already
>> knows that problem?
>
> I've seen that problem and fixed it, will upstream the patch later today.
>
> JFYI, fixing
> commit:
https://github.com/freenas/os/commit/0e4d6e1826f8aa7041cbeeb4365c797eeec5c5f4

Thanks Jakub for the info.

I can confirm that increasing BLOCKIF_IOV_MAX from 33 to 128, like the
diff shows, solved the problem for me.
I've successfully done some performace tests on Windows7 (virtio-blk vs.
ahci,hd:) and also migrated one Server 2012R2 to bhyve using virtio-blk.

Peter, is your mentioned fix different from just increasing BLOCKIF_IOV_MAX?
If not, would you commit that please?

Thanks,

-harry


_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: pci_virtio_block.c Assertion failed: line 216

Harry Schmalzbauer
Am 15.11.2017 um 15:19 schrieb Harry Schmalzbauer:

> Bezüglich Peter Grehan's Nachricht vom 03.01.2017 20:36 (localtime):
>> Hi Harry,
>>
>>> trying to use bhyve(8) with virtio-blk and Windows guest results in core
>>> dump:
>>> Assertion failed: (n >= 2 && n <= BLOCKIF_IOV_MAX + 2), function
>>> pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line
>>> 216.
>>> Abort trap (core dumped)
>>>
>>> Unfortunately this is on a production-test machine which lacks gdb etc.
>>> Will try to reproduce on antoher machine, but maybe someone already
>>> knows that problem?
>>   virtio-blk isn't currently supported with Windows guests. You'll need
>> to use ahci-hd for now.
>>
>>   However, I do have a fix that can hopefully be committed shortly.
> …
>
> Mising in another reply:
>
>>> Wiadomość napisana przez Harry Schmalzbauer <[hidden email]
>>> <mailto:[hidden email]>> w dniu 03.01.2017, o godz. 20:33:
> …
>>> Will try to reproduce on antoher machine, but maybe someone already
>>> knows that problem?
>> I've seen that problem and fixed it, will upstream the patch later today.
>>
>> JFYI, fixing
>> commit:
> https://github.com/freenas/os/commit/0e4d6e1826f8aa7041cbeeb4365c797eeec5c5f4
>
> Thanks Jakub for the info.
>
> I can confirm that increasing BLOCKIF_IOV_MAX from 33 to 128, like the
> diff shows, solved the problem for me.
> I've successfully done some performace tests on Windows7 (virtio-blk vs.
> ahci,hd:) and also migrated one Server 2012R2 to bhyve using virtio-blk.
>
> Peter, is your mentioned fix different from just increasing BLOCKIF_IOV_MAX?
> If not, would you commit that please?

I hope that I don't bug people knowing better, but this simple diff
makes virtio-blk usable for Windows 7.
Is there any reason not to commit?

Index: src/usr.sbin/bhyve/block_if.h
===================================================================
--- usr.sbin/bhyve/block_if.h       (Revision 325745)
+++ usr.sbin/bhyve/block_if.h       (Arbeitskopie)
@@ -39,7 +39,7 @@
  #include <sys/uio.h>
  #include <sys/unistd.h>

-#define BLOCKIF_IOV_MAX                33      /* not practical to be
IOV_MAX */
+#define BLOCKIF_IOV_MAX                128     /* not practical to be
IOV_MAX */

  struct blockif_req {
         struct iovec    br_iov[BLOCKIF_IOV_MAX];

Thanks,

-harry
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: pci_virtio_block.c Assertion failed: line 216

Marcelo Araujo-7
2018-06-01 17:38 GMT+08:00 Harry Schmalzbauer <[hidden email]>:

> Am 15.11.2017 um 15:19 schrieb Harry Schmalzbauer:
>
>> Bezüglich Peter Grehan's Nachricht vom 03.01.2017 20:36 (localtime):
>>
>>> Hi Harry,
>>>
>>> trying to use bhyve(8) with virtio-blk and Windows guest results in core
>>>> dump:
>>>> Assertion failed: (n >= 2 && n <= BLOCKIF_IOV_MAX + 2), function
>>>> pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line
>>>> 216.
>>>> Abort trap (core dumped)
>>>>
>>>> Unfortunately this is on a production-test machine which lacks gdb etc.
>>>> Will try to reproduce on antoher machine, but maybe someone already
>>>> knows that problem?
>>>>
>>>   virtio-blk isn't currently supported with Windows guests. You'll need
>>> to use ahci-hd for now.
>>>
>>>   However, I do have a fix that can hopefully be committed shortly.
>>>
>> …
>>
>> Mising in another reply:
>>
>> Wiadomość napisana przez Harry Schmalzbauer <[hidden email]
>>>> <mailto:[hidden email]>> w dniu 03.01.2017, o godz. 20:33:
>>>>
>>> …
>>
>>> Will try to reproduce on antoher machine, but maybe someone already
>>>> knows that problem?
>>>>
>>> I've seen that problem and fixed it, will upstream the patch later today.
>>>
>>> JFYI, fixing
>>> commit:
>>>
>> https://github.com/freenas/os/commit/0e4d6e1826f8aa7041cbeeb
>> 4365c797eeec5c5f4
>>
>> Thanks Jakub for the info.
>>
>> I can confirm that increasing BLOCKIF_IOV_MAX from 33 to 128, like the
>> diff shows, solved the problem for me.
>> I've successfully done some performace tests on Windows7 (virtio-blk vs.
>> ahci,hd:) and also migrated one Server 2012R2 to bhyve using virtio-blk.
>>
>> Peter, is your mentioned fix different from just increasing
>> BLOCKIF_IOV_MAX?
>> If not, would you commit that please?
>>
>
> I hope that I don't bug people knowing better, but this simple diff makes
> virtio-blk usable for Windows 7.
> Is there any reason not to commit?
>

There were some discussion[0] about this possible fix, but seems the fix is
not that so simple.
I got distracted with other things and I didn't further investigated this
issue.

Maybe Peter has something news about this issue.

[0] https://reviews.freebsd.org/D10581

Best,


>
> Index: src/usr.sbin/bhyve/block_if.h
> ===================================================================
> --- usr.sbin/bhyve/block_if.h       (Revision 325745)
> +++ usr.sbin/bhyve/block_if.h       (Arbeitskopie)
> @@ -39,7 +39,7 @@
>  #include <sys/uio.h>
>  #include <sys/unistd.h>
>
> -#define BLOCKIF_IOV_MAX                33      /* not practical to be
> IOV_MAX */
> +#define BLOCKIF_IOV_MAX                128     /* not practical to be
> IOV_MAX */
>
>  struct blockif_req {
>         struct iovec    br_iov[BLOCKIF_IOV_MAX];
>
>
> Thanks,
>
> -harry
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubs
> [hidden email]"
>



--

--
Marcelo Araujo            (__)[hidden email]
\\\'',)http://www.FreeBSD.org <http://www.freebsd.org/>   \/  \ ^
Power To Server.         .\. /_)
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to "[hidden email]"