Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-panel crashes at startup #431

Closed
bol-van opened this issue Apr 30, 2016 · 33 comments · Fixed by #701
Closed

mate-panel crashes at startup #431

bol-van opened this issue Apr 30, 2016 · 33 comments · Fixed by #701

Comments

@bol-van
Copy link

bol-van commented Apr 30, 2016

Ubuntu 16.04 MATE. mate-panel crashes once after logon if compiz window manager is used instead of marco. Then it restarts. Tested on physical hardware (nvidia) and vmware.
crash is very stable. same crash was reported many times on the web

segfault at 6 ip 00007f155df0f7e5 sp 00007ffc1328bd18 error 4 in libgobject-2.0.so.0.4800.0[7f155dedb000+52000]

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/33485666-mate-panel-crashes-at-startup?utm_campaign=plugin&utm_content=tracker%2F314880&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F314880&utm_medium=issues&utm_source=github).
@monsta
Copy link
Contributor

monsta commented Apr 30, 2016

Is there a report on Launchpad about it? I'm asking because it might contain a backtrace collected via apport (which would be helpful to us).

@bol-van
Copy link
Author

bol-van commented Apr 30, 2016

Since this bug is very easy to reproduce I thought it would not be necessary.
But if you need it I post it.

_usr_bin_mate-panel.1000.crash.zip

@monsta
Copy link
Contributor

monsta commented May 5, 2016

Well, I don't see a backtrace in that archive. I can't reproduce it either in my VirtualBox.

@bol-van
Copy link
Author

bol-van commented May 5, 2016

This archive is standard apport report. It can be unpacked by "apport-unpack" tool. Unpacked directory has CoreDump file. It can be opened by "gdb /usr/bin/mate-panel CoreDump". Then "bt" command in gdb. To see function names install mate-panel-dbg package.
Here is your backtrace :

#0  0x00007f0300a277e5 in g_type_check_instance_is_fundamentally_a () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00007f0300a07c17 in g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2  0x00000000004685bd in container_child_background_set (source_object=<optimized out>, res=0x10a0dc0, user_data=<optimized out>)
    at mate-panel-applet-frame-dbus.c:240
#3  0x00007f0300cbc447 in g_simple_async_result_complete () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00000000004697d0 in set_applet_property_cb (source_object=<optimized out>, res=0x12f38e0, user_data=<optimized out>)
    at mate-panel-applet-container.c:560
#5  0x00007f0300ccdb33 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007f0300cce1de in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#7  0x00007f0300d1ca2f in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#8  0x00007f0300ccdb33 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#9  0x00007f0300ccdb69 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#10 0x00007f030072bfda in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f030072c380 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f030072c6a2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007f0301f816a7 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00000000004224cc in main (argc=1, argv=0x7ffeb8552e38) at main.c:170

I suppose reproducing the problem requires working 3d acceleration and working compiz.

@monsta
Copy link
Contributor

monsta commented May 5, 2016

Thanks, I wasn't aware of apport-unpack. Will check it.

@monsta
Copy link
Contributor

monsta commented May 5, 2016

Ouch. Looks similar to #214, that's weird.

@monsta
Copy link
Contributor

monsta commented May 5, 2016

Looks similar to https://bugzilla.redhat.com/1238820 as well.

@monsta
Copy link
Contributor

monsta commented May 24, 2016

Ok, new mate-panel build with possible fix is uploaded to the official MATE PPA:
https://launchpad.net/~ubuntu-mate-dev/+archive/ubuntu/xenial-mate

Please test if it fixes the crash for you (and that it does not cause any regressions).

@bol-van
Copy link
Author

bol-van commented May 24, 2016

Same crash still happens

@raveit65
Copy link
Member

Same crash still happens

Whow, people working really hard to fix that bug, and you're not able to tell more than 4 words.......
Please attach a new stacktrace.

@bol-van
Copy link
Author

bol-van commented May 24, 2016

I checked bugtrace and it looks identical. Strange thing is EXACTLY the same function addresses (aside ASLR). If codes is changed function offsets usually also change. Double checked version. Manually downloaded deb from PPA, unpacked, compared md5sum to actual /usr/bin/mate-panel.

#3  0x00007fc7843a8447 in g_simple_async_result_complete () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00000000004697d0 in set_applet_property_cb (source_object=<optimized out>, res=0xb041d0, user_data=<optimized out>)
    at mate-panel-applet-container.c:560
