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 1713600

Summary: remote-viewer core dumped sometimes when doing live migration with guest having spice_tls setting
Product: Red Hat Enterprise Linux 7 Reporter: yafu <yafu>
Component: virt-viewerAssignee: Victor Toso <victortoso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.7CC: berrange, fjin, juzhou, mzhan, tzheng, victortoso, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-viewer-5.0-15.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 20:09:14 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
remote-viewer log none

Description yafu 2019-05-24 08:31:52 UTC
Description of problem:
remote-viewer core dumped sometimes when doing live migration with guest having spice_tls setting


Version-Release number of selected component (if applicable):
virt-viewer-5.0-14.el7.x86_64
spice-gtk3-0.35-4.el7.x86_64
spice-server-0.14.0-7.el7.x86_64
spice-glib-0.35-4.el7.x86_64
gtk3-3.22.30-3.el7.x86_64
glib2-2.56.1-2.el7.x86_64
libvirt-4.5.0-18.el7.x86_64
qemu-kvm-rhev-2.12.0-29.el7.x86_64


How reproducible:
50%


Steps to Reproduce:
1. Prepare migration env

2. Start a vm with spice graphic on src host

3. Connect to vm by remote-viewer:
$ remote-viewer spice://dhcp-66-71-70.eng.nay.redhat.com/?port=5901\&tls-port=5902 --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=dhcp-66-71-70.eng.nay.redhat.com" --spice-ca-file='/etc/pki/qemu/ca-cert.pem' --spice-debug --debug 2>&1 >remote-viewer.log

4. Migrate vm to dest host:
# virsh migrate rhel7.6 qemu+ssh://10.66.4.134/system --live --verbose --undefinesource --persistent --p2p

