Xpra: Ticket #1715: segfaults on fresh fedora 26 machine

I'm getting segfaults on my workstation - I started getting them when I reinstalled Fedora 26 after the 25->26 upgrade went poorly (Nvidia drivers). I'm building from trunk source (and double checked with the 1.X branch), currently on r17567, and I get a segfault when trying to attach - watching the log of the server I see that it gets as far as an initial TCP connection before the client segfaults (server prints "New tcp connection received from X.X.X.X:YYYY). I've tried disabling about as many switches as I can think of going as far as to even try connecting with window forwarding disabled, and it still crashes.

I also double checked it wasn't my build environment by installing via a package on this machine and I still get a segfault.

My final connect command:

xpra attach tcp:192.168.1.138:2200 --no-speaker --video-decoders=none --opengl=no --csc-modules=none --tray=no --speaker=no

The server being started with:

xpra start :11 --bind-tcp=0.0.0.0:2200 --start-child=xterm --no-daemon


I'll attach my -d all output momentarily.



Mon, 04 Dec 2017 17:35:03 GMT - J. Max Mena: attachment set

-d all output before the segfault


Mon, 04 Dec 2017 17:36:12 GMT - J. Max Mena:

the journalctl segfault log:

Dec 04 09:35:20 verschlimmbessern.spikes.eng audit[23790]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=23790 comm="xpra" exe="/usr/bin/python2.7" sig=11 res=1
Dec 04 09:35:20 verschlimmbessern.spikes.eng kernel: xpra[23790]: segfault at 0 ip 00007f4398d56950 sp 00007fff70ed0418 error 4 in libglib-2.0.so.0.5200.3[7f4398d1d000+110000]
Dec 04 09:35:20 verschlimmbessern.spikes.eng systemd[1]: Started Process Core Dump (PID 24134/UID 0).
Dec 04 09:35:20 verschlimmbessern.spikes.eng audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@31-24134-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 04 09:35:20 verschlimmbessern.spikes.eng systemd-coredump[24135]: Process 23790 (xpra) of user 1000 dumped core.
                                                                      Stack trace of thread 23790:
                                                                      #0  0x00007f4398d56950 g_str_hash (libglib-2.0.so.0)
                                                                      #1  0x00007f4398d5560b g_hash_table_insert_internal (libglib-2.0.so.0)
                                                                      #2  0x00007f4397e6ae18 gtk_icon_theme_list_contexts (libgtk-x11-2.0.so.0)
                                                                      #3  0x00007f43984c2b26 _wrap_gtk_icon_theme_list_contexts (_gtk.so)
                                                                      #4  0x00007f43a8b26e81 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #5  0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #6  0x00007f43a8a73efe function_call (libpython2.7.so.1.0)
                                                                      #7  0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #8  0x00007f43a8a66e7e instancemethod_call (libpython2.7.so.1.0)
                                                                      #9  0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #10 0x00007f43a8b23052 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #11 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #12 0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #13 0x00007f43a8b25033 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #14 0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #15 0x00007f43a8a73efe function_call (libpython2.7.so.1.0)
                                                                      #16 0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #17 0x00007f43a8a66e7e instancemethod_call (libpython2.7.so.1.0)
                                                                      #18 0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #19 0x00007f43a8b23052 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #20 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #21 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #22 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #23 0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #24 0x00007f43a8b25033 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #25 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #26 0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #27 0x00007f43a8b28249 PyEval_EvalCode (libpython2.7.so.1.0)
                                                                      #28 0x00007f43a8b2e27f run_mod (libpython2.7.so.1.0)
                                                                      #29 0x00007f43a8b2e22a PyRun_FileExFlags (libpython2.7.so.1.0)
                                                                      #30 0x00007f43a8b2e11e PyRun_SimpleFileExFlags (libpython2.7.so.1.0)
                                                                      #31 0x00007f43a8b343f9 Py_Main (libpython2.7.so.1.0)
                                                                      #32 0x00007f43a7ccc88a __libc_start_main (libc.so.6)
                                                                      #33 0x0000563a5000877a _start (python2.7)
                                                                      Stack trace of thread 24132:
                                                                      #0  0x00007f43a87ae666 do_futex_wait.constprop.1 (libpthread.so.0)
                                                                      #1  0x00007f43a87ae758 __new_sem_wait_slow.constprop.0 (libpthread.so.0)
                                                                      #2  0x00007f43a8ae6a34 PyThread_acquire_lock (libpython2.7.so.1.0)
                                                                      #3  0x00007f43a8ae79a2 lock_PyThread_acquire_lock (libpython2.7.so.1.0)
                                                                      #4  0x00007f43a8b273de PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #5  0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #6  0x00007f43a8b25033 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #7  0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #8  0x00007f43a8b25033 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #9  0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #10 0x00007f43a8a74097 function_call (libpython2.7.so.1.0)
                                                                      #11 0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #12 0x00007f43a8b2381f PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #13 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #14 0x00007f43a8b259b9 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                                      #15 0x00007f43a8b28038 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                                      #16 0x00007f43a8a73efe function_call (libpython2.7.so.1.0)
                                                                      #17 0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #18 0x00007f43a8a66e7e instancemethod_call (libpython2.7.so.1.0)
                                                                      #19 0x00007f43a8a5e473 PyObject_Call (libpython2.7.so.1.0)
                                                                      #20 0x00007f43a8b1e667 PyEval_CallObjectWithKeywords (libpython2.7.so.1.0)
                                                                      #21 0x00007f43a8b34e62 t_bootstrap (libpython2.7.so.1.0)
                                                                      #22 0x00007f43a87a536d start_thread (libpthread.so.0)
                                                                      #23 0x00007f43a7dbce1f __clone (libc.so.6)
Dec 04 09:35:20 verschlimmbessern.spikes.eng audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@31-24134-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 04 09:35:22 verschlimmbessern.spikes.eng abrt-server[24147]: Deleting problem directory ccpp-2017-12-04-09:35:21.338913-23790 (dup of ccpp-2017-11-20-11:45:57.1257-26631)
Dec 04 09:35:22 verschlimmbessern.spikes.eng abrt-notification[24188]: Process 26631 (python2.7) crashed in ??()

Tue, 05 Dec 2017 02:20:11 GMT - Antoine Martin: owner, summary changed

I have had Fedora 26 installed on multiple systems and never saw anything like this. I still have a Fedora 26 VM which is also running just fine.

The last line in your debug log shows:

2017-12-04 09:11:47,023 icon search path: ('/home/max/.icons', \
'/home/max/.local/share/icons', \
'/home/max/.local/share/flatpak/exports/share/icons', \
'/var/lib/flatpak/exports/share/icons', \
'/usr/local/share/icons', \
'/usr/share/icons', \
'/home/max/.local/share/flatpak/exports/share/pixmaps', \
'/var/lib/flatpak/exports/share/pixmaps', \
'/usr/local/share/pixmaps', \
'/usr/share/pixmaps')

And since the crash occurs in gtk_icon_theme_list_contexts, maybe one of those paths contains something that GTK does not like. At least some of those paths are unexpected. (ie: flatpak) Try running with r17568 or later and XPRA_EXPORT_ICON_DATA=0 xpra attach ..., if that does not crash then the problem is with GTK parsing one of those themes or icons. You can also try with python3 / GTK3 to see if that is affected by the same bug. If the env var does prevent the crash, try (temporarily) moving each directory out of the way (starting with the user defined ones) until you find the one that causes problems, please attach it here so we can report it upstream.

Or maybe you're building xpra wrong, or the runtime libraries installed (libvpx, etc), don't match the headers xpra is built against. Try re-installing all of them (libvpx-xpra etc)

And if that does not help, try building without any codecs --without-libvpx --without-... (and make sure to wipe the installation directory each time)


Wed, 06 Dec 2017 18:15:02 GMT - J. Max Mena: owner changed

Upped client and server to r17578 - XPRA_EXPORT_ICON_DATA=0 makes the segfault go away...so it definitely looks like there's something GTK doesn't like.

Of note:

the following folders did not exist on my system, so I created them (did nothing, sadly):

/home/max/.local/share/flatpak/exports/share/icons
/var/lib/flatpak/exports/share/icons
/usr/local/share/icons
/home/max/.local/share/flatpak/exports/share/pixmaps
/home/max/.icons
/var/lib/flatpak/exports/share/pixmaps

I also walked through the list of folders and moved stuff out of the way for each one (yes, even /usr/share/pixmaps), and it made no difference.

At least I've narrowed it down to GTK - the Python3 client works perfectly fine.

I'm not sure what to do next, here. I'll walk through the list again and see if I missed anything, but moving the folders out of the way doesn't seem to have done anything.


Wed, 06 Dec 2017 18:19:12 GMT - J. Max Mena: status changed; resolution set

okay I fixed it. I went into my KDE System Settings application and changed the GTK icon to Oxygen, hit apply, then changed it back to Breeze (what it was before), and changed the fallback to Oxygen....that seems to have fixed it.

I have no idea anymore. I guess I'll close this as worksforme? This is a bizarre one.


Thu, 07 Dec 2017 02:58:08 GMT - Antoine Martin:

For the record, strace is a good way to figure out which file is causing the crash. (should be the last file opened)


Sat, 23 Jan 2021 05:31:50 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1715