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