5. Migrate vm back to src host, then repeat for several times, remote-viewer will crash:
======= Backtrace: =========
/lib64/libc.so.6(+0x81679)[0x7f92a1339679]
/lib64/libglib-2.0.so.0(g_free+0xe)[0x7f92a18f379e]
/lib64/libspice-client-glib-2.0.so.8(+0x22c11)[0x7f92a2c60c11]
/lib64/libspice-client-glib-2.0.so.8(+0x26e04)[0x7f92a2c64e04]
/lib64/libspice-client-glib-2.0.so.8(+0x26f84)[0x7f92a2c64f84]
/lib64/libspice-client-glib-2.0.so.8(+0x28dde)[0x7f92a2c66dde]
/lib64/libspice-client-glib-2.0.so.8(+0x56c9b)[0x7f92a2c94c9b]
/lib64/libspice-client-glib-2.0.so.8(+0x56ad9)[0x7f92a2c94ad9]
/lib64/libc.so.6(+0x48140)[0x7f92a1300140]
======= Memory map: ========
556f3fd7c000-556f3fdce000 r-xp 00000000 fd:00 19664444                   /usr/bin/remote-viewer
556f3ffce000-556f3ffd0000 r--p 00052000 fd:00 19664444                   /usr/bin/remote-viewer
556f3ffd0000-556f3ffd1000 rw-p 00054000 fd:00 19664444                   /usr/bin/remote-viewer
556f407d5000-556f41b99000 rw-p 00000000 00:00 0                          [heap]
7f925c000000-7f9264000000 rw-p 00000000 00:00 0 
7f9264000000-7f9264022000 rw-p 00000000 00:00 0 
7f9264022000-7f9268000000 ---p 00000000 00:00 0 
7f92687ff000-7f92697ff000 rw-p 00000000 00:00 0 
7f92697ff000-7f9269800000 ---p 00000000 00:00 0 
7f9269800000-7f926a000000 rw-p 00000000 00:00 0 
7f926a000000-7f926c000000 rw-s 00000000 00:04 4718610                    /SYSV00000000 (deleted)
7f9270000000-7f9270022000 rw-p 00000000 00:00 0 
7f9270022000-7f9274000000 ---p 00000000 00:00 0 
7f9278000000-7f9278021000 rw-p 00000000 00:00 0 
7f9278021000-7f927c000000 ---p 00000000 00:00 0 
7f927c000000-7f927c022000 rw-p 00000000 00:00 0 
7f927c022000-7f9280000000 ---p 00000000 00:00 0 
7f9280315000-7f9280335000 r-xp 00000000 fd:00 36578459                   /usr/lib64/libnssdbm3.so
7f9280335000-7f9280534000 ---p 00020000 fd:00 36578459                   /usr/lib64/libnssdbm3.so
7f9280534000-7f9280535000 r--p 0001f000 fd:00 36578459                   /usr/lib64/libnssdbm3.so
7f9280535000-7f9280536000 rw-p 00020000 fd:00 36578459                   /usr/lib64/libnssdbm3.so
7f9280536000-7f92805b9000 r-xp 00000000 fd:00 36578456                   /usr/lib64/libfreeblpriv3.so
7f92805b9000-7f92807b8000 ---p 00083000 fd:00 36578456                   /usr/lib64/libfreeblpriv3.so
7f92807b8000-7f92807ba000 r--p 00082000 fd:00 36578456                   /usr/lib64/libfreeblpriv3.so
7f92807ba000-7f92807bb000 rw-p 00084000 fd:00 36578456                   /usr/lib64/libfreeblpriv3.so
7f92807bb000-7f92807bf000 rw-p 00000000 00:00 0 
7f9280c82000-7f9281c82000 rw-p 00000000 00:00 0 
7f9281c82000-7f9281cbf000 r-xp 00000000 fd:00 36578461                   /usr/lib64/libsoftokn3.so
7f9281cbf000-7f9281ebe000 ---p 0003d000 fd:00 36578461                   /usr/lib64/libsoftokn3.so
7f9281ebe000-7f9281ebf000 r--p 0003c000 fd:00 36578461                   /usr/lib64/libsoftokn3.so
7f9281ebf000-7f9281ec0000 rw-p 0003d000 fd:00 36578461                   /usr/lib64/libsoftokn3.so
7f9281ec0000-7f9281ec1000 ---p 00000000 00:00 0 
7f9281ec1000-7f92826c1000 rw-p 00000000 00:00 0 
7f92826c1000-7f92826cd000 r-xp 00000000 fd:00 678074                     /usr/lib64/gio/modules/libdconfsettings.so
7f92826cd000-7f92828cc000 ---p 0000c000 fd:00 678074                     /usr/lib64/gio/modules/libdconfsettings.so
7f92828cc000-7f92828cd000 r--p 0000b000 fd:00 678074                     /usr/lib64/gio/modules/libdconfsettings.so
7f92828cd000-7f92828ce000 rw-p 0000c000 fd:00 678074                     /usr/lib64/gio/modules/libdconfsettings.so
7f92828ce000-7f92829b7000 r-xp 00000000 fd:00 33647009                   /usr/lib64/libstdc++.so.6.0.19
7f92829b7000-7f9282bb6000 ---p 000e9000 fd:00 33647009                   /usr/lib64/libstdc++.so.6.0.19
7f9282bb6000-7f9282bbe000 r--p 000e8000 fd:00 33647009                   /usr/lib64/libstdc++.so.6.0.19
7f9282bbe000-7f9282bc0000 rw-p 000f0000 fd:00 33647009                   /usr/lib64/libstdc++.so.6.0.19
7f9282bc0000-7f9282bd5000 rw-p 00000000 00:00 0 
7f9282bd5000-7f9282bdc000 r-xp 00000000 fd:00 34702276                   /usr/lib64/libmodman.so.1.0.0
7f9282bdc000-7f9282ddb000 ---p 00007000 fd:00 34702276                   /usr/lib64/libmodman.so.1.0.0
7f9282ddb000-7f9282ddc000 r--p 00006000 fd:00 34702276                   /usr/lib64/libmodman.so.1.0.0
7f9282ddc000-7f9282ddd000 rw-p 00007000 fd:00 34702276                   /usr/lib64/libmodman.so.1.0.0
7f9282ddd000-7f9282dfd000 r-xp 00000000 fd:00 34702279                   /usr/lib64/libproxy.so.1.0.0
7f9282dfd000-7f9282ffc000 ---p 00020000 fd:00 34702279                   /usr/lib64/libproxy.so.1.0.0
7f9282ffc000-7f9282ffd000 r--p 0001f000 fd:00 34702279                   /usr/lib64/libproxy.so.1.0.0
7f9282ffd000-7f9282ffe000 rw-p 00020000 fd:00 34702279                   /usr/lib64/libproxy.so.1.0.0
7f9282ffe000-7f9282fff000 ---p 00000000 00:00 0 
7f9282fff000-7f92837ff000 rw-p 00000000 00:00 0 
7f92837ff000-7f9283800000 ---p 00000000 00:00 0 
7f9283800000-7f9284000000 rw-p 00000000 00:00 0 
7f9284000000-7f9284021000 rw-p 00000000 00:00 0 
7f9284021000-7f9288000000 ---p 00000000 00:00 0 
7f9288148000-7f928814c000 r-xp 00000000 fd:00 1265386                    /usr/lib64/gio/modules/libgiognomeproxy.so
7f928814c000-7f928834b000 ---p 00004000 fd:00 1265386                    /usr/lib64/gio/modules/libgiognomeproxy.so
7f928834b000-7f928834c000 r--p 00003000 fd:00 1265386                    /usr/lib64/gio/modules/libgiognomeproxy.so
7f928834c000-7f928834d000 rw-p 00004000 fd:00 1265386                    /usr/lib64/gio/modules/libgiognomeproxy.so
7f928834d000-7f928836a000 r-xp 00000000 fd:00 1265387                    /usr/lib64/gio/modules/libgiognutls.so
7f928836a000-7f928856a000 ---p 0001d000 fd:00 1265387                    /usr/lib64/gio/modules/libgiognutls.so
7f928856a000-7f928856b000 r--p 0001d000 fd:00 1265387                    /usr/lib64/gio/modules/libgiognutls.so
7f928856b000-7f928856c000 rw-p 0001e000 fd:00 1265387                    /usr/lib64/gio/modules/libgiognutls.so
7f928856c000-7f9288575000 r-xp 00000000 fd:00 33651538                   /usr/lib64/libltdl.so.7.3.0
7f9288575000-7f9288774000 ---p 00009000 fd:00 33651538                   /usr/lib64/libltdl.so.7.3.0
7f9288774000-7f9288775000 r--p 00008000 fd:00 33651538                   /usr/lib64/libltdl.so.7.3.0
7f9288775000-7f9288776000 rw-p 00009000 fd:00 33651538                   /usr/lib64/libltdl.so.7.3.0
7f9288776000-7f928878c000 r-xp 00000000 fd:00 33673107                   /usr/lib64/libtdb.so.1.3.16
7f928878c000-7f928898b000 ---p 00016000 fd:00 33673107                   /usr/lib64/libtdb.so.1.3.16
7f928898b000-7f928898c000 r--p 00015000 fd:00 33673107                   /usr/lib64/libtdb.so.1.3.16Aborted (core dumped)