#5  0x00007fc7843b9b33 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007fc7843ba1de in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#7  0x00007fc784408a2f in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#8  0x00007fc7843b9b33 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#9  0x00007fc7843b9b69 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#10 0x00007fc783e17fda in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007fc783e18380 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007fc783e186a2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fc78566d6a7 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00000000004224cc in main (argc=1, argv=0x7ffe103c8a78) at main.c:170

@monsta
Copy link
Contributor

monsta commented Jun 2, 2016

Weird... ok, I'll merge the commits to master for now, since they apparently do no harm. Will investigate more later.

@monsta
Copy link
Contributor

monsta commented Jun 10, 2016

Well, I'm not really sure if that would change things, but MATE 1.14 is now available for Ubuntu 16.04 via their official PPA: https://ubuntu-mate.org/blog/mate-desktop-114-for-xenial-xerus/

You can try it and see if anything changes...

@monsta
Copy link
Contributor

monsta commented Jun 27, 2016

@flexiondotorg: can you please update mate-panel to 1.14.1 in PPA?

@flexiondotorg
Copy link
Member

@monsta Thanks for the reminder. Will do tomorrow.

@monsta
Copy link
Contributor

monsta commented Sep 13, 2016

@bol-van: can you update MATE to 1.14.x from PPA and check if mate-panel still crashes?

@bol-van
Copy link
Author

bol-van commented Sep 13, 2016

1.14.2 vmware see no crash
cannot test now with nvidia on real hardware. not sure when i'll be at that place. Possibly on 22-sep may be later

@joakim-tjernlund
Copy link

On MATE 14 (mate-panel 1.14.2) I see SEGV (mate-panel) in dmesg when I logout.

did a mate-panel --replace an got this:
(mate-panel:3458): GLib-CRITICAL **: g_hash_table_remove_internal: assertion 'hash_table != NULL' failed

(mate-panel:3458): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'MatePanelAppletFrameDBus'

(mate-panel:3458): GLib-CRITICAL **: g_hash_table_remove_internal: assertion 'hash_table != NULL' failed

(mate-panel:3458): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'MatePanelAppletFrameDBus'

But now I don't see a SEGV :(

@joakim-tjernlund
Copy link

Forgot, on Gentoo using mozo and gtk2(where possible)

@joakim-tjernlund
Copy link

A bit more info from the kernel:
kernel: mate-panel[3802]: segfault at 6 ip 00007fdaed0a2b15 sp 00007ffdc2f97528 error 4 in libgobject-2.0.so.0.4600.2[7fdaed06f000+52000]

@joakim-tjernlund
Copy link

joakim-tjernlund commented Sep 19, 2016

So new idea, generate a core file and a backtrace from core after the fact:

(gdb) bt
#0  0x00007f0a97da8fd9 in g_type_check_instance_is_fundamentally_a (type_instance=type_instance@entry=0x6, fundamental_type=fundamental_type@entry=80) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gobject/gtype.c:4030
#1  0x00007f0a97d890c8 in g_object_unref (_object=0x6) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gobject/gobject.c:3076
#2  0x000000000046b0fe in container_child_background_set (source_object=<optimized out>, res=0x9d9ca0, user_data=<optimized out>) at panel-applet-frame-dbus.c:239
#3  0x00007f0a9803fd57 in g_simple_async_result_complete (simple=0x9d9ca0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gio/gsimpleasyncresult.c:801
#4  0x000000000046c395 in set_applet_property_cb (source_object=<optimized out>, res=0x9c8d00, user_data=<optimized out>) at panel-applet-container.c:560
#5  0x00007f0a980513db in g_task_return_now (task=0x9c8d00) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gio/gtask.c:1106
#6  0x00007f0a98051ab6 in g_task_return (task=0x9c8d00, type=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gio/gtask.c:1164
#7  0x00007f0a980a13f9 in g_dbus_connection_call_done (source=<optimized out>, result=0x9c8dd0, user_data=0x9c8d00) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gio/gdbusconnection.c:5702
#8  0x00007f0a980513db in g_task_return_now (task=0x9c8dd0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gio/gtask.c:1106
#9  0x00007f0a98051411 in complete_in_idle_cb (task=0x9c8dd0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gio/gtask.c:1120
#10 0x00007f0a97a8425e in g_main_dispatch (context=0x7dba30) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154
#11 g_main_context_dispatch (context=context@entry=0x7dba30) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769
#12 0x00007f0a97a84638 in g_main_context_iterate (context=0x7dba30, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840
#13 0x00007f0a97a84982 in g_main_loop_run (loop=0x9667d0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:4034
#14 0x00007f0a99314d17 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#15 0x0000000000422bfc in main (argc=1, argv=0x7ffcc0d05548) at main.c:170

