Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1505696 - Qemu crashed when open the second display of virtio video
Qemu crashed when open the second display of virtio video
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.5
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Guo, Zhiyi
:
Depends On:
Blocks: 1460595
  Show dependency treegraph
 
Reported: 2017-10-24 02:59 EDT by Fangge Jin
Modified: 2018-04-10 20:45 EDT (History)
8 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.10.0-20.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 20:44:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backtrace of qemu (44.71 KB, text/plain)
2017-10-24 03:15 EDT, Fangge Jin
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 None None None 2018-04-10 20:45 EDT

  None (edit)
Description Fangge Jin 2017-10-24 02:59:20 EDT
Description of problem:
Qemu crashed when open the second display of virtio video. Qemu log:

qemu-kvm: ui/console.c:1567: dpy_gfx_replace_surface: Assertion `old_surface != surface' failed.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-3.el7.x86_64
spice-server-0.14.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start a guest with spice graphic, virtio video and heads=3
# virsh dumpxml $guest
...
    <video>
      <model type='virtio' heads='3' primary='yes'/>
    </video>
...

2. Check qemu command line:
... -device virtio-vga,id=video0,max_outputs=3,bus=pci.0,addr=0xb ...

3. Connect to guest by remote-viewer:
# remote-viewer spice://$ip:$port

4. Log in guest

5. Open the second display by remote-viewer: Click View -> Click Displays -> Check on "Display 2"

Actual results:
In step5, qemu crashed

Expected results:
No crash
Comment 2 Fangge Jin 2017-10-24 03:15 EDT
Created attachment 1342543 [details]
backtrace of qemu
Comment 3 Gerd Hoffmann 2017-11-01 04:38:57 EDT
commit 1540008629bbb6a9c0826582d94ecf7a559f784c
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Wed Sep 6 16:21:09 2017 +0200

    console: fix dpy_gfx_replace_surface assert
    
    virtio-gpu can trigger the assert added by commit "6905b93447 console:
    add same surface replace pre-condition" in multihead setups (where
    surface can be NULL for secondary displays).  Allow surface being NULL.
    
    Fixes: 6905b93447a42e606dfd126b90f75f4cd3c6fe94
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
    Message-id: 20170906142109.2685-1-kraxel@redhat.com
Comment 5 Miroslav Rezanina 2018-02-07 08:30:30 EST
Fix included in qemu-kvm-rhev-2.10.0-20.el7
Comment 7 Guo, Zhiyi 2018-02-12 01:11:47 EST
Verify this issue against qemu-kvm-rhev-2.10.0-20.el7.x86_64

Qemu cli used:
/usr/libexec/qemu-kvm -name nice -m 4G \
        -S \
        -cpu Skylake-Client,enforce \
        -smp 4 \
        -monitor stdio \
        -qmp unix:/tmp/qmp,server,nowait \
        -device virtio-vga,max_outputs=2 \
        -serial unix:/tmp/console,server,nowait \
        -netdev tap,id=idinWyYp,vhost=on -device e1000,mac=42:ce:a9:d8:8e:d4,id=idlbq7eA,netdev=idinWyYp \
        -uuid 115e11b2-a869-41b5-91cd-6a32a907be7e \
        -drive file=latest75.qcow2,if=none,id=drive-scsi-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-hd,drive=drive-sc
si-disk0,id=scsi-disk0 \
        -spice port=5900,disable-ticketing \
        -device virtio-serial -chardev spicevmc,id=vdagent,debug=0,name=vdagent \
        -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \

Steps:
1. Boot rhel 7.5 guest and use remote-viewer to connect guest.
2. After guest boot to desktop, launch second monitor: View -> Displays -> Display 2

Results:
Display 2 can be launched with desktop graphic. After 3 times trials, no coredump happen too.
Comment 8 Guo, Zhiyi 2018-02-12 01:12:24 EST
Verified per comment 7
Comment 10 errata-xmlrpc 2018-04-10 20:44:15 EDT
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.

https://access.redhat.com/errata/RHSA-2018:1104

Note You need to log in before you can comment on or make changes to this bug.