After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327972 - Crash when running 'killall gnome-panel'
Crash when running 'killall gnome-panel'
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: libpanel-applet
git master
Other Linux
: High critical
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 329935 344330 354135 422635 491223 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-01-21 13:38 UTC by Kjartan Maraas
Modified: 2015-03-24 13:00 UTC
See Also:
GNOME target: 2.14.x
GNOME version: 2.13/2.14



Description Kjartan Maraas 2006-01-21 13:38:24 UTC
Got this after doing the above:

(gdb) thread apply all bt

Thread 1 (Thread -1208588624 (LWP 7529))

  • #0 ??
  • #1 ??
    from /lib/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 792
  • #3 <signal handler called>
  • #4 IA__g_logv
    at gmessages.c line 502
  • #5 IA__g_log
    at gmessages.c line 517
  • #6 IA__g_return_if_fail_warning
    at gmessages.c line 532
  • #7 IA__gdk_pixbuf_scale_simple
    at gdk-pixbuf-scale.c line 249
  • #8 gdict_applet_draw
    at gdict-applet.c line 521
  • #9 g_idle_dispatch
    at gmain.c line 3796
  • #10 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #11 g_main_context_iterate
  • #12 IA__g_main_loop_run
    at gmain.c line 2751
  • #13 bonobo_main
    at bonobo-main.c line 312
  • #14 bonobo_generic_factory_main_timeout
    at bonobo-generic-factory.c line 412
  • #15 bonobo_generic_factory_main
    at bonobo-generic-factory.c line 369
  • #16 panel_applet_factory_main_closure
    at panel-applet.c line 1757
  • #17 panel_applet_factory_main
    at panel-applet.c line 1781
  • #18 main
    at gdict-applet.c line 1306
  • #19 __libc_start_main
    at libc-start.c line 231
  • #20 _start

Comment 1 Emmanuele Bassi (:ebassi) 2006-01-22 16:59:25 UTC
I can't reproduce this bug. the trash-applet died on me, though, when doing 'killall gnome-panel'.
Comment 2 Kjartan Maraas 2006-01-25 22:15:07 UTC
I had to try a few times and every time a random applet seemed to crash... Maybe it's the libpanel-applet stuff that's to blame?
Comment 3 Emmanuele Bassi (:ebassi) 2006-01-29 03:09:54 UTC
[Cc-ing Vincent Untz]

by looking at the stack trace, I came up with a plausible explanation; feel free to hit me on the head if I seem totally on crack.

the dictionary applet, like the trash applet, uses an idle function to queue the redraw of the widgets in case of background, orientation or size change.  this I know, because I've stol... ehm... taken inspiration from the code in the trash applet.  it seems that, when the panel receives the kill signal, it creates an event that triggers the idle function; the applet begins the idle loop, but it soon is destroyed - this triggers the segmentation fault (it tries to access the pixbuf used to hold the icon and it's empty).

suggestion: maybe the panel should listen to the TERM and/or KILL signal, and destroy the various factories before actually quitting.  I don't know how well it would play with the GTK's main loop, though.

I repeat: I might be on crack, and gracefully handling a drastic action like a 'killall gnome-panel' could be overkill - no pun intended.
Comment 4 Danielle Madeley 2006-01-31 01:13:26 UTC
This happens in trashapplet, drivemount and possibly deskbar and gweather.
Comment 5 Karsten Bräckelmann 2006-02-04 23:17:14 UTC
*** Bug 329935 has been marked as a duplicate of this bug. ***
Comment 6 Elijah Newren 2006-02-04 23:46:07 UTC
For me, it crashes on restart, not when the panel is dying.  Also, it will only crash for me on the top panel for some reason, putting the applet on the bottom panel doesn't seem to affect this.  Also, if I have the cpu pegged (make -j2 running somewhere) then the applet seems to load up fine every time.  If I have the cpu idle, it seems to crash, each and every time.
Comment 7 Emmanuele Bassi (:ebassi) 2006-02-05 02:15:33 UTC
looks like a race condition happens somewhere between the panel and the factories.

seems that the panel gets indeed killed, but the factories inside an idle loop do not get removed and their resources released, as if something is still holding a reference to them.
Comment 8 Danielle Madeley 2006-02-05 02:55:02 UTC
The codebases for at least two of these applets has changed minimally. I suspect we're looking for a change in libpanel-applet, the panel or Bonobo.

