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 882110 - Remote-viewer shows no error if connect to a spice port through vnc protocol
Summary: Remote-viewer shows no error if connect to a spice port through vnc protocol
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gtk-vnc
Version: 6.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-30 06:50 UTC by tingting zheng
Modified: 2017-02-08 14:43 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 921330 (view as bug list)
Environment:
Last Closed: 2017-02-08 14:43:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description tingting zheng 2012-11-30 06:50:22 UTC
Description of problem:
Remote-viewer shows no error if connect to a spice port through vnc protocol

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-16.el6.x86_64
libvirt-0.10.2-10.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a spice guest,set it port as 5900.
# virsh dumpxml test
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>


2. Use remote-viewer vnc instead spice to connect the guest,the window just pop out without error showed.
# remote-viewer vnc://localhost:5900 --debug
connect : Connection refused
** (remote-viewer:14182): DEBUG: Insert window 0 0x13f5890
** (remote-viewer:14182): DEBUG: fullscreen display 0: 0
** (remote-viewer:14182): DEBUG: fullscreen display 0: 0
** (remote-viewer:14182): DEBUG: Opening display to vnc://localhost:5900
** (remote-viewer:14182): DEBUG: Guest vnc://localhost:5900 has a vnc display
** (remote-viewer:14182): DEBUG: After open connection callback fd=-1
** (remote-viewer:14182): DEBUG: Opening connection to display at vnc://localhost:5900
** (remote-viewer:14182): DEBUG: notebook show status 0x13f60a0
** (remote-viewer:14182): DEBUG: notebook show status 0x13f60a0
** (remote-viewer:14182): DEBUG: notebook show display 0x13f60a0
** (remote-viewer:14182): DEBUG: Display size request 100x100 (desktop 100x100)
** (remote-viewer:14182): DEBUG: Allocated 400x375
** (remote-viewer:14182): DEBUG: Child allocate 375x375
** (remote-viewer:14182): DEBUG: Display size request 50x50 (desktop 100x100)
** (remote-viewer:14182): DEBUG: Allocated 400x375
** (remote-viewer:14182): DEBUG: Child allocate 375x375
** (remote-viewer:14182): DEBUG: Window closed
** (remote-viewer:14182): DEBUG: close vnc=0x13de760
** (remote-viewer:14182): DEBUG: Disconnected
** (remote-viewer:14182): DEBUG: close vnc=0x138b880
** (remote-viewer:14182): DEBUG: notebook show status 0x13f60a0
** (remote-viewer:14182): DEBUG: Guest vnc://localhost:5900 display has disconnected, shutting down
** (remote-viewer:14182): DEBUG: Disposing window 0x13f5890

** (remote-viewer:14182): DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0

3.If use remote-viewer vnc to connect a guest with port which doesn't exist even for spice,there is error:
eg:
# remote-viewer vnc://localhost:5909 
Window pop out,and error shows as:Unable to connect to the graphic server vnc://localhost:5909


Actual results:
As step2 shows.

Expected results:
There is error messages shows:Unable to connect to the graphic server vnc://localhost:5900

Additional info: 
1.Remote-viewer shows error if connect to a vnc port through spice protocol,error showed as:Unable to connect to the graphic server spice://$ip:$port

Comment 1 Jonathon Jongsma 2013-11-18 21:35:31 UTC
It appears that this is caused by the fact that upon connecting to the server port, the vnc client tries to read 12 bytes from the server to determine the vnc server version (see vnc_connection_initialize()).  The spice server never sends anything, because it's waiting for the client to send a link message.  So remote-viewer sits there waiting forever.  Perhaps there should be a timeout for the initial connection, after which point we give up and indicate an error.

Comment 3 Fabiano Fidêncio 2014-09-16 14:08:24 UTC
As pointed by Jonathon, the gtk-vnc waits for the 12 bytes from the server to determine the server version.
Looking deeply in the code we can see that vnc_connection_read_wire() tries to connect to the socket but receives no data ("Error receiving data: Resource temporarily unavailable") what will cause a call to g_io_wait() and then coroutine_yield() where gtk-vnc waits forever.

I don't see it as a remote-viewer bug, maybe a gtk-vnc bug, but most likely not a bug, at least for me.

I'm reassigning  it to gtk-vnc for now, then the maintainer can decide if it can be considered as a bug or not.

Comment 4 Daniel Berrangé 2017-02-08 14:43:14 UTC
While we have come up with a workaround to avoid this problem, it involves changes to both the spice server and gtk-vnc. This is a low impact bug so not worth the effort of trying to co-ordinate backports for both components in RHEL-6. The fixes will be applied to RHEL-7 only.


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