Bug 802673 - Virt-viewer form cannot be closed through GUI when it connects to a VNC guest.
Virt-viewer form cannot be closed through GUI when it connects to a VNC guest.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-13 05:09 EDT by Geyang Kong
Modified: 2013-08-04 23:43 EDT (History)
7 users (show)

See Also:
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 08:11:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virt-viewer debuginfo in terminal with --debug option (2.80 KB, text/plain)
2012-03-13 05:10 EDT, Geyang Kong
no flags Details

  None (edit)
Description Geyang Kong 2012-03-13 05:09:56 EDT
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 05:10:58 EDT
Created attachment 569609 [details]
virt-viewer debuginfo in terminal with --debug option
Comment 3 Daniel Berrange 2012-04-03 11:22:34 EDT
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@redhat.com>
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@redhat.com>

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

commit 7c1414b31859eaa00421d347408d5dc6168ab12d
Author: Hans de Goede <hdegoede@redhat.com>
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@redhat.com>
Comment 4 Daniel Berrange 2012-04-03 13:36:52 EDT
Upstream fix

https://www.redhat.com/archives/virt-tools-list/2012-April/msg00019.html
Comment 5 zhe peng 2012-04-05 01:13:29 EDT
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 04:54:09 EDT
according to comment5 , move to verified.
Comment 8 Daniel Berrange 2012-04-17 06:00:53 EDT
    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 08:11:52 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.

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

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