! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfdesktop crashes with SIGSEGV in xfdesktop_backdrop_list_choose_random
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description ericdf 2014-12-02 12:59:34 CET
I don't know how to trigger the issue yet.  I only found out because the disk that gets the core dumps was full.
Sometimes it happens a few times in a minutes, sometimes it takes 30 minutes to trigger.

/usr/sbin/xfdesktop --version

This is xfdesktop version 4.10.3, running on Xfce 4.10.
Built with GTK+ 2.24.25, linked with GTK+ 2.24.25.
Build options:
    Desktop Menu:        enabled
    Desktop Icons:       enabled
    Desktop File Icons:  enabled

ldd /usr/sbin/xfdesktop

/usr/sbin/xfdesktop:
        linux-vdso.so.1 (0x00007fffb1aae000)
        libnotify.so.4 => /usr/lib/libnotify.so.4 (0x00007f883a36f000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f883a02d000)
        libxfce4ui-1.so.0 => /usr/lib/libxfce4ui-1.so.0 (0x00007f8839e1b000)
        libwnck-1.so.22 => /usr/lib/libwnck-1.so.22 (0x00007f8839bdb000)
        libxfconf-0.so.2 => /usr/lib/libxfconf-0.so.2 (0x00007f88399c8000)
        libgarcon-1.so.0 => /usr/lib/libgarcon-1.so.0 (0x00007f88397ac000)
        libexo-1.so.0 => /usr/lib/libexo-1.so.0 (0x00007f8839567000)
        libxfce4util.so.6 => /usr/lib/libxfce4util.so.6 (0x00007f8839358000)
        libthunarx-2.so.0 => /usr/lib/libthunarx-2.so.0 (0x00007f883914d000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007f8838b0a000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007f8838855000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f8838525000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f8838300000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f88380b4000)
        libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f8837d3d000)
        libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2 (0x00007f8837b15000)
        libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f88378cc000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f883767b000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f883736d000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8837151000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f8836dae000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f8836b8c000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8836988000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f8836780000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f8836563000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f8836356000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f8836130000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f8835f1a000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f8835cdd000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f8835a34000)
        libstartup-notification-1.so.0 => /usr/lib/libstartup-notification-1.so.0 (0x00007f883582a000)
        libXRes.so.1 => /usr/lib/libXRes.so.1 (0x00007f8835627000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f8835322000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f8835120000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f8834f1c000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f8834d16000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f8834b0c000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f8834909000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f88346f8000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f88344ee000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f88342e3000)
        libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f88340e0000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f8833edd000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f8833ccb000)
        libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f8833a1e000)
        libEGL.so.1 => /usr/lib/libEGL.so.1 (0x00007f8833713000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f88334dd000)
        libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f88332d9000)
        libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f88330cf000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f8832eb9000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f8832b6b000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f8832963000)
        libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f883275a000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f88324eb000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f88322d4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f883a577000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f88320d0000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f8831eca000)
        libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f8831cc5000)
        libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f8831a6d000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f8831843000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f8831633000)
        libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007f883142d000)
        libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f883122b000)
        libnvidia-glsi.so.343.22 => /usr/lib/libnvidia-glsi.so.343.22 (0x00007f8830fa3000)
        libnvidia-tls.so.343.22 => /usr/lib/libnvidia-tls.so.343.22 (0x00007f8830da0000)
        libnvidia-glcore.so.343.22 => /usr/lib/libnvidia-glcore.so.343.22 (0x00007f882e138000)
        libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f882df1a000)


From the core dumps, there are two backtraces:

#0  0x00007f03a4f981c6 in malloc_usable_size () from /usr/lib/libc.so.6
#1  0x00007f03a0d8f329 in ?? () from /usr/lib/libGL.so.1
#2  0x00007f039ef0f0a9 in ?? () from /usr/lib/libnvidia-tls.so.343.22
#3  0x00007f03a55437c9 in g_strfreev () from /usr/lib/libglib-2.0.so.0
#4  0x0000000000432442 in xfdesktop_backdrop_list_choose_random ()
#5  0x0000000000417083 in ?? ()
#6  0x00000000004173c9 in ?? ()
#7  0x0000000000418645 in ?? ()
#8  0x00000000004189ce in ?? ()
#9  0x00007f03a57f8484 in ?? () from /usr/lib/libgobject-2.0.so.0
#10 0x00007f03a5812067 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#11 0x00007f03a58129bf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#12 0x00007f03a6ec5c94 in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x00007f03a6ed035d in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007f03a57f8255 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#15 0x00007f03a580981b in ?? () from /usr/lib/libgobject-2.0.so.0
#16 0x00007f03a5812758 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#17 0x00007f03a58129bf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#18 0x00007f03a6ec53f6 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#19 0x0000000000412ff4 in main ()

