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 1152815

Summary: virt-viewer crash when connect a guest with vnc graphics and qxl video
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: virt-viewerAssignee: Virt Viewer Maint <virt-viewer-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: codong, dblechte, dyuan, fidencio, jjongsma, juzhou, mzhan, rbalakri, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-viewer-0.6.0-9.el7 Doc Type: Bug Fix
Doc Text:
Cause: The "session" property was not in the VirtViewerDisplayVnc's contructor. Consequence: virt_viewer_display_get_session() doesn't return anything useful without the property set. Fix: Set the display's session property in the constructor. Result: virt-viewer doesn't crash when connecting to a guest with VNC graphics.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:40:12 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:

Description Luyao Huang 2014-10-15 02:43:33 UTC
Description of problem:
virt-viewer crash when connect a guest with vnc and qxl

Version-Release number of selected component (if applicable):
virt-viewer-0.6.0-8.el7.x86_64
libvirt-1.2.8-3.el7.x86_64
qemu-kvm-rhev-2.1.2-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.prepare a guest with vnc graphics and qxl  video
# virsh dumpxml test3
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
.....
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

2.# virsh start test3 
Domain test3 started

3.# virt-viewer test3

(virt-viewer:15830): virt-viewer-CRITICAL **: virt_viewer_session_get_app: assertion 'VIRT_VIEWER_IS_SESSION(self)' failed
Segmentation fault (core dumped)


Actual results:
virt-viewer crashed 

Expected results:
no crash 

Additional info:

back trace:
Thread 2 (Thread 0x7fffdb6cf700 (LWP 14796)):
#0  0x00007ffff3677a8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff3bb2c94 in g_main_context_poll (priority=2147483647, n_fds=1, 
    fds=0x7fffd40010c0, timeout=-1, context=0x6da910) at gmain.c:4025
#2  g_main_context_iterate (context=0x6da910, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3726
#3  0x00007ffff3bb2fda in g_main_loop_run (loop=0x6cfc80) at gmain.c:3925
#4  0x00007ffff4d6d276 in gdbus_shared_thread_func (user_data=0x6da8e0)
    at gdbusprivate.c:273
#5  0x00007ffff3bd86d5 in g_thread_proxy (data=0x67e4a0) at gthread.c:764
#6  0x00007ffff3954df3 in start_thread (arg=0x7fffdb6cf700)
    at pthread_create.c:308
#7  0x00007ffff368205d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7ffff7f9da80 (LWP 14783)):
#0  virt_viewer_app_get_nth_window (self=self@entry=0x0, nth=0)
    at virt-viewer-app.c:781
#1  0x0000000000413595 in display_show_hint (
    display=0x86c650 [VirtViewerDisplayVnc], pspec=<optimized out>, 
---Type <return> to continue, or q <return> to quit---
    user_data=<optimized out>) at virt-viewer-app.c:911
#2  0x00007ffff3eabfd8 in g_closure_invoke (closure=0x83f4a0, 
    return_value=return_value@entry=0x0, n_param_values=2, 
    param_values=param_values@entry=0x7fffffffcfb0, 
    invocation_hint=invocation_hint@entry=0x7fffffffcf50) at gclosure.c:768
#3  0x00007ffff3ebe0ad in signal_emit_unlocked_R (node=node@entry=0x667a60, 
    detail=detail@entry=1577, instance=instance@entry=0x86c650, 
    emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0x7fffffffcfb0)
    at gsignal.c:3551
#4  0x00007ffff3ec5e32 in g_signal_emit_valist (instance=<optimized out>, 
    signal_id=<optimized out>, detail=<optimized out>, 
    var_args=var_args@entry=0x7fffffffd140) at gsignal.c:3307
#5  0x00007ffff3ec60ef in g_signal_emit (instance=<optimized out>, 
    signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3363
#6  0x00007ffff3eb0675 in g_object_dispatch_properties_changed (
    object=0x86c650 [VirtViewerDisplayVnc], n_pspecs=0, pspecs=0x6)
    at gobject.c:1053
#7  0x00007ffff3eb2d59 in g_object_notify_by_spec_internal (
    pspec=<optimized out>, object=0x86c650 [VirtViewerDisplayVnc])
    at gobject.c:1147
---Type <return> to continue, or q <return> to quit---
#8  g_object_notify (object=0x86c650 [VirtViewerDisplayVnc], 
    property_name=property_name@entry=0x427efe "show-hint") at gobject.c:1194
#9  0x0000000000411e5e in virt_viewer_app_display_added (
    session=<optimized out>, display=0x86c650 [VirtViewerDisplayVnc], 
    self=0x856140 [VirtViewer]) at virt-viewer-app.c:950
