Bug 1073461
Summary: | spice plug in crashes following 2nd request to open console. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Ilanit Stein <istein> | ||||
Component: | spice-xpi | Assignee: | Marc-Andre Lureau <marcandre.lureau> | ||||
Status: | CLOSED ERRATA | QA Contact: | Ilanit Stein <istein> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.4 | CC: | cfergeau, dblechte, dron, marcandre.lureau, mkrcmari, rbalakri | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | spice-xpi-2.7-25.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-10-14 07:48:39 UTC | Type: | Bug | ||||
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
Ilanit Stein
2014-03-06 13:27:57 UTC
Created attachment 871448 [details]
/var/log/messages
/var/log/messages
I can reproduce, the plugin tries to connect unsuccessfully to the unix socket for a few seconds, and the crashes. 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); } *** Bug 1057570 has been marked as a duplicate of this bug. *** *** Bug 1066971 has been marked as a duplicate of this bug. *** Should probably be cloned to RHEL7 as well 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 |