Actual results:
Remote-viewer core dumped during live migration


Expected results:
No core dump

Additional info:
Backtrace:
(gdb) t a a bt

Thread 6 (Thread 0x7f928aa2d700 (LWP 2262)):
#0  0x00007f92a13abbed in poll () at /lib64/libc.so.6
#1  0x00007f92a18ee32c in g_main_context_iterate (priority=2147483647, n_fds=2, fds=0x7f92840008c0, timeout=-1, context=0x556f40812940) at gmain.c:4202
#2  0x00007f92a18ee32c in g_main_context_iterate (context=context@entry=0x556f40812940, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3896
#3  0x00007f92a18ee45c in g_main_context_iteration (context=0x556f40812940, may_block=may_block@entry=1) at gmain.c:3962
#4  0x00007f92a18ee499 in glib_worker_main (data=<optimized out>) at gmain.c:5771
#5  0x00007f92a19154f0 in g_thread_proxy (data=0x556f40811050) at gthread.c:784
#6  0x00007f92a168de65 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f92a13b688d in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f928a22c700 (LWP 2263)):
#0  0x00007f92a13abbed in poll () at /lib64/libc.so.6
#1  0x00007f92a18ee32c in g_main_context_iterate (priority=2147483647, n_fds=3, fds=0x7f927c0010c0, timeout=-1, context=0x556f4080ce00) at gmain.c:4202
#2  0x00007f92a18ee32c in g_main_context_iterate (context=0x556f4080ce00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3896
#3  0x00007f92a18ee67a in g_main_loop_run (loop=0x556f407fc710) at gmain.c:4097
#4  0x00007f92a1ed79a6 in gdbus_shared_thread_func (user_data=0x556f4080cdd0) at gdbusprivate.c:275
#5  0x00007f92a19154f0 in g_thread_proxy (data=0x556f408110f0) at gthread.c:784
#6  0x00007f92a168de65 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f92a13b688d in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f92826c0700 (LWP 2266)):
#0  0x00007f92a13abbed in poll () at /lib64/libc.so.6
#1  0x00007f92a18ee32c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f92700010c0, timeout=-1, context=0x556f4181be40) at gmain.c:4202
#2  0x00007f92a18ee32c in g_main_context_iterate (context=context@entry=0x556f4181be40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3896
#3  0x00007f92a18ee45c in g_main_context_iteration (context=context@entry=0x556f4181be40, may_block=may_block@entry=1) at gmain.c:3962
#4  0x00007f92826c8d6d in dconf_gdbus_worker_thread (user_data=0x556f4181be40) at ../gdbus/dconf-gdbus-thread.c:82
#5  0x00007f92a19154f0 in g_thread_proxy (data=0x556f4109ba30) at gthread.c:784
#6  0x00007f92a168de65 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f92a13b688d in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f9283fff700 (LWP 2264)):
#0  0x00007f92a13abbed in poll () at /lib64/libc.so.6
#1  0x00007f929d7f6a7c in linux_udev_event_thread_main (__timeout=-1, __nfds=2, __fds=0x7f9283ffeba0) at /usr/include/bits/poll2.h:46
#2  0x00007f929d7f6a7c in linux_udev_event_thread_main (arg=<optimized out>) at os/linux_udev.c:175
#3  0x00007f92a168de65 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f92a13b688d in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f92837fe700 (LWP 2265)):
#0  0x00007f92a13abbed in poll () at /lib64/libc.so.6
#1  0x00007f929d7f07a0 in handle_events (__timeout=60000, __nfds=2, __fds=0x7f92780008c0) at /usr/include/bits/poll2.h:46
#2  0x00007f929d7f07a0 in handle_events (ctx=ctx@entry=0x556f40950400, tv=tv@entry=0x7f92837fdb30) at io.c:2151
#3  0x00007f929d7f1689 in libusb_handle_events_timeout_completed (tv=0x7f92837fdb30, ctx=0x556f40950400) at io.c:2084
#4  0x00007f929d7f1689 in libusb_handle_events_timeout_completed (ctx=0x556f40950400, tv=tv@entry=0x7f92837fdb80, completed=completed@entry=0x0) at io.c:2345
#5  0x00007f929d7f176f in libusb_handle_events (ctx=<optimized out>) at io.c:2421
#6  0x00007f92a2c80151 in spice_usb_device_manager_usb_ev_thread (user_data=<optimized out>) at usb-device-manager.c:1175
#7  0x00007f92a19154f0 in g_thread_proxy (data=0x556f409c2000) at gthread.c:784
#8  0x00007f92a168de65 in start_thread () at /lib64/libpthread.so.0
#9  0x00007f92a13b688d in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f92a5868a80 (LWP 2261)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007f92a12ee337 in raise () at /lib64/libc.so.6
#1  0x00007f92a12efa28 in abort () at /lib64/libc.so.6
#2  0x00007f92a1330e87 in __libc_message () at /lib64/libc.so.6
#3  0x00007f92a1339679 in _int_free () at /lib64/libc.so.6
#4  0x00007f92a18f379e in g_free (mem=0x556f40a81fe0) at gmem.c:194

