Bug 1582137

Summary: sometimes reboot guest cause qemu process abort when multiple guests are running script time-warp-test
Product: Red Hat Enterprise Linux 7 Reporter: Li Xiaohui <xiaohli>
Component: spiceAssignee: Frediano Ziglio <fziglio>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.6CC: cfergeau, chayang, dblechte, fziglio, juzhang, knoel, tpelka, victortoso, virt-maint, xfu, xiaohli
Target Milestone: rc   
Target Release: 7.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-0.14.0-8.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 20:09:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
script "time-warp-test" none

Description Li Xiaohui 2018-05-24 10:15:58 UTC
Created attachment 1441012 [details]
script "time-warp-test"

Description of problem:
With 3 guests running 'time-warp-test' script firstly,  the fourth guest start later than them sometimes will quit from qemu-kvm process when reboot 

Version-Release number of selected component (if applicable):
For host: 
kernel-3.10.0-889.el7.x86_64, qemu-kvm-rhev-2.12.0-2.el7.x86_64
For guest: 
kernel-3.10.0-889.el7.x86_64

How reproducible:
5/5

Steps to Reproduce:
1.Boot 3 linux guests, and  with keep 'time-warp-test' script running at the same time.
1.1 on host:
# /usr/libexec/qemu-kvm -M pc -cpu SandyBridge -enable-kvm -m 2G -smp 4 -nodefconfig -rtc base=utc,clock=host,driftfix=slew -device ... -vnc :2 -monitor stdio -device ...
1.2 on each guest:
# gcc -Wall -o time-warp-test time-warp-test.c -lrt
# ./time-warp-test 

2.After step 1, boot the fourth linux guest(like 1.1). After guest start successful, then reboot it(maybe need some times)

Actual results:
(process:39388): Spice-WARNING **: display-channel.c:2431:display_channel_validate_surface: canvas address is 0x5555583bbb08 for 0 (and is NULL)

(process:39388): Spice-WARNING **: display-channel.c:2432:display_channel_validate_surface: failed on 0

(process:39388): Spice-CRITICAL **: display-channel.c:2035:display_channel_update: condition `display_channel_validate_surface(display, surface_id)' failed
Detaching after fork from child process 40476.

Program received signal SIGABRT, Aborted.

#0  0x00007fffed499207 in raise () from /lib64/libc.so.6
#1  0x00007fffed49a8f8 in abort () from /lib64/libc.so.6
#2  0x00007fffeecdd47c in spice_log () from /lib64/libspice-server.so.1
#3  0x00007fffeec92308 in display_channel_update () from /lib64/libspice-server.so.1
#4  0x00007fffeecc0bab in handle_dev_update_async () from /lib64/libspice-server.so.1
#5  0x00007fffeec8c29d in dispatcher_handle_recv_read () from /lib64/libspice-server.so.1
#6  0x00007fffeec92aab in watch_func () from /lib64/libspice-server.so.1
#7  0x00007ffff76c48f9 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#8  0x00007ffff76c4c58 in g_main_context_iterate.isra.22 () from /lib64/libglib-2.0.so.0
#9  0x00007ffff76c4f2a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#10 0x00007fffeecc0f4a in red_worker_main () from /lib64/libspice-server.so.1
#11 0x00007fffed837dd5 in start_thread () from /lib64/libpthread.so.0
#12 0x00007fffed561b3d in clone () from /lib64/libc.so.6

Expected results:
all guests work well no matter what operation are executed.


Additional info:
QE will test linux guest and older qemu-kvm version later. and update test result to bz asap.

Comment 2 Christophe Fergeau 2018-05-25 08:01:06 UTC
(In reply to Li Xiaohui from comment #0)

> Steps to Reproduce:
> 1.1 on host:
> # /usr/libexec/qemu-kvm -M pc -cpu SandyBridge -enable-kvm -m 2G -smp 4
> -nodefconfig -rtc base=utc,clock=host,driftfix=slew -device ... -vnc :2
> -monitor stdio -device ...

Can you give the full QEMU command line which was used? The backtrace is in spice code, but the command line is missing the spice bits (ie qxl is probably used). Which version of spice-server are you using on the host? Which linux guest do you use for the testing, in particular on the 4th guest?

Comment 3 Li Xiaohui 2018-05-25 08:45:30 UTC
(In reply to Christophe Fergeau from comment #2)
> (In reply to Li Xiaohui from comment #0)
> 
> > Steps to Reproduce:
> > 1.1 on host:
> > # /usr/libexec/qemu-kvm -M pc -cpu SandyBridge -enable-kvm -m 2G -smp 4
> > -nodefconfig -rtc base=utc,clock=host,driftfix=slew -device ... -vnc :2
> > -monitor stdio -device ...
> 
> Can you give the full QEMU command line which was used? The backtrace is in
> spice code, but the command line is missing the spice bits (ie qxl is
> probably used). Which version of spice-server are you using on the host?
> Which linux guest do you use for the testing, in particular on the 4th guest?

1. qemu command line like this(different guest only vnc port and mac address are different):
/usr/libexec/qemu-kvm -M pc -cpu SandyBridge -enable-kvm -m 2G -smp 4 -nodefconfig -rtc base=utc,clock=host,driftfix=slew -device virtio-scsi-pci,id=scsi0,disable-legacy=on,disable-modern=off,iommu_platform=on -drive file=/home/rhel7.6.qcow2,if=none,id=drive-scsi0-0-0-0 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 -vnc :2 -monitor stdio -device virtio-net-pci,mac=08:9e:01:c2:65:82,id=jsalaf,vectors=4,netdev=id879abc,bootindex=1 -netdev tap,id=id879abc,vhost=on -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,bus=virtio-serial0.0,chardev=qga0,id=qemu-ga0,name=org.qemu.guest_agent.0 -vga qxl

2.spice-server version used on host: spice-server-0.14.0-4.el7.x86_64.

3.now use the 4th guest for test and found the bug. but also don't rule out the existence of bug on the first three guest

Comment 4 Frediano Ziglio 2018-07-10 16:02:34 UTC
Looking at the paths this is possible looks like the guest can easily trigger this. Maybe we should just give a warning.

Comment 5 Frediano Ziglio 2019-06-17 16:15:19 UTC
Posted upstream a patch. See https://lists.freedesktop.org/archives/spice-devel/2019-June/049381.html

Comment 6 Frediano Ziglio 2019-06-20 08:59:49 UTC
Merged https://gitlab.freedesktop.org/spice/spice/commit/bf968572d1f7a0052df2615b69b361b0ec652a29 upstream, should not be hard to backport.

Comment 7 David Blechter 2019-06-20 11:54:03 UTC
too late for 7.7, moving to 7.8

Comment 11 errata-xmlrpc 2020-03-31 20:09:14 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.

https://access.redhat.com/errata/RHBA-2020:1170