* Re: [Qemu-devel] Bug#768517: qemu-system-x86: virtio-scsi unreliable - crashes and write failures
[not found] <000001498d03e356-ad9138e5-43c7-491b-aeb0-56e5b60c06de-000000@email.amazonses.com>
@ 2014-11-08 4:32 ` Michael Tokarev
2014-11-08 4:40 ` Michael Tokarev
0 siblings, 1 reply; 2+ messages in thread
From: Michael Tokarev @ 2014-11-08 4:32 UTC (permalink / raw)
To: Ray Kohler, 768517; +Cc: qemu-devel
Control: tag -1 + moreinfo confirmed
[Adding qemu-devel@]
08.11.2014 04:28, Ray Kohler wrote:
> Package: qemu-system-x86
> Version: 2.1+dfsg-5+b1
> Severity: normal
>
> virtio-scsi is quite unreliable compared to the version in wheezy. I see
> many crashes, with this output:
>
> qemu-system-x86_64: wrong size for virtio-scsi headers
>
> This looks like the bug referenced at
> https://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg03281.html
>
> Sometimes, instead of crashing, it starts denying all writes to the
> guest, which normally makes the guest kernel report "I/O Error". No qemu
> output is produced in this case. The crash is much more common, though.
>
> A reliable way for me to reproduce this problem is to do a net-install
> of OpenBSD/amd64 using the media at
> http://openbsd.mirrors.pair.com/snapshots/amd64/cd56.iso . It succeeds
> in partitioning the disk and writing filesystems to it, but when it
> tries to unpack the base system tarballs, it triggers one of the failure
> modes described above, every time.
I looked at the code, read the thread you referred, and I even tried
to perform an OpenBSD netinst from the cd image you mentioned, and I
have a Big Question (tm).
Why do you think this is a bug in qemu, or, rather, what do you think
is buggy behavour?
As far as I see, OpenBSD sends invalid virtio-scsi requests. There are
2 ways to deal with this: 1) report errors to guest, or 2) exit. Real
hardware does a combination of the two, sometimes it report errors, and
sometimes it reboots the machine, locks it up, or something else.
This is exactly what qemu does -- depending on which request is bad and
how it is bad. Sometimes it reports an error to guest and marks the
virtio-scsi device as read-only (because guest is clearly confused and
it is unsafe to continue writing), sometimes it exits.
What is wrong with this? What do you want qemu to do?
If you're debugging a bug in OpenBSD, I think filing bug in qemu will
not give you anything. We may try to see which request is bad and how
bad it is, but the rest is for OpenBSD kernel/driver guys to check,
and we can't even answer why and when such request comes.
> The same guest works fine if I emulate a different kind of disk
> controller.
So we can conclude that drivers for other qemu-emulated devices in
OpenBSD aren't that buggy as qemu-scsi.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Bug#768517: qemu-system-x86: virtio-scsi unreliable - crashes and write failures
2014-11-08 4:32 ` [Qemu-devel] Bug#768517: qemu-system-x86: virtio-scsi unreliable - crashes and write failures Michael Tokarev
@ 2014-11-08 4:40 ` Michael Tokarev
0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2014-11-08 4:40 UTC (permalink / raw)
To: Ray Kohler, 768517; +Cc: qemu-devel
[I forgot to add one comment]
08.11.2014 07:32, Michael Tokarev wrote:
> Control: tag -1 + moreinfo confirmed
>
> [Adding qemu-devel@]
>
> 08.11.2014 04:28, Ray Kohler wrote:
>>
>> virtio-scsi is quite unreliable compared to the version in wheezy. I see
>> many crashes, with this output:
>>
>> qemu-system-x86_64: wrong size for virtio-scsi headers
So you're saying this is a regression compared with version 1.1.2.
But the thing is -- did virtio-scsi _ever_ worked in 1.1? I don't
think it was. At least I can't perform the same OpenBSD install
in 1.1 verison at all -- the installer can't write anything to
virtio-scsi, it fails for me right when writing a partition table,
with "Invalid argument/Illegal Request" SCSI error code.
So it looks like this is not a regression, quite the opposite...
Unless, ofcourse, I'm doing something incorrectly.
qemu-system-x86_64 -enable-kvm -m 1G \
-device virtio-scsi-pci,id=scsi \
-drive file=foo.img,if=none,cache=unsafe,id=d \
-device scsi-hd,drive=d \
-vga std -cpu host -cdrom cd56.iso -monitor stdio
(for both 2.1 and 1.1.)
Thanks,
/mjt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-08 4:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <000001498d03e356-ad9138e5-43c7-491b-aeb0-56e5b60c06de-000000@email.amazonses.com>
2014-11-08 4:32 ` [Qemu-devel] Bug#768517: qemu-system-x86: virtio-scsi unreliable - crashes and write failures Michael Tokarev
2014-11-08 4:40 ` Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).