Bug 1434743

Summary: Boot guest failed with error "virtio_scsi_data_plane_handle_ctrl: Assertion `s->ctx && s->dataplane_started' failed"
Product: Red Hat Enterprise Linux 7 Reporter: xianwang <xianwang>
Component: qemu-kvm-rhevAssignee: David Gibson <dgibson>
Status: CLOSED ERRATA QA Contact: Yongxue Hong <yhong>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: aliang, areis, chayang, coli, juzhang, knoel, michen, mrezanin, pbonzini, qzhang, virt-maint, xianwang, xuwei, zhengtli
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Fixed In Version: qemu-kvm-rhev-2.9.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-02 03:39:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description xianwang 2017-03-22 09:51:59 UTC
Description of problem:
Boot a guest with qemu cli including "-object iothread", booting failed and qemu prompt error information.

Version-Release number of selected component (if applicable):
RHEL-7.4-20170317.n.0 Server ppc64le

How reproducible:

Steps to Reproduce:
1.Boot a guest with qemu cli:
/usr/libexec/qemu-kvm -object iothread,id=iothread0 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=09,iothread=iothread0 -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=/root/test.qcow2 -device scsi-hd,id=image1,drive=drive_image1,bus=virtio_scsi_pci0.0,bootindex=0

Actual results:
Boot guest failed and qemu prompt error message as following:

VNC server running on ::1:5900
qemu-kvm: /builddir/build/BUILD/qemu-2.9.0/hw/scsi/virtio-scsi-dataplane.c:66: virtio_scsi_data_plane_handle_ctrl: Assertion `s->ctx && s->dataplane_started' failed.

Expected results:
Boot guest sccessfully and vm works well 

Additional info:

Comment 4 Zhengtong 2017-03-23 07:59:14 UTC
Works on qemu-kvm-rhev-2.8.0-6.el7.ppc64le . this is a regression.

Comment 7 David Gibson 2017-03-24 04:11:10 UTC
I've reproduced the problem on upstream.  Debugging..

Comment 8 David Gibson 2017-03-24 08:16:57 UTC
Looks to be a race condition - just occasionally the assert() doesn't trip.  This is making a bisect difficult.

Comment 9 Paolo Bonzini 2017-03-24 10:48:28 UTC
Upstream patch series:

[Qemu-devel] [PATCH for-2.9 v3 0/2] virtio-scsi: Fix assertion failure on dataplane handlers

Comment 10 David Gibson 2017-03-28 00:20:31 UTC
Series mentioned in comment 9 is now merged upstream as:

Comment 11 David Gibson 2017-03-28 00:33:49 UTC
Those patches have gone into 2.9, so we should get a fix for this in a subsequent 2.9 rebase.

Comment 12 Yongxue Hong 2017-04-12 11:00:33 UTC
This bug is fixed in quemu 2.9.0-rc2.The following is the step of verification:

The version:
kernel tree:RHEL-7.4-20170330.1-Server-ppc64le

The verification of cli:
/usr/libexec/qemu-kvm \
-name need-info \
-M pseries-rhel7.4.0 \
-m 8G \
-nodefaults \
-smp 4,sockets=4,cores=1,threads=1 \
-boot menu=on,order=cd \
-device VGA,id=vga0 \
-device nec-usb-xhci,id=xhci \
-device usb-tablet,id=usb-tablet0 \
-device usb-kbd,id=usb-kbd0 \
-object iothread,id=iothread0 \
-device virtio-scsi-pci,id=virtio_scsi_pci1 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=09,iothread=iothread0 \
-drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=/root/test.qcow2 \
-device scsi-hd,id=image1,drive=drive_image1,bus=virtio_scsi_pci0.0,bootindex=0 \
-netdev tap,id=hostnet0,script=/etc/qemu-ifup \
-device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=40:f2:e9:5d:9c:01 \
-monitor stdio \
-serial unix:./sock1,server,nowait \
-qmp tcp:0:3001,server,nowait \
-vnc :1

Actual results:
Boot guest sccessfully and vm works well ,there is no error info.

Comment 14 Yongxue Hong 2017-04-27 11:13:14 UTC

kernel tree:RHEL-7.4-20170330.1-Server-ppc64le
SLOF:SLOF.noarch 20170303-1.git66d250e.el7

The step of verification is same to the Comment 12.

Actual results:
Boot guest sccessfully and the vm works well,there is no error info.
So the bug is fixed in the version of qemu-kvm-rhev-2.9.0-1.el7 and change the status to verified.

Comment 16 errata-xmlrpc 2017-08-02 03:39:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.