#5  0x00007f92a2c60c11 in spice_session_set_name (session=0x556f408366a0 [SpiceSession], name=0x556f412b3364 "yafu-77-4") at spice-session.c:2575
#6  0x00007f92a2c64e04 in spice_channel_recv_msg (channel=0x556f40f293c0 [SpiceMainChannel], msg_handler=0x7f92a2c72b00 <spice_main_handle_msg>, data=0x0) at spice-channel.c:2102
#7  0x00007f92a2c64f84 in spice_channel_iterate_read (channel=0x556f40f293c0 [SpiceMainChannel]) at spice-channel.c:2340
#8  0x00007f92a2c66dde in spice_channel_coroutine (channel=0x556f40f293c0 [SpiceMainChannel]) at spice-channel.c:2378
#9  0x00007f92a2c66dde in spice_channel_coroutine (data=<optimized out>) at spice-channel.c:2666
#10 0x00007f92a2c94c9b in coroutine_trampoline (cc=0x556f40f28a70) at coroutine_ucontext.c:63
#11 0x00007f92a2c94ad9 in continuation_trampoline (i0=<optimized out>, i1=<optimized out>) at continuation.c:55
#12 0x00007f92a1300140 in __start_context () at /lib64/libc.so.6
#13 0x0000556f40f28e38 in  ()
#14 0x0000000000000000 in  ()

Comment 2 yafu 2019-05-27 06:46:34 UTC
Created attachment 1573767 [details]
remote-viewer log

Comment 3 Fangge Jin 2019-05-29 10:13:46 UTC
I met the remote-viewer coredump issue during live migration(for both plaintext and tls connection) frequently recently, my backtrace is as below:

(gdb) t a a bt

