Bug 821795 - Two display channels with the same id get connected to the server after migration
Two display channels with the same id get connected to the server after migra...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity urgent
: rc
: ---
Assigned To: Yonit Halperin
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-15 10:00 EDT by Marian Krcmarik
Modified: 2012-06-20 08:20 EDT (History)
7 users (show)

See Also:
Fixed In Version: spice-gtk-0.11-10.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 08:20:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
SRC and DST qemu logs which show that It was connected to display channel twice. (11.88 KB, text/plain)
2012-05-15 10:00 EDT, Marian Krcmarik
no flags Details
backported fix from yonit (4.96 KB, patch)
2012-05-17 17:01 EDT, Marc-Andre Lureau
no flags Details | Diff

  None (edit)
Description Marian Krcmarik 2012-05-15 10:00:09 EDT
Created attachment 584674 [details]
SRC and DST qemu logs which show that It was connected to display channel twice.

Description of problem:
After migration, two display channels with the same id get connected to the server, though only one should be connected. This leads to memory corruptions and deadlocks.
I am attaching SRC and DST qemu logs

Version-Release number of selected component (if applicable):
spice-server-0.10.1-7
spice-gtk-0.11-9
virt-viewer-0.5.2-8

How reproducible:
Always

Steps to Reproduce:
1. Connect to any Guest VM through remote-viewer using spice protocol
2. Migrate machine
  
Actual results:
After migration, VM is frozen, deadlock occurs on qemu process

Expected results:
No deadlock, memory corruption indeed

Additional info:
Comment 1 Yonit Halperin 2012-05-15 10:09:42 EDT
From the logs it looks like there are 2 problems here:

(1) MIGRATE_BEGIN wasn't sent to the client before migration starts

spice_server_migrate_connect: --> missing reds_mig_started afterwards
spice_server_migrate_start: 

(2) due to (1) SWITCH_HOST was called, and it resulted with two display channels with the same id.
Comment 2 Yonit Halperin 2012-05-15 10:28:03 EDT
(In reply to comment #1)
> From the logs it looks like there are 2 problems here:
> 
> (1) MIGRATE_BEGIN wasn't sent to the client before migration starts
> 
> spice_server_migrate_connect: --> missing reds_mig_started afterwards
> spice_server_migrate_start: 
> 
> (2) due to (1) SWITCH_HOST was called, and it resulted with two display
> channels with the same id.

In addition, such abnormality, of two identical display channels,  should have been prevented by the server.
Comment 3 Andrew Cathrow 2012-05-16 09:11:37 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > From the logs it looks like there are 2 problems here:
> > 
> > (1) MIGRATE_BEGIN wasn't sent to the client before migration starts
> > 
> > spice_server_migrate_connect: --> missing reds_mig_started afterwards
> > spice_server_migrate_start: 
> > 
> > (2) due to (1) SWITCH_HOST was called, and it resulted with two display
> > channels with the same id.
> 
> In addition, such abnormality, of two identical display channels,  should have
> been prevented by the server.

Yonit - do we need a bz on spice server too?
Comment 4 Yonit Halperin 2012-05-17 04:33:21 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > From the logs it looks like there are 2 problems here:
> > > 
> > > (1) MIGRATE_BEGIN wasn't sent to the client before migration starts
> > > 
> > > spice_server_migrate_connect: --> missing reds_mig_started afterwards
> > > spice_server_migrate_start: 
> > > 
> > > (2) due to (1) SWITCH_HOST was called, and it resulted with two display
> > > channels with the same id.
> > 
> > In addition, such abnormality, of two identical display channels,  should have
> > been prevented by the server.
> 
> Yonit - do we need a bz on spice server too?

The bug for (1) is in spice-gtk; when we have both secured port and unsecured port, the capabilities of the channels got zeroed, and the client didn't published that it supports semi-seamless migration.

Regarding (2): still need to investigate this path. I will open a corresponding spice-server bug in case it is needed. In any case, once (1) is solved, the SWITCH_HOST path shouldn't occur (only the SEMI-SEAMLESS).
Comment 6 Marc-Andre Lureau 2012-05-17 14:53:28 EDT
I filed bug 822683 for virt-viewer connecting 2 display channels
Comment 7 Marc-Andre Lureau 2012-05-17 17:01:06 EDT
Created attachment 585311 [details]
backported fix from yonit
Comment 12 Marc-Andre Lureau 2012-05-18 14:04:06 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 15 errata-xmlrpc 2012-06-20 08:20:04 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-0767.html

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