RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1301863 - virt-manager crashes after clicking the login button
Summary: virt-manager crashes after clicking the login button
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: spice-gtk
Version: 7.3
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-26 08:38 UTC by Xiaodai Wang
Modified: 2016-11-04 01:14 UTC (History)
13 users (show)

Fixed In Version: spice-gtk-0.26-6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 01:14:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virt-manager --debug log (18.84 KB, text/plain)
2016-01-26 08:39 UTC, Xiaodai Wang
no flags Details
abrt log (164.26 KB, text/plain)
2016-01-26 08:39 UTC, Xiaodai Wang
no flags Details
SPICE_DEBUG=1 virt-manager --debug log (101.23 KB, text/plain)
2016-01-27 12:49 UTC, Xiaodai Wang
no flags Details
gdb backtrace log (99.19 KB, text/plain)
2016-01-28 08:42 UTC, Xiaodai Wang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2229 0 normal SHIPPED_LIVE virt-viewer, libgovirt, spice-gtk, and usbredir bug fix and enhancement update 2016-11-03 13:26:58 UTC

Description Xiaodai Wang 2016-01-26 08:38:29 UTC
Description of problem:
virt-manager crashes after clicking the loging button

Version-Release number of selected component (if applicable):
virt-manager-1.2.1-8.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. launch "virt-manager"
2. Open hardware details and click "display spice" device and Set a password for it.
3. Start the guest.
4. Check the "Save this password in your keyring" option and type the password.
5. Close the vm window and double click the vm to open the vm window again, check the password is remembered but the "Save this password in your keyring" option is not checked.
6. Clear the password string and click login, nothing happenes.
7. Close the vm window and open it again, type the correct password and then click login button.
8. Repeat step6 and step7 several times, after about 5 times, the virt-manager crashes. 



Actual results:
bug1:
After step 5, the "Save this password in your keyring" option is unchecked unexpectedly.
bug2:
After step8, virt-manager crashes.


Expected results:
After step5, the "Save this password in your keyring" option should still be checked. 
After step8, virt-manager should not crash.

Additional info:
Please see virt-manager --debug log and abrt log in attachments.

Comment 1 Xiaodai Wang 2016-01-26 08:39:14 UTC
Created attachment 1118386 [details]
virt-manager --debug log

Comment 2 Xiaodai Wang 2016-01-26 08:39:50 UTC
Created attachment 1118387 [details]
abrt log

Comment 4 Pavel Hrdina 2016-01-26 11:45:11 UTC
Hi, so at first, please file one bug for each issue, never add more than one issue into a single bug.

The first issue is probably virt-manager bug and I'll look into it.

The second issue is a crash where coredump is produced.  Virt-manager itself cannot crash as it's pure python code, there could be only unhandled exception related to virt-manager code.  If coredump is produced by running virt-manager, the package to blame is python or any other module used by virt-manager, which can be deducted from the backtrace.  In this case it's probably python or spice.

Comment 5 Xiaodai Wang 2016-01-27 02:34:09 UTC
(In reply to Pavel Hrdina from comment #4)
> Hi, so at first, please file one bug for each issue, never add more than one
> issue into a single bug.
> 
> The first issue is probably virt-manager bug and I'll look into it.

I filed bug 1302175 for the first issue.

Bug 1302175 - The "Save this password in your keyring" option is unchecked unexpectedly

> 
> The second issue is a crash where coredump is produced.  Virt-manager itself
> cannot crash as it's pure python code, there could be only unhandled
> exception related to virt-manager code.  If coredump is produced by running
> virt-manager, the package to blame is python or any other module used by
> virt-manager, which can be deducted from the backtrace.  In this case it's
> probably python or spice.

Comment 6 Pavel Hrdina 2016-01-27 11:39:19 UTC
Based on comment 4 moving to spice-gtk for further investigation.

Comment 7 Christophe Fergeau 2016-01-27 11:49:30 UTC
These uncaught exceptions in the log do not look good:
[Tue, 26 Jan 2016 13:53:57 virt-manager 5167] DEBUG (cli:241) Uncaught exception:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 691, in _viewer_add_display
    self._refresh_resizeguest_from_settings()
  File "/usr/share/virt-manager/virtManager/console.py", line 351, in _refresh_resizeguest_from_settings
    elif not self._viewer.console_has_agent():
  File "/usr/share/virt-manager/virtManager/viewers.py", line 249, in console_has_agent
    return self._has_agent()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 658, in _has_agent
    return self._main_channel.get_property("agent-connected")
TypeError: object at 0x3893d70 of type MainChannel is not initialized

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 691, in _viewer_add_display
    self._refresh_resizeguest_from_settings()
  File "/usr/share/virt-manager/virtManager/console.py", line 351, in _refresh_resizeguest_from_settings
    elif not self._viewer.console_has_agent():
  File "/usr/share/virt-manager/virtManager/viewers.py", line 249, in console_has_agent
    return self._has_agent()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 658, in _has_agent
    return self._main_channel.get_property("agent-connected")
TypeError: object at 0x3893d70 of type MainChannel is not initialized


If virt-manager is misusing spice-gtk C API (for example by passing it uninitialized memory), then it may crash.
I don't know how to get a C or python backtrace for the code which caused the segmentation fault out of the abrt log. Could you add one of these to the bug?

Comment 8 Pavel Hrdina 2016-01-27 11:55:16 UTC
The thing is, that virt-manager uses only python code, which means it uses python binding of spice-gtk C API.  There is no such thing like uninitialized memory in python.  Yes, we should probably do a better work in handling exceptions and I'll look into it, still, it shouldn't crash.

Comment 9 Christophe Fergeau 2016-01-27 12:03:58 UTC
If you misuse spice-gtk API from Python, I'm fairly sure you can get it to crash. This bug has nothing to rule that out, and has some worrying python assertions which could hint that. At the same time, it's missing a C backtrace, or anything that could give us info about what's going on on the spice-gtk side (SPICE_DEBUG=1 virt-manager -d might help too)

Comment 10 Xiaodai Wang 2016-01-27 12:49:43 UTC
Created attachment 1118774 [details]
SPICE_DEBUG=1 virt-manager --debug log

Comment 11 Christophe Fergeau 2016-01-27 16:51:13 UTC
Could you extract a backtrace from the coredump you have, or attach gdb to the running running virt-manager process, trigger a crash and get the backtrace from there?

Comment 12 Xiaodai Wang 2016-01-28 08:42:27 UTC
Created attachment 1119072 [details]
gdb backtrace log

Comment 13 Christophe Fergeau 2016-01-28 09:59:56 UTC
The C backtrace at the time of the crash matches the python backtrace mentioned in comment #7:


/usr/share/virt-manager/virtManager/viewers.py, line 658, in _has_agent
/usr/share/virt-manager/virtManager/viewers.py, line 249, in console_has_agent
/usr/share/virt-manager/virtManager/console.py, line 351, in _refresh_resizeguest_from_settings
/usr/share/virt-manager/virtManager/console.py, line 691, in _viewer_add_display

Comment 14 Pavel Grunt 2016-03-04 14:24:11 UTC
fixed upstream by commits:
 ff25f3eacb1776a754147cd57c76882392382030
 6b475802d78f2a4f2110738cb360b496dc85336c

Comment 20 errata-xmlrpc 2016-11-04 01:14:21 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://rhn.redhat.com/errata/RHBA-2016-2229.html


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