Thread 9 (Thread 0x7f8ff7dec700 (LWP 6021)):
#0  0x00007f903658f1c9 in syscall () from /lib64/libc.so.6
#1  0x00007f9036b110de in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2  0x00007f9036a9fc21 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3  0x00007f9036af3e62 in g_thread_pool_thread_proxy () from /lib64/libglib-2.0.so.0
#4  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f901cf6f700 (LWP 19723)):
#0  0x00007f903658a20d in poll () from /lib64/libc.so.6
#1  0x00007f90329d17a0 in poll (__timeout=60000, __nfds=2, __fds=0x7f90140008c0) at /usr/include/bits/poll2.h:46
#2  handle_events (ctx=ctx@entry=0x557e73c78460, tv=tv@entry=0x7f901cf6eb30) at io.c:2151
#3  0x00007f90329d2689 in handle_events (tv=0x7f901cf6eb30, ctx=0x557e73c78460) at io.c:2084
#4  libusb_handle_events_timeout_completed (ctx=0x557e73c78460, tv=tv@entry=0x7f901cf6eb80, 
    completed=completed@entry=0x0) at io.c:2345
#5  0x00007f90329d276f in libusb_handle_events (ctx=<optimized out>) at io.c:2421
#6  0x00007f9037e5e151 in spice_usb_device_manager_usb_ev_thread (user_data=<optimized out>)
    at usb-device-manager.c:1175
#7  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#8  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f901f431700 (LWP 19709)):
#0  0x00007f903658a20d in poll () from /lib64/libc.so.6
#1  0x00007f9036acc32c in g_main_context_iterate.isra.19 () from /lib64/libglib-2.0.so.0
#2  0x00007f9036acc67a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#3  0x00007f90370b59a6 in gdbus_shared_thread_func () from /lib64/libgio-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#4  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f901fc32700 (LWP 19708)):
#0  0x00007f903658a20d in poll () from /lib64/libc.so.6
#1  0x00007f9036acc32c in g_main_context_iterate.isra.19 () from /lib64/libglib-2.0.so.0
#2  0x00007f9036acc45c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f9036acc499 in glib_worker_main () from /lib64/libglib-2.0.so.0
#4  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f901d770700 (LWP 19722)):
#0  0x00007f903658a20d in poll () from /lib64/libc.so.6
#1  0x00007f90329d7a7c in poll (__timeout=-1, __nfds=2, __fds=0x7f901d76fba0) at /usr/include/bits/poll2.h:46
#2  linux_udev_event_thread_main (arg=<optimized out>) at os/linux_udev.c:175
#3  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f8fe77fc700 (LWP 6022)):
#0  0x00007f903658f1c9 in syscall () from /lib64/libc.so.6
#1  0x00007f9036b110de in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2  0x00007f9036a9fc21 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3  0x00007f9036af3e62 in g_thread_pool_thread_proxy () from /lib64/libglib-2.0.so.0
#4  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9036594ead in clone () from /lib64/libc.so.6

---Type <return> to continue, or q <return> to quit---
Thread 3 (Thread 0x7f8fe67fa700 (LWP 6023)):
#0  0x00007f903658f1c9 in syscall () from /lib64/libc.so.6
#1  0x00007f9036b110de in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2  0x00007f9036a9fc21 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3  0x00007f9036af3e62 in g_thread_pool_thread_proxy () from /lib64/libglib-2.0.so.0
#4  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f8fe7ffd700 (LWP 6010)):
#0  0x00007f903658f1c9 in syscall () from /lib64/libc.so.6
#1  0x00007f9036b110de in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2  0x00007f9036a9fc21 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3  0x00007f9036af3e62 in g_thread_pool_thread_proxy () from /lib64/libglib-2.0.so.0
#4  0x00007f9036af34f0 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007f903686bdd5 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f9036594ead in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f903aa4da80 (LWP 19701)):
#0  0x00007f90364cd207 in raise () from /lib64/libc.so.6
#1  0x00007f90364ce8f8 in abort () from /lib64/libc.so.6
#2  0x00007f9036af2665 in g_assertion_message () from /lib64/libglib-2.0.so.0
#3  0x00007f9036af26ca in g_assertion_message_expr () from /lib64/libglib-2.0.so.0
#4  0x00007f9033cc4e61 in glib_defer_enable (e=<optimized out>, b=<optimized out>) at pulse/glib-mainloop.c:394
#5  0x00007f902bdfb496 in pa_pstream_send_tagstruct_with_ancil_data (p=0x557e73ee3400, t=0x557e7404f340, 
    ancil_data=ancil_data@entry=0x0) at pulsecore/pstream-util.c:45
#6  0x00007f902bdfb617 in pa_pstream_send_tagstruct_with_creds (p=<optimized out>, t=t@entry=0x557e7404f340, 
    creds=creds@entry=0x0) at pulsecore/pstream-util.c:61