#10 0x00007ffff3eaf2db in g_cclosure_marshal_VOID__OBJECTv (closure=0x884890, 
    return_value=<optimized out>, instance=<optimized out>, 
    args=<optimized out>, marshal_data=0x0, n_params=<optimized out>, 
    param_types=0x8254e0) at gmarshal.c:1312
#11 0x00007ffff3eac207 in _g_closure_invoke_va (
    closure=closure@entry=0x884890, return_value=return_value@entry=0x0, 
    instance=instance@entry=0x7dfb00, args=args@entry=0x7fffffffd548, 
    n_params=1, param_types=0x8254e0) at gclosure.c:831
#12 0x00007ffff3ec5487 in g_signal_emit_valist (
    instance=instance@entry=0x7dfb00, signal_id=signal_id@entry=213, 
    detail=detail@entry=0, var_args=var_args@entry=0x7fffffffd548)
    at gsignal.c:3215
#13 0x00007ffff3ec6638 in g_signal_emit_by_name (
    instance=instance@entry=0x7dfb00, 
    detailed_signal=detailed_signal@entry=0x4281c2 "session-display-added")
    at gsignal.c:3403
---Type <return> to continue, or q <return> to quit---
#14 0x00000000004185ce in virt_viewer_session_add_display (
    session=0x7dfb00 [VirtViewerSessionVnc], 
    display=0x86c650 [VirtViewerDisplayVnc]) at virt-viewer-session.c:444
#15 0x00007ffff3eac207 in _g_closure_invoke_va (
    closure=closure@entry=0x87a090, return_value=return_value@entry=0x0, 
    instance=instance@entry=0x8751d0, args=args@entry=0x7fffffffd870, 
    n_params=0, param_types=0x0) at gclosure.c:831
#16 0x00007ffff3ec5487 in g_signal_emit_valist (instance=0x8751d0, 
    signal_id=<optimized out>, detail=0, 
    var_args=var_args@entry=0x7fffffffd870) at gsignal.c:3215
#17 0x00007ffff3ec60ef in g_signal_emit (instance=<optimized out>, 
    signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3363
#18 0x00007ffff74ca5b5 in on_connected () from /lib64/libgtk-vnc-2.0.so.0
#19 0x00007ffff3eac207 in _g_closure_invoke_va (
    closure=closure@entry=0x879f60, return_value=return_value@entry=0x0, 
    instance=instance@entry=0x87f2b0, args=args@entry=0x7fffffffdb30, 
    n_params=0, param_types=0x0) at gclosure.c:831
#20 0x00007ffff3ec5487 in g_signal_emit_valist (instance=0x87f2b0, 
    signal_id=<optimized out>, detail=0, 
    var_args=var_args@entry=0x7fffffffdb30) at gsignal.c:3215
#21 0x00007ffff3ec60ef in g_signal_emit (instance=<optimized out>, 
---Type <return> to continue, or q <return> to quit---
    signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3363
#22 0x00007ffff72ad735 in do_vnc_connection_emit_main_context ()
   from /lib64/libgvnc-1.0.so.0
#23 0x00007ffff3bb29ba in g_main_dispatch (context=0x68bab0) at gmain.c:3061
#24 g_main_context_dispatch (context=context@entry=0x68bab0) at gmain.c:3660
#25 0x00007ffff3bb2d08 in g_main_context_iterate (context=0x68bab0, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at gmain.c:3731
#26 0x00007ffff3bb2fda in g_main_loop_run (loop=0x8d3e40) at gmain.c:3925
#27 0x00007ffff595e12d in gtk_main () from /lib64/libgtk-3.so.0
#28 0x000000000040fc1a in main (argc=1, argv=0x7fffffffe048)
    at virt-viewer-main.c:116

Comment 2 Fabiano FidĂȘncio 2014-10-15 06:47:28 UTC
It's already fixed upstream by the commit:
804564e2460011dfbf3f195aa8931b15d98f8824

Comment 4 CongDong 2014-10-24 05:28:40 UTC
Can reproduce with virt-viewer-0.6.0-8.el7.x86_64

Verify with virt-viewer-0.6.0-10.el7.x86_64

Steps:
1.prepare a guest with vnc graphics and qxl  video
# virsh dumpxml test3
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
.....
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

2.# virsh start test3 
Domain test3 started

3.# virt-viewer test3

Result:
virt-viewer can open the guest successfully. No core dump.

Comment 6 errata-xmlrpc 2015-03-05 13:40:12 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://rhn.redhat.com/errata/RHBA-2015-0295.html