Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 821795

Summary: Two display channels with the same id get connected to the server after migration
Product: Red Hat Enterprise Linux 6 Reporter: Marian Krcmarik <mkrcmari>
Component: spice-gtkAssignee: Yonit Halperin <yhalperi>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, cfergeau, cpelland, dblechte, dyasny, marcandre.lureau, yhalperi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 12:20:04 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 Flags
SRC and DST qemu logs which show that It was connected to display channel twice.
none
backported fix from yonit none

Description Marian Krcmarik 2012-05-15 14:00:09 UTC
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 14:09:42 UTC
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 14:28:03 UTC
(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 13:11:37 UTC
(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 08:33:21 UTC
(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 18:53:28 UTC
I filed bug 822683 for virt-viewer connecting 2 display channels

Comment 7 Marc-Andre Lureau 2012-05-17 21:01:06 UTC
Created attachment 585311 [details]
backported fix from yonit

Comment 12 Marc-Andre Lureau 2012-05-18 18:04:06 UTC
    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 12:20:04 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-2012-0767.html