#7  0x00007f9033a94b4a in pa_context_set_sink_input_volume (c=0x557e73ee1540, idx=38, 
---Type <return> to continue, or q <return> to quit---
    volume=volume@entry=0x7ffe2b20f7f0, cb=cb@entry=0x0, userdata=userdata@entry=0x0) at pulse/introspect.c:1514
#8  0x00007f9037e6d5ad in playback_volume_changed (object=<optimized out>, pspec=<optimized out>, 
    data=<optimized out>) at spice-pulse.c:624
#9  0x00007f9036da5988 in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#10 0x00007f9036db805d in signal_emit_unlocked_R () from /lib64/libgobject-2.0.so.0
#11 0x00007f9036dbfff1 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#12 0x00007f9036dc02df in g_signal_emit () from /lib64/libgobject-2.0.so.0
#13 0x00007f9036daa254 in g_object_dispatch_properties_changed () from /lib64/libgobject-2.0.so.0
#14 0x00007f9036dac669 in g_object_notify () from /lib64/libgobject-2.0.so.0
#15 0x00007f9037e47ff0 in notify_main_context (opaque=0x7f9008fff9d0) at gio-coroutine.c:238
#16 0x00007f9036ac8c77 in g_idle_dispatch () from /lib64/libglib-2.0.so.0
#17 0x00007f9036acc049 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#18 0x00007f9036acc3a8 in g_main_context_iterate.isra.19 () from /lib64/libglib-2.0.so.0
#19 0x00007f9036acc45c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#20 0x00007f9037089355 in g_application_run () from /lib64/libgio-2.0.so.0
#21 0x0000557e7343251c in main (argc=5, argv=0x7ffe2b20ffa8) at remote-viewer-main.c:42

Comment 4 Fangge Jin 2019-05-29 10:33:04 UTC
Sometimes the backtrace is as below:
(gdb) bt
#0  0x00007f926af95207 in raise () from /lib64/libc.so.6
#1  0x00007f926af968f8 in abort () from /lib64/libc.so.6
#2  0x00007f926afd7d27 in __libc_message () from /lib64/libc.so.6
#3  0x00007f926afe0489 in _int_free () from /lib64/libc.so.6
#4  0x00007f926b59979e in g_free () from /lib64/libglib-2.0.so.0
#5  0x000055b3906fa884 in remote_viewer_session_connected (session=<optimized out>, 
    guri=0x55b391b6cbc0 "\360]\302\221\263U") at remote-viewer.c:670
#6  0x00007f926b86d988 in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#7  0x00007f926b88005d in signal_emit_unlocked_R () from /lib64/libgobject-2.0.so.0
#8  0x00007f926b887ff1 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#9  0x00007f926b888828 in g_signal_emit_by_name () from /lib64/libgobject-2.0.so.0
#10 0x000055b3907107db in virt_viewer_session_spice_main_channel_event (channel=0x55b391c86bd0, 
    event=SPICE_CHANNEL_OPENED, session=0x55b391c71890) at virt-viewer-session-spice.c:684
---Type <return> to continue, or q <return> to quit---
#11 0x00007f926b86d988 in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#12 0x00007f926b88005d in signal_emit_unlocked_R () from /lib64/libgobject-2.0.so.0
#13 0x00007f926b887ff1 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#14 0x00007f926c90ffc6 in emit_main_context (opaque=0x7f9243fff990) at gio-coroutine.c:198
#15 0x00007f926b590c77 in g_idle_dispatch () from /lib64/libglib-2.0.so.0
#16 0x00007f926b594049 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#17 0x00007f926b5943a8 in g_main_context_iterate.isra.19 () from /lib64/libglib-2.0.so.0
#18 0x00007f926b59445c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#19 0x00007f926bb51355 in g_application_run () from /lib64/libgio-2.0.so.0
#20 0x000055b3906fa51c in main (argc=5, argv=0x7ffe8b0df278) at remote-viewer-main.c:42

Comment 7 Victor Toso 2019-09-30 13:39:45 UTC
Backtrace from comment #4 and posted patch [0] are similar, should be fixed.

[0] https://www.redhat.com/archives/virt-tools-list/2019-September/msg00016.html

Comment 8 Victor Toso 2019-10-04 10:07:51 UTC
Commit that fixes backtrace from comment #4 is:

  https://pagure.io/virt-viewer/c/a13173ae649412d06106a0d9c6d29e6a45d5bf57?branch=master

and a scratch-build for it is available at:

  https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23857190

I haven't yet reproduced backtrace from comment #3.

Comment 9 Victor Toso 2019-10-15 13:42:11 UTC
Build is on the making, moving to MODIFIED to add to errata.