#0  0x00007ffadc128b24 in free () from /usr/lib/libc.so.6
#1  0x00007ffadc6d47c9 in g_strfreev () from /usr/lib/libglib-2.0.so.0
#2  0x0000000000432442 in xfdesktop_backdrop_list_choose_random ()
#3  0x000000000041820a in ?? ()
#4  0x00007ffadc989484 in ?? () from /usr/lib/libgobject-2.0.so.0
#5  0x00007ffadc9a3067 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#6  0x00007ffadc9a39bf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#7  0x00000000004154f2 in ?? ()
#8  0x00007ffadc6b53c3 in ?? () from /usr/lib/libglib-2.0.so.0
#9  0x00007ffadc6b491d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#10 0x00007ffadc6b4cf8 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x00007ffadc6b5022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#12 0x00007ffaddf373f7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x00000000004130a2 in main ()
Comment 1 Eric Koegel editbugs 2014-12-03 16:35:59 CET
Created attachment 5788 
Fix for crash when choosing random backdrop

Oh... can you try this patch? It should fix the issue. Someday I'll remember simple code is better....
Comment 2 ericdf 2014-12-10 15:30:01 CET
For some reason, the application didn't crash since (or at least no core dumps are generated) so I didn't applied the patch yet.
(But now that I think about it, my desktop is void of icons so this may be why the issue is not triggered anymore)
I'll come back with this.
Comment 3 Eric Koegel editbugs 2014-12-10 18:04:29 CET
It doesn't crash? That's no fun. Icons on the desktop shouldn't matter, this has to do with the wallpaper cycling. If you (or anyone else) do get it to crash again, let me know!
Just make sure the backtrace of the crash lists xfdesktop_backdrop_list_choose_random otherwise file a new bug report (because you found a new bug...).
Comment 4 ericdf 2014-12-11 13:49:35 CET
Created attachment 5815 
fix keeping the original intent of the loop

It crashed again (it does it more often after a reboot)
Removing the string array "compression" indeed fixes the issue, thank you.

I've attached a patch file that should IMHO avoid the 3 potential issues of the previous loop.
(backdrop.list file containing only the "# xfce backdrop list" line, leak of empty string(s) at the end, freed pointer kept in the resulting array)

I think the crash was cause by the last of the list.
Comment 5 Steve Dodier-Lazaro editbugs 2015-02-15 06:44:00 CET
Hi Eric and Eric :-)

Which patch should be looked at now? Should it be tested further or do you both agree the latest patch does the job?

Thanks.
Comment 6 Eric Koegel editbugs 2015-02-15 09:22:11 CET
I want to push Ericdf's patch along with one other but I get an error
when pushing to xfdesktop's 4.10 branch now. http://dpaste.com/080T9G7
I'll poke Simon about it.
Comment 7 Thaddaeus Tintenfisch editbugs 2015-04-06 21:26:34 CEST
Any news?
Comment 8 Eric Koegel editbugs 2015-04-12 18:23:47 CEST
Oh right, finally got the permissions fixed. Pushed to 4.10 in:
commit 7d82ff42f310c56a1968ed97cf5c09be4827d65e
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Sun Feb 15 11:05:51 2015 +0300

    Fix for crash in xfdesktop_backdrop_list_choose_random (Bug #11346)
    
    This patch some issues with the function:
    - backdrop.list file containing only the "# xfce backdrop list" line
    - leak of empty string(s) at the end
    - freed pointer kept in the resulting array
    Patch submitted by ericdf
    
    Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
http://git.xfce.org/xfce/xfdesktop/commit/?h=xfce-4.10&id=7d82ff42f310c56a1968ed97cf5c09be4827d65e

Bug #11346

Reported by:
ericdf
Reported on: 2014-12-02
Last modified on: 2015-04-12

People

Assignee:
Eric Koegel
CC List:
3 users

Version

Version:
4.10.0

Attachments

Additional information