I am marking this bug as release critical, because we've caused a pretty serious regression in here somewhere. I won't reassign this to libpanel-applet just yet.
Comment 9 Elijah Newren 2006-02-05 03:21:35 UTC
(In reply to comment #7)
> seems that the panel gets indeed killed, but the factories inside an idle loop
> do not get removed and their resources released, as if something is still
> holding a reference to them.

I don't see why you believe this is related to shutdown.  I did a 'gnome-session-remove gnome-panel' and the panel exited and no error was received.  I even waited about 10 seconds to be sure.  Then I ran 'gnome-panel &'.  When I did, the panel came up, and bug-buddy popped up telling me that gnome-dictionary-applet had again crashed with the same stack trace.
Comment 10 Danielle Madeley 2006-02-05 03:43:32 UTC
Elijah, did the applet factories shut down when you shut the panel down?

I've not had a lot of success in getting the applets to crash when I've had the factories in a debugger and killed the panel. The old factories shut down and new ones are started, which seems to support Emmanuele's race condition theory.

This is strange, is this due to optimisation?
  • #18 main
    at gdict-applet.c line 1306
  • #19 __libc_start_main
    at libc-start.c line 231

Comment 11 Elijah Newren 2006-02-06 21:32:49 UTC
(In reply to comment #10)
> Elijah, did the applet factories shut down when you shut the panel down?

Oh, I was assuming that they shut down automatically and that therefore a ten second wait would be enough to know that they had shut down.  Shows how much I know.  :)

> This is strange, is this due to optimisation?

I compile with the jhbuild defaults, which I assume are -g and -O2.  *shrug*
Comment 12 Danielle Madeley 2006-02-07 00:56:29 UTC
(In reply to comment #11)

> > Elijah, did the applet factories shut down when you shut the panel down?
> 
> Oh, I was assuming that they shut down automatically and that therefore a ten
> second wait would be enough to know that they had shut down.  Shows how much I
> know.  :)

They are meant to shut down automatically. When the last reference to the factory has been released, the factory should shut down. I am wondering if the factory has been put into some strange state due to it not shutting down cleanly.
Comment 13 Danielle Madeley 2006-02-07 04:33:03 UTC
Whee. I get much more exciting action on FC5t2. After removing panel from the session:

[davyd@fc5t2 ~]$ gnome-panel

** ERROR **: file orbit-object.c: line 149 (do_unref): assertion failed: (robj->refs < ORBIT_REFCOUNT_MAX && robj->refs > 0)
aborting...

[davyd@fc5t2 ~]$ gdb `which gnome-panel`
GNU gdb Red Hat Linux (6.3.0.0-1.94rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) r
Starting program: /usr/bin/gnome-panel
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xa4e000
[Thread debugging using libthread_db enabled]
[New Thread -1208785232 (LWP 2764)]

** ERROR **: file orbit-object.c: line 149 (do_unref): assertion failed:
(robj->refs < ORBIT_REFCOUNT_MAX && robj->refs > 0)
aborting...

Program received signal SIGTRAP, Trace/breakpoint trap.

Thread NaN (LWP 2764)

  • #0 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #1 g_log
    from /usr/lib/libglib-2.0.so.0
  • #2 g_assert_warning
    from /usr/lib/libglib-2.0.so.0
  • #3 ORBit_RootObject_duplicate_T
    from /usr/lib/libORBit-2.so.0
  • #4 CORBA_any__freekids
    from /usr/lib/libORBit-2.so.0
  • #5 CORBA_exception__copy
    from /usr/lib/libORBit-2.so.0
  • #6 CORBA_exception_free
    from /usr/lib/libORBit-2.so.0
  • #7 CORBA_exception_set
    from /usr/lib/libORBit-2.so.0
  • #8 CORBA_exception_set_system
    from /usr/lib/libORBit-2.so.0
  • #9 ORBit_small_invoke_stub
    from /usr/lib/libORBit-2.so.0
  • #10 ORBit_small_invoke_stub_n
    from /usr/lib/libORBit-2.so.0
  • #11 ORBit_c_stub_invoke
    from /usr/lib/libORBit-2.so.0
  • #12 Bonobo_Control_getProperties
    from /usr/lib/libbonobo-2.so.0
  • #13 bonobo_control_frame_get_control_property_bag
    from /usr/lib/libbonoboui-2.so.0
  • #14 panel_applet_frame_activated
    at panel-applet-frame.c line 1296
  • #15 bonobo_moniker_util_parse_name
    from /usr/lib/libbonobo-2.so.0
  • #16 bonobo_moniker_resolve_async_default
    from /usr/lib/libbonobo-2.so.0
  • #17 ORBit_small_get_connection_status
    from /usr/lib/libORBit-2.so.0
  • #18 giop_invoke_async
    from /usr/lib/libORBit-2.so.0
  • #19 giop_connection_handle_input
    from /usr/lib/libORBit-2.so.0
  • #20 link_connection_state_changed
    from /usr/lib/libORBit-2.so.0
  • #21 link_io_add_watch_fd
    from /usr/lib/libORBit-2.so.0
  • #22 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #23 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #25 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 main
    at main.c line 84

Comment 14 Danielle Madeley 2006-02-07 04:39:33 UTC
Hmm, seems that I had an out of date libwnck on this machine and that was causing some strife. With the exception of Tomboy choosing the crash, I've gone back to not being able to replicate this.
Comment 15 Danielle Madeley 2006-02-11 05:16:00 UTC
Here is another strange backtrace, this one from mixer_applet2:

*** glibc detected *** corrupted double-linked list: 0x00002aaaae9e5918 ***

Program received signal SIGABRT, Aborted.

(gdb) thread apply all bt

Thread 1 (Thread 46912593612976 (LWP 27013))

  • #0 raise
    from /lib/libc.so.6
  • #1 abort
    from /lib/libc.so.6
  • #2 __libc_message
    from /lib/libc.so.6
  • #3 malloc_consolidate
    from /lib/libc.so.6
  • #4 _int_malloc
    from /lib/libc.so.6
  • #5 malloc
    from /lib/libc.so.6
  • #6 g_malloc
    from /usr/lib/libglib-2.0.so.0
  • #7 g_object_new_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 link_connection_initiate
    from /usr/lib/libORBit-2.so.0
  • #9 giop_connection_initiate
    from /usr/lib/libORBit-2.so.0
  • #10 ORBit_object_get_connection
    from /usr/lib/libORBit-2.so.0
  • #11 ORBit_small_invoke_stub
    from /usr/lib/libORBit-2.so.0
  • #12 ConfigDatabase_remove_listener
    from /usr/lib/libgconf-2.so.4
  • #13 gconf_engine_notify_remove
    from /usr/lib/libgconf-2.so.4
  • #14 gconf_client_remove_dir
    from /usr/lib/libgconf-2.so.4
  • #15 panel_applet_get_type
    from /usr/lib/libpanel-applet-2.so.0
  • #16 panel_applet_get_type
    from /usr/lib/libpanel-applet-2.so.0
  • #17 g_object_unref
    from /usr/lib/libgobject-2.0.so.0
  • #18 bonobo_control_add_listener
    from /usr/lib/libbonoboui-2.so.0
  • #19 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #23 bonobo_object_unref
    from /usr/lib/libbonobo-2.so.0
  • #24 ORBit_small_invoke_adaptor
    from /usr/lib/libORBit-2.so.0
  • #25 ORBit_POAObject_post_invoke
    from /usr/lib/libORBit-2.so.0
  • #26 ORBit_POAObject_post_invoke
    from /usr/lib/libORBit-2.so.0
  • #27 ORBit_c_stub_invoke
    from /usr/lib/libORBit-2.so.0
  • #28 ORBit_handle_request
    from /usr/lib/libORBit-2.so.0
  • #29 giop_connection_handle_input
    from /usr/lib/libORBit-2.so.0
  • #30 link_connection_set_max_buffer
    from /usr/lib/libORBit-2.so.0
  • #31 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #32 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #33 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #34 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #35 bonobo_generic_factory_main_timeout
    from /usr/lib/libbonobo-2.so.0
  • #36 panel_applet_factory_main_closure
    from /usr/lib/libpanel-applet-2.so.0
  • #37 __libc_start_main
    from /lib/libc.so.6
  • #38 _start
    at ../sysdeps/x86_64/elf/start.S line 113

Don't have full debugging symbols yet, but do we have any idea what is causing this?
Comment 16 Danielle Madeley 2006-02-11 08:45:35 UTC
See also: bug #327992
Comment 17 Vincent Untz 2006-02-12 14:06:53 UTC
Can't reproduce. Is this still happening for someone here?
Comment 18 Kjartan Maraas 2006-02-26 16:19:24 UTC
I can't reproduce this with any of the applets that are mentioned in this bugreport.
Comment 19 Vincent Untz 2006-02-27 17:09:54 UTC
I can't reproduce either. Let's close it for now and reopen it if it starts happening again.
Comment 20 Karsten Bräckelmann 2006-09-03 15:23:35 UTC
*** Bug 354135 has been marked as a duplicate of this bug. ***
Comment 21 Kjartan Maraas 2007-04-10 14:55:56 UTC
*** Bug 344330 has been marked as a duplicate of this bug. ***
Comment 22 Kjartan Maraas 2007-04-10 14:56:21 UTC
*** Bug 422635 has been marked as a duplicate of this bug. ***
Comment 23 palfrey 2007-10-29 13:50:30 UTC
*** Bug 491223 has been marked as a duplicate of this bug. ***