Bug 747011

Summary: Taking screenshot hangs Spice display when a client is connected
Product: Red Hat Enterprise Linux 6 Reporter: Marc-Andre Lureau <marcandre.lureau>
Component: qemu-kvmAssignee: Alon Levy <alevy>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, alevy, bsarathy, cfergeau, cmeadors, dblechte, juzhang, minovotn, mkenneth, mkrcmari, shu, syeghiay, virt-maint, wdai
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.251.el6 Doc Type: Bug Fix
Doc Text:
No Documentation Needed
Story Points: ---
Clone Of:
: 800338 (view as bug list) Environment:
Last Closed: 2012-06-20 11:35:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 800338    

Description Marc-Andre Lureau 2011-10-18 15:08:16 UTC
Description of problem:

A hang can occur while taking qemu screendumps and a spice client is connected:

Thread 2 (Thread 0x7f46aa7fd700 (LWP 23002)):
#0  0x000000373a0ab6ad in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#1  0x000000373a0d9954 in usleep (useconds=<optimized out>) at 
                ../sysdeps/unix/sysv/linux/usleep.c:33
#2  0x00007f46b1c39bc8 in flush_display_commands (worker=0x7f46aa6255e0) at 
                red_worker.c:8932
#3  0x00007f46b1c3a1b9 in handle_dev_update (worker=0x7f46aa6255e0) at
red_worker.c:10149
#4  handle_dev_input (listener=0x7f46aa6255e0, events=<optimized out>) at 
                red_worker.c:10416
#5  0x00007f46b1c3c582 in red_worker_main (arg=<optimized out>) at
red_worker.c:10803
#6  0x000000373a807b31 in start_thread (arg=0x7f46aa7fd700) at
pthread_create.c:305
#7  0x000000373a0dfd2d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Version-Release number of selected component (if applicable):

0.8.2 (and git master)

How reproducible:

100%


Steps to Reproduce:
1. setup a spice VM with virt-manager, and open the display
2. "while true; do sleep 1 && virsh screenshot domain; done" in the background
3. do random things in the guest: move windows around, scroll webpage...
  
Actual results:

The display hangs.

Expected results:

It should not hang at all.

Additional info:

Restarting the client solves it.

Comment 7 Alon Levy 2012-02-26 10:27:47 UTC
upstream commit d70d6b31091ab522ce793a52559e3dd9f9913b32

Comment 8 Alon Levy 2012-02-26 10:28:27 UTC
my bad, wrong bug edited.

Comment 9 Alon Levy 2012-02-26 10:32:47 UTC
Bug should be on qemu-kvm, not on spice-server, that's where the current patchset that fixes it is, spice-server doesn't require any changes.

Moving to qemu-kvm.

Please note reproducer remains the same, and the fixes are on the mailing list:

 http://patchwork.ozlabs.org/patch/142978/
 http://patchwork.ozlabs.org/patch/142987/
 http://patchwork.ozlabs.org/patch/142972/
 http://patchwork.ozlabs.org/patch/142986/
 http://patchwork.ozlabs.org/patch/142973/
 http://patchwork.ozlabs.org/patch/142983/
 http://patchwork.ozlabs.org/patch/142985/

and

 http://patchwork.ozlabs.org/patch/142974/
 http://patchwork.ozlabs.org/patch/142976/
 http://patchwork.ozlabs.org/patch/142975/
 http://patchwork.ozlabs.org/patch/142979/

Not sure which QE should take this.

Alon

Comment 16 daiwei 2012-04-27 10:18:26 UTC
I can't reproduce this issue with the steps in comment0 and the following environment:

# uname -r;rpm -q qemu-kvm
2.6.32-220.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6.x86_64

spice-client-0.8.2-15.el6.x86_64
spice-server-0.8.2-5.el6.x86_64
virt-manager-0.9.0-7.el6.x86_64
libvirt-0.9.10-8.el6.x86_64

Steps:
1. setup a spice VM with virt-manager, and open the display
2. "while true; do sleep 1 && virsh screenshot domain; done" in the background
3. do random things in the guest: move windows around, scroll webpage

Comment 17 Michal Novotny 2012-05-03 17:56:44 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation Needed

Comment 18 daiwei 2012-05-04 04:07:30 UTC
Verified this issue with the steps the following environment:

2.6.32-220.el6.x86_64
qemu-kvm-0.12.1.2-2.253.el6.x86_64

steps:

1. Boot guest using qemu-kvm directly, connect guest with spice then run TOMs-2D-Bench in a loop in guest and take screenshot more than 1000 times , guest works well.

2. Boot guest with virt-manager, and open the display with spice
  2.1 run TOMs-2D-Bench in a loop in guest
  2.2 "while true; do sleep 1 && virsh screenshot domain; done" in the   background, take screenshot more than 1000 times. Both host and guest running well.

Comment 20 errata-xmlrpc 2012-06-20 11:35:18 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.

http://rhn.redhat.com/errata/RHBA-2012-0746.html