Comment 10 zhoujunqin 2019-10-16 05:12:11 UTC
(In reply to Victor Toso from comment #9)
> Build is on the making, moving to MODIFIED to add to errata.

Hi Victor Toso,
Please help add this bug to errata: https://errata.devel.redhat.com/advisory/47221
Thanks very much.

BR,
juzhou.

Comment 12 zhoujunqin 2019-10-29 09:51:47 UTC
Reproduce with package:  virt-viewer-5.0-15.el7.x86_64
Reproduce rate: only once, less 5%
Connection type: plain-text connection

The backtrack is as follows:
(gdb) bt
#0  0x00007efe8e23a377 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007efe8e23ba68 in __GI_abort () at abort.c:90
#2  0x00007efe8e27cec7 in __libc_message (do_abort=do_abort@entry=2, 
    fmt=fmt@entry=0x7efe8e38f3f8 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
#3  0x00007efe8e283804 in malloc_printerr (action=<optimized out>, 
    str=0x7efe8e38f5c0 "malloc(): smallbin double linked list corrupted", ptr=<optimized out>, 
    ar_ptr=<optimized out>) at malloc.c:4967
#4  0x00007efe8e286f40 in _int_malloc (av=av@entry=0x7efe8e5cb760 <main_arena>, bytes=bytes@entry=32)
    at malloc.c:3383
#5  0x00007efe8e28a5a4 in __libc_calloc (n=<optimized out>, elem_size=<optimized out>) at malloc.c:3241
#6  0x00007efe8e83f6e6 in g_malloc0 (n_bytes=32) at gmem.c:129
#7  0x00007efe8e83f901 in g_malloc0_n (n_blocks=<optimized out>, n_block_bytes=n_block_bytes@entry=4)
    at gmem.c:360
#8  0x00007efe8e828c35 in g_hash_table_new_full (hash_func=0x7efe8e828230 <g_direct_hash>, 
    key_equal_func=0x7efe8e829ac0 <g_direct_equal>, key_destroy_func=key_destroy_func@entry=0x0, 
    value_destroy_func=value_destroy_func@entry=0x7efe8fbb90f0 <destroy_surface>) at ghash.c:731
#9  0x00007efe8fbb9d13 in spice_display_channel_init (channel=0x560fa796a4b0) at channel-display.c:883
#10 0x00007efe8eb354eb in g_type_create_instance (type=94625233904736) at gtype.c:1866
#11 0x00007efe8eb191fd in g_object_new_internal (class=class@entry=0x560fa7967050, 
    params=params@entry=0x7ffe5055f350, n_params=3) at gobject.c:1799
#12 0x00007efe8eb1b121 in g_object_new_valist (object_type=<optimized out>, 
    first_property_name=first_property_name@entry=0x7efe8fc6590f "spice-session", 
    var_args=var_args@entry=0x7ffe5055f4a0) at gobject.c:2122
#13 0x00007efe8eb1b469 in g_object_new (object_type=object_type@entry=94625233904736, 
    first_property_name=first_property_name@entry=0x7efe8fc6590f "spice-session") at gobject.c:1642
#14 0x00007efe8fbb12ca in spice_channel_new (s=0x560fa750d6a0, type=2, id=0) at spice-channel.c:2266
#15 0x00007efe8fbc04e7 in _channel_new (c=c@entry=0x560fa7591450) at channel-main.c:1732
#16 0x00007efe8e836c77 in g_idle_dispatch (source=0x560fa7579cd0, 
    callback=0x7efe8fbc04d0 <_channel_new>, user_data=0x560fa7591450) at gmain.c:5533
#17 0x00007efe8e83a049 in g_main_dispatch (context=0x560fa74db0a0) at gmain.c:3175
#18 g_main_context_dispatch (context=context@entry=0x560fa74db0a0) at gmain.c:3828
#19 0x00007efe8e83a3a8 in g_main_context_iterate (context=context@entry=0x560fa74db0a0, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3901
#20 0x00007efe8e83a45c in g_main_context_iteration (context=context@entry=0x560fa74db0a0, 
    may_block=may_block@entry=1) at gmain.c:3962
#21 0x00007efe8edf7355 in g_application_run (application=application@entry=0x560fa74d8300, 
    argc=argc@entry=5, argv=argv@entry=0x7ffe5055f858) at gapplication.c:2470
#22 0x0000560fa60be7fc in main (argc=5, argv=0x7ffe5055f858) at remote-viewer-main.c:42

