Bug 1441120

Summary: segment fault when connecting a host with no VNC server listening
Product: Red Hat Enterprise Linux 7 Reporter: Han Han <hhan>
Component: gtk-vncAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.4CC: astepano, bsanford, djasa, dyuan, juzhou, mtessun, rduda, tpelka, tzheng, xiaodwan, xuzhang
Target Milestone: rcKeywords: Regression
Target Release: 7.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gtk-vnc-0.7.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:55:38 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
all thread backtrace none

Description Han Han 2017-04-11 09:19:44 UTC
Created attachment 1270707 [details]
all thread backtrace

Description of problem:
As subject.

Version-Release number of selected component (if applicable):
virt-viewer-5.0-2.el7.x86_64
gtk-vnc2-0.7.0-1.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
# remote-viewer vnc://www.baidu.com:5901
[1]    17633 segmentation fault (core dumped)  remote-viewer vnc://www.baidu.com:5901

Backtrace:
(gdb) bt full
#0  0x00007fb5e4cf5b59 in vnc_connection_coroutine (conn=0x55afc41d8610 [VncConnection]) at vncconnection.c:5469
        enumerator = 0x55afc403fd00
        sock = 0x0
        priv = 0x55afc41d4a70
        addr = <optimized out>
        sockaddr = 0x0
        conn_error = 0x0
        conn = 0x55afc41d8610 [VncConnection]
        priv = <optimized out>
        s = 
            {conn = 0x0, caller = 0x0, signum = 0, params = {cursor = 0x0, absPointer = 0, text = 0x0, ledstate = 0, area = {x = 0, y = 0, width = 0, height = 0}, size = {width = 0, height = 0}, pixelFormat = 0x0, authReason = 0x0, authUnsupported = 0, authCred = 0x0, authTypes = 0x0, message = 0x0}}
#1  0x00007fb5e4cf5b59 in vnc_connection_coroutine (opaque=<optimized out>) at vncconnection.c:5513
        conn = 0x55afc41d8610 [VncConnection]
        priv = <optimized out>
        s = 
            {conn = 0x0, caller = 0x0, signum = 0, params = {cursor = 0x0, absPointer = 0, text = 0x0, ledstate = 0, area = {x = 0, y = 0, width = 0, height = 0}, size = {width = 0, height = 0}, pixelFormat = 0x0, authReason = 0x0, authUnsupported = 0, authCred = 0x0, authTypes = 0x0, message = 0x0}}
#2  0x00007fb5e4cf94eb in coroutine_trampoline (cc=0x55afc41d4aa0) at coroutine_ucontext.c:55
        co = 0x55afc41d4a70
#3  0x00007fb5e14dfd40 in __start_context () at /usr/lib64/libc-2.17.so
#4  0x000055afc41d4e68 in  ()
#5  0x0000000000000000 in  ()



Actual results:
As above

Expected results:
No segment fault

Additional info:
No reproduced on
virt-viewer-2.0-12.el7.x86_64
gtk-vnc2-0.5.2-7.el7.x86_64

Comment 3 Daniel Berrangé 2017-04-12 10:55:36 UTC
Fixed upstream in

commit 283434730d0cc3a1ee8270e137d71cebe4f0e01b
Author: Daniel P. Berrange <berrange>
Date:   Tue Apr 11 11:06:28 2017 +0100

    Report a proper error message if hitting connection timeout
    
    Signed-off-by: Daniel P. Berrange <berrange>

commit a51e6a6973e9bdfcba0e52d3f9ee37686cd95db9
Author: Daniel P. Berrange <berrange>
Date:   Tue Apr 11 10:47:56 2017 +0100

    Fix crash when no error is set after connection failure
    
    Signed-off-by: Daniel P. Berrange <berrange>

Comment 5 Bill Sanford 2017-05-02 15:46:55 UTC
Verified in gtk-vnc2-0.7.0-2.el7

Comment 6 errata-xmlrpc 2017-08-01 19:55:38 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.

https://access.redhat.com/errata/RHSA-2017:2258