Bug 802673

Summary: Virt-viewer form cannot be closed through GUI when it connects to a VNC guest.
Product: Red Hat Enterprise Linux 6 Reporter: Geyang Kong <gkong>
Component: virt-viewerAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: hbrock, jwu, mjenner, mzhan, rwu, yupzhang, zpeng
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-viewer-0.5.2-4.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 12:11:52 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:
Attachments:
Description Flags
virt-viewer debuginfo in terminal with --debug option none

Description Geyang Kong 2012-03-13 09:09:56 UTC
Description of problem:
  Virt-viewer form cannot be closed through GUI when it connects to a VNC guest.

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

virt-viewer-0.5.2-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Make sure there is a running guest with VNC display.

2. Run #virt-viewer <guest-name> --debug

3. Make sure you can see the console, then try to close it by clicking 'X' or using 'File->Quit' from menu.

Actual results:

1. There is a string said 'connected to graphic server' console but virt-viewer form is still there.

2. You can only use ctrl+c in terminal to close it.

3. When try to close it again. There will be a Gtk warning like below in terminal.
----------------------------------------------------------------------------------------
(virt-viewer:17926): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
** (virt-viewer:17926): DEBUG: Dispatch handler 5 1 0x945740
** (virt-viewer:17926): DEBUG: Update timeout 0x9451e0 1 0
** (virt-viewer:17926): DEBUG: Dispatch timeout 0x9451e0 0x7fb95226f080 1 0x945590
** (virt-viewer:17926): DEBUG: Update timeout 0x9451e0 1 -1
----------------------------------------------------------------------------------------

Expected results:

1. Virt-viewer form can be closed normally.

Additional info:

1. This issue cannot be reproduced by spice.

2. This issue cannot be reproduced by virt-viewer-0.5.1-1.el6.x86_64.

3. There is nothing in libvirtd.log, so I didn't attach it.

Comment 1 Geyang Kong 2012-03-13 09:10:58 UTC
Created attachment 569609 [details]
virt-viewer debuginfo in terminal with --debug option

Comment 3 Daniel Berrangé 2012-04-03 15:22:34 UTC
There are two bugs here.

1. The failure to actually close the window. This regression is caused by

commit 8ec03e50974330c3813df68e16b38702e216f9fd
Author: Hans de Goede <hdegoede>
Date:   Sun Mar 4 19:02:31 2012 +0100

    virt_viewer_app_quit: Cleanly close the connection before quiting
    
    Even though the previous patches in this series ensure that the session
    gets properly finalized, we still need to wait for the disconnect signal,
    as spice-glib uses co-routines which need some time to cleanly close the
    connection / session.
    
    Signed-off-by: Hans de Goede <hdegoede>

2. The error "A floating object was finalized.". This regression is caused by

commit 7c1414b31859eaa00421d347408d5dc6168ab12d
Author: Hans de Goede <hdegoede>
Date:   Sun Mar 4 17:34:10 2012 +0100

    virt-viewer-app: unref the session on dispose
    
    With this patch combined with the previous patches in this series, the
    VirtViewerSession (finally) gets properly finalized on exit.
    
    Signed-off-by: Hans de Goede <hdegoede>

Comment 4 Daniel Berrangé 2012-04-03 17:36:52 UTC
Upstream fix

https://www.redhat.com/archives/virt-tools-list/2012-April/msg00019.html

Comment 5 zhe peng 2012-04-05 05:13:29 UTC
this bug can reproduce with:
virt-viewer-0.5.2-1.el6.x86_64

verify with:
virt-viewer-0.5.2-4.el6.x86_64
libvirt-0.9.10-6.el6.x86_64

step:
1. Make sure there is a running guest with VNC display.

2. Run #virt-viewer <guest-name> --debug

3. Make sure you can see the console, then try to close it by clicking 'X' or
using 'File->Quit' from menu.

Virt-viewer can be closed normally now.

Comment 7 zhe peng 2012-04-05 08:54:09 UTC
according to comment5 , move to verified.

Comment 8 Daniel Berrangé 2012-04-17 10:00:53 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 10 errata-xmlrpc 2012-06-20 12:11:52 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-0772.html