Comment 13 zhoujunqin 2019-11-01 08:02:30 UTC
Verify this bug with packages:
virt-viewer-5.0-17.el7.x86_64
spice-gtk3-0.35-5.el7.x86_64
spice-server-0.14.0-8.el7.x86_64
gtk3-3.22.30-5.el7.x86_64
glib2-2.56.1-5.el7.x86_64
libvirt-4.5.0-28.el7.x86_64
qemu-kvm-rhev-2.12.0-38.el7.x86_64


Steps:
Testing scenario-1: plain-text connection
1.1 Prepare migration env

1.2 Start a vm with spice graphic on src host
...
    <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
      <image compression='off'/>
    </graphics>

1.3 Connect to vm by remote-viewer:
$ remote-viewer spice://10.73.xx.xx:5900

1.4 Migrate vm to dest host:
# virsh migrate $vm qemu+ssh://$DST/system --live --verbose --p2p

1.5 Migrate vm back to src host, then repeat for several times, remote-viewer works well, no crash occurs.


Testing scenario-1: TLS connection


2.1 Prepare migration env and TLS env

2.2 Start a vm which has spice_tls setting on src host
...
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
      <image compression='off'/>
    </graphics>

2.3 Connect to vm by remote-viewer:
$ remote-viewer spice://10.73.xx.xx/?port=5900\&tls-port=5901 --spice-ca-file=/etc/pki/libvirt-spice/ca-cert.pem --spice-host-subject=" C=IL, L=Raanana, O=Red Hat, CN=my server "

2.4 Migrate vm to dest host:
# virsh migrate $vm qemu+ssh://$DST/system --live --verbose --p2p

2.5 Migrate vm back to src host, then repeat for several times, remote-viewer works well, no crash occurs.

======================================================================================
Make a summary, remote-viewer works well during migration.

@yafu, while you do related migration testing, please also help check it again.
And if it also works well for you, then I will move this bug from ON_QA to VERIFIED, thanks.

Comment 14 yafu 2019-11-11 02:45:36 UTC
(In reply to zhoujunqin from comment #13)
> Verify this bug with packages:
> virt-viewer-5.0-17.el7.x86_64
> spice-gtk3-0.35-5.el7.x86_64
> spice-server-0.14.0-8.el7.x86_64
> gtk3-3.22.30-5.el7.x86_64
> glib2-2.56.1-5.el7.x86_64
> libvirt-4.5.0-28.el7.x86_64
> qemu-kvm-rhev-2.12.0-38.el7.x86_64
> 
> 
> Steps:
> Testing scenario-1: plain-text connection
> 1.1 Prepare migration env
> 
> 1.2 Start a vm with spice graphic on src host
> ...
>     <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0'>
>       <listen type='address' address='0.0.0.0'/>
>       <image compression='off'/>
>     </graphics>
> 
> 1.3 Connect to vm by remote-viewer:
> $ remote-viewer spice://10.73.xx.xx:5900
> 
> 1.4 Migrate vm to dest host:
> # virsh migrate $vm qemu+ssh://$DST/system --live --verbose --p2p
> 
> 1.5 Migrate vm back to src host, then repeat for several times,
> remote-viewer works well, no crash occurs.
> 
> 
> Testing scenario-1: TLS connection
> 
> 
> 2.1 Prepare migration env and TLS env
> 
> 2.2 Start a vm which has spice_tls setting on src host
> ...
>     <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
> listen='0.0.0.0'>
>       <listen type='address' address='0.0.0.0'/>
>       <image compression='off'/>
>     </graphics>
> 
> 2.3 Connect to vm by remote-viewer:
> $ remote-viewer spice://10.73.xx.xx/?port=5900\&tls-port=5901
> --spice-ca-file=/etc/pki/libvirt-spice/ca-cert.pem --spice-host-subject="
> C=IL, L=Raanana, O=Red Hat, CN=my server "
> 
> 2.4 Migrate vm to dest host:
> # virsh migrate $vm qemu+ssh://$DST/system --live --verbose --p2p
> 
> 2.5 Migrate vm back to src host, then repeat for several times,
> remote-viewer works well, no crash occurs.
> 
> =============================================================================
> =========
> Make a summary, remote-viewer works well during migration.
> 
> @yafu, while you do related migration testing, please also help check it
> again.
> And if it also works well for you, then I will move this bug from ON_QA to
> VERIFIED, thanks.

Also works for me. Please move the bug to VERIFIED.

Comment 15 zhoujunqin 2019-11-11 06:31:32 UTC
I move this bug from ON_QA to VERIFIED based on Comment 13 and Comment 14 testing.
Thanks for yafu's help.

Comment 17 errata-xmlrpc 2020-03-31 20:09:14 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/RHBA-2020:1170