! 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 !
xfce4-panel-4.13.1: systray segfaults
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Notification Area

Comments

Description Denis Dupeyron 2017-11-15 21:30:00 CET
Created attachment 7440 
gdb backtrace

I have this problem on all my machines but on, but I have just rebuilt a new clean system from scratch to rule out any goofiness on my part. In case it matters, the machines are a core2duo with radeon graphics (actually an old iMac), a skylake dekstop with nvidia graphics, and a skylake laptop with intel graphics. The machine which does not have this issue at all (although as far as I know it is installed and configured the same way as the others) is a core2duo laptop.

More info on the latest clean build:
 - Gentoo, unstable to pick up the latest XFCE packages but no tricks
 - CFLAGS="-O2 -march=native -pipe"
 - xfce4-panel and glib rebuilt with CFLAGS="-Og -ggdb -march=native -pipe" for gdb (see below)
 - kernel is 4.13.2 with config from ubuntu (with a few simple changes like building filesystem modules in kernel since I don't use an initramfs)
 - versions:
    gcc: 6.4.0 (might matter since some things seem to be optimized out)
    glib: 2.52.3
    xfce4util: 4.13.1
    xfconf: 4.13.4
    libxfce4ui: 4.13.3
    xfce4-panel: 4.13.1
    xfwm4: 4.13.0
    xfce4-settings: 4.13.1
    xfce4-session: 4.13.0
    xfdesktop: 4.13.1

When normally adding the systray to my panel in a newly created user account (i.e., first logon) and again later, I each time get the 'Plugin "Notification Area" unexpectedly left the panel' dialog. Clicking on the Execute button brings the same dialog back until I agree to remove the plugin.

Starting the systray plugin from the command line like this:

/usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce/panel/plugins/libsystray.so 3 23069689 1 2 3 4

results in a segfault. The second command line argument "3" is picked as one not being used by other plugins running on my system at the time, and the next one "23069689" is also picked as following the numbers used by other plugins.

I ran the same thing in gdb and printed a backtrace (attached).

Line 720 in plugins/systray/systray-box.c is the one marked with the > symbol:

  if (name_a != NULL && g_hash_table_lookup_extended (box->names_ordered, name_a, NULL, &value))
    index_a = GPOINTER_TO_INT (value);
> if (name_b != NULL && g_hash_table_lookup_extended (box->names_ordered, name_b, NULL, &value))
    index_b = GPOINTER_TO_INT (value);

It currently matches line 766 in git HEAD.

I tried going a little further but I'm stumped. It looks like name_b is NULL and/or optimized out and thus g_hash_table_lookup_extended breaks. I tried compiling with -fno-delete-null-pointer-checks but argument b in #3 of the attached trace is still optimized out.

Please do not hesitate to ask for more information or tests. Note that I'm currently travelling and only have access to the skylake laptop with the clean install I described.
Comment 1 theli.ua 2017-11-21 06:21:01 CET
Getting the same segfault with the same backtrace
Comment 2 theli.ua 2017-11-21 06:43:18 CET
this happens when either name_a or name_b is NULL and looks like its already fixed in the master.
Comment 3 Skunnyk editbugs 2017-11-22 13:04:36 CET
Are you running xfcee4-panel 4.13.1 or xfce4-panel from git master ? 

There were lots of bugfixes in git master (see for example this commit https://git.xfce.org/xfce/xfce4-panel/commit/?id=4de1909f476f394074470464e4088a347c3fdeff on impacted files in the crash), can you try with it git master ?

Thank you,
Comment 4 Denis Dupeyron 2017-11-24 06:17:05 CET
It was 4.13.1. I will look into it more next week. I'm off-grid right now with limited access to a satellite link. What I do remember is I had trouble getting it to compile due to the recent GObject Introspection work. I didn't have time to try real hard though. I also tried to patching 4.13.1 with the commit you linked but it did not end well. Although the panel would no longer segfault the icons were rendered in black and white and stacking over each others instead of replacing the previous ones (like when nm-applet switches from not connected to connected). The refreshing was also messed up when increasing the size of the icons in settings.
Comment 5 Simon Steinbeiss editbugs 2018-06-06 00:50:59 CEST
Marking as fixed as per comment 2.
Please re-open if you can still reproduce with 4.13.3

Bug #14008

Reported by:
Denis Dupeyron
Reported on: 2017-11-15
Last modified on: 2018-06-06

People

Assignee:
Nick Schermer
CC List:
4 users

Version

Version:
4.13.1

Attachments

gdb backtrace (7.62 KB, application/octet-stream)
2017-11-15 21:30 CET , Denis Dupeyron
no flags

Additional information