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 1073461 - spice plug in crashes following 2nd request to open console.
Summary: spice plug in crashes following 2nd request to open console.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-xpi
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: Ilanit Stein
URL:
Whiteboard:
: 1057570 1066971 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-06 13:27 UTC by Ilanit Stein
Modified: 2014-10-14 07:48 UTC (History)
6 users (show)

Fixed In Version: spice-xpi-2.7-25.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:48:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
/var/log/messages (188.11 KB, application/x-gzip)
2014-03-06 13:36 UTC, Ilanit Stein
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1560 0 normal SHIPPED_LIVE spice-xpi bug fix update 2014-10-14 01:21:18 UTC

Description Ilanit Stein 2014-03-06 13:27:57 UTC
Description of problem:
Due to a bug in rhevm webadmin, bug 1073440, it is possible to open a second spice console. by doing so the spice plugin crushes. 

Version-Release number of selected component (if applicable):
Was tested on rhevm av2
spice-xpi version: spice-xpi-2.7-22.el6.x86_64
rhel version: Red Hat Enterprise Linux Workstation release 6.4 (Santiago)
firefox: 17.0.10

In firefox top bar, this message appear:
The spice firefox plugin has crushed to learn more (link):

Link :
https://support.mozilla.org/en-US/kb/send-plugin-crash-reports-help-improve-firefox?redirectlocale=en-US&as=u&redirectslug=Plugin+crash+reports&utm_source=inproduct

How reproducible:
100%

Expected results:
There shouldn't be a crash. Even after bug 1073440, will be fixed, we need to make sure the spice-xpi shouldn't crush.

Additional info:
It can be overcome by reload the page.

Comment 1 Ilanit Stein 2014-03-06 13:36:12 UTC
Created attachment 871448 [details]
/var/log/messages

/var/log/messages

Comment 3 Marc-Andre Lureau 2014-03-07 13:24:53 UTC
I can reproduce, the plugin tries to connect unsuccessfully to the unix socket for a few seconds, and the crashes.

Comment 4 Marc-Andre Lureau 2014-03-07 13:52:50 UTC
firefox by default will kill the plugin after 45s of hanging.

By default, the xpi plugin will take up to 55s... we can lower this to 10s imho, with 1 tries every 10s.. With this change, it no longer crashes.

--- a/SpiceXPI/src/plugin/controller.cpp
+++ b/SpiceXPI/src/plugin/controller.cpp
@@ -124,14 +124,13 @@ int SpiceController::Connect()
 int SpiceController::Connect(const int nRetries)
 {
     int rc = -1;
-    int sleep_time = 0;
+    int sleep_time = 1;
 
     // try to connect for specified count
     for (int i = 0; rc != 0 && i < nRetries; ++i)
     {
         rc = Connect();
         sleep(sleep_time);
-        ++sleep_time;
     }
 
     return rc;

Secondly, if the pipe is already connected, connect() returns -1 with EISCONN errno.

So this would fail immediately:

--- a/SpiceXPI/src/plugin/controller.cpp
+++ b/SpiceXPI/src/plugin/controller.cpp
@@ -110,6 +110,8 @@ int SpiceController::Connect()
     int rc = connect(m_client_socket, (struct sockaddr *) &remote, strlen(remote.sun_path) + sizeof(remote.sun_family));
     if (rc == -1)
     {
+       if (errno == EISCONN)
+            return 1;
         QErrorHandler(errno, "connect error");
         LOG_DEBUG("Connect Error");
     }
@@ -130,6 +132,8 @@ int SpiceController::Connect(const int nRetries)
     for (int i = 0; rc != 0 && i < nRetries; ++i)
     {
         rc = Connect();
+       if (rc == 1)
+            break;
         sleep(sleep_time);
     }

Comment 6 Michal Skrivanek 2014-03-09 12:55:06 UTC
*** Bug 1057570 has been marked as a duplicate of this bug. ***

Comment 7 Marc-Andre Lureau 2014-03-13 11:44:57 UTC
*** Bug 1066971 has been marked as a duplicate of this bug. ***

Comment 8 Christophe Fergeau 2014-03-18 17:18:57 UTC
Should probably be cloned to RHEL7 as well

Comment 11 errata-xmlrpc 2014-10-14 07:48:39 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-2014-1560.html


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