@joakim-tjernlund
Copy link

Maybe this can be helpful(missing a g_object_ref somewhere):
https://git.gnome.org/browse/evolution/commit/?id=b0ebeeb

@monsta
Copy link
Contributor

monsta commented Sep 20, 2016

Please use GitHub's formatting for code when posting backtraces - otherwise lots of unrelated reports get mentioned in the post...

@joakim-tjernlund
Copy link

Finally managed to find a way to quote the BT, can't say it is easy to use when you don't known MD
beforehand.

@joakim-tjernlund
Copy link

Just a hunch: Changed panel-applet-contatiner.c:560
g_simple_async_result_complete (result); ->g_simple_async_result_complete_in_idle (result);

Managed to login/logout a few times without SEGV but this SEGV comes and goes anyway

monsta added a commit that referenced this issue Jan 4, 2018
don't mess with additional references to a GCancellable, instead
keep just a const pointer to the internal operation data and use
it as a key when it's needed to cancel the operation.

fixes #214
fixes #431
@monsta
Copy link
Contributor

monsta commented Jan 4, 2018

@joakim-tjernlund: check #701, it should fix the crash.

@bol-van: are you still able to reproduce the crash? I can provide the patched packages via my PPA to test.

@joakim-tjernlund
Copy link

@monsta, my crash is gone and has been for a while no idea why though(or I haven't paid
attention lately)

@monsta
Copy link
Contributor

monsta commented Jan 4, 2018

I think it's normal, it's a kind of random crash which can happen all the time for some users but don't happen for others. Could be a race condition between all these asynchronous callbacks.

@joakim-tjernlund
Copy link

Anyhow, applied it to latest mate-panel 1.18, see what happens ...

@joakim-tjernlund
Copy link

Starts Ok :) My TOK theme is causing some complaints(but no ill effects)

mate-panel --replace

** (mate-panel:8190): WARNING **: unsupported panel image background such as -gtk-gradient


** (mate-panel:8190): WARNING **: use an image file or a standard css gradient


** (mate-panel:8190): WARNING **: unsupported panel image background such as -gtk-gradient


** (mate-panel:8190): WARNING **: use an image file or a standard css gradient


** (mate-panel:8190): WARNING **: unsupported panel image background such as -gtk-gradient


** (mate-panel:8190): WARNING **: use an image file or a standard css gradient


** (mate-panel:8190): WARNING **: unsupported panel image background such as -gtk-gradient


** (mate-panel:8190): WARNING **: use an image file or a standard css gradient

@bol-van
Copy link
Author

bol-van commented Jan 4, 2018

From my point of view it was fixed long time ago. I havent experienced similar crashes since when

@joakim-tjernlund
Copy link

@monsta, I hope mate-screensaver is on your list next

@lukefromdc
Copy link
Member

I put the warnings there in a1445bc "Make panel image background in GTK theme work again. " Prior to that commit, image backgrounds for the panel did not work for the GTK theme in GTK 3 (at least in 3.22) while they had worked just fine in the GTK2 days.

The warnings are so theme developers would see that mate-panel background images containing -gtk-gradient or anything else only GTK understands and Cairo does not would not work and would yield a color background only. The background is drawn using Cairo and gdk_window_set_background_pattern rather than by GTK.

On top of all else, the underlying code in GTK to use -gtk-gradient is deprecated inside GTK:
https://developer.gnome.org/gtk3/stable/gtk3-GtkGradient.html
The only place I saw -gtk-gradient set on a panel background in an official MATE theme was in TOK and traditional-green. These should be updated to use a normal CSS gradient such as linear-gradient or radial-gradient(latter not likely for a panel).

monsta added a commit that referenced this issue Jan 6, 2018
don't mess with additional references to a GCancellable, instead
keep just a const pointer to the internal operation data and use
it as a key when it's needed to cancel the operation.

fixes #214
fixes #431

(squashed 180ba4a + 7f711b8 for 1.18 branch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants