GNOME Bugzilla – Bug 608126
core dump when processing gajim plugin if pidgin not start
Last modified: 2010-06-09 16:43:52 UTC
$nautilus-sendto ~/.profile Init pidgin plugin Init evolution plugin Init removable-devices plugin Init nautilus burn plugin Init gajim plugin Segmentation Fault (core dumped) $pstack core core 'core' of 26139: nautilus-sendto /export/home/halton/.profile fe094ae2 strcmp (fdb3c87c, fd31c87c, 0, fe225ffc) + ea fe226011 g_str_equal (fdb3c87c, fd31c87c, fd3059c8, fe1f4756) + 21 fe1f47c1 g_hash_table_lookup (8069a30, fd31c87c, fd32ddb4, fe1ed7be) + 79 fe1ed850 g_quark_from_static_string (fd31c87c, fd32ce40, 804776c, fd3141fe) + a0 fd314223 dbus_g_type_metadata_data_quark (fd316a8f, fd32ce40, 804778c, fd31428a, 14, fd32d9f8) + 2f fd314248 set_type_metadata (14, fd32d9f8, 804779c, fd31426c) + 18 fd31428a register_basic (62, fd32d9f8) + 2a fd3142ca _dbus_g_value_types_init (80477d4, fefc47a4, fd3508f0, 78, fd332659, fd33262f) + 36 fd30aaf5 dbus_g_bus_get (0, 8047800) + 59 fd332659 init_dbus (feffb804, fd332af9, 1, 8047848, 805510b, 80e7848) + 39 fd332b74 init (80e7848, 0) + 84 0805510b nautilus_sendto_plugin_dir_process (8055c70, 0) + 1ab 080552d0 nautilus_sendto_plugin_init (feffb804, 805587f, 0, 8068308, 8047974, 80478a8) + 140 0805576c main (1, 80478b4, 80478c0, 80534ff) + 10c 0805355d _start (2, 80479dc, 0, 0, 8047a09, 8047a2f) + 7d
This core dumps happens at line 137 of gajim.c connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); If I remove the pidgin plugin, this core disappears. This is weird. Does not dbus allow two connections at one time?
If I start pidgin before run nautilus-sendto (not removing piding plugin), this bug disappear also.
A hacking fix is removing the line from src/nautilus-sendto-command.c if (!p->info->never_unload) g_module_close (p->module);
If I add -ldbus-glib-1 to nautilus-sendto, this bug disappear. libdbus-glib-1.so is get loaded when g_module_open libnstpidgin.so, and get unloaded by g_module_close(libnstpidgin.so) if pidgin is not started. When g_module_open libnstgajim.so, libdbus-glib-1.so is loaded again, this crash happens when calling dbus_g_bus_get(). That's why the above three situation won't cause the crash. I'm guessing this is the problem inside dbus-glib.
A strange thing happens now, I reboot and this bug disappears. The only difference is gajim loaded first. $ /usr/bin/nautilus-sendto $HOME/.profile Init gajim plugin Init removable-devices plugin Init evolution plugin Init pidgin plugin Init nautilus burn plugin Any comments?
Can't reproduce the problem here. Thanks for taking the time to report this bug. Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so and reopen this bug or report a new one. Thanks in advance!
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
This bug is still reproducible if the pidgin plugin launched first and no pidgin is alive, then launch gajim, there will be core dump. Refer to OpenSolaris bug for detail, http://defect.opensolaris.org/bz/show_bug.cgi?id=15112 I do not how to tell g_dir_read_name() load pidgin first, but it happens some cases. So I'd like to reopen this bug.
I get the reason why this bug happens so far only on Solaris. nautilus-sendto link to lgconf-2, libgconf-2.so links to libdbus-glib-1.so on Linux, while it does not on Solaris. If I make a hack to launch pidin first, this bug happens on Solaris 100%. diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c index 094fe62..d6166f4 100644 --- a/src/nautilus-sendto-command.c +++ b/src/nautilus-sendto-command.c @@ -686,7 +686,9 @@ nautilus_sendto_plugin_init (void) g_error_free (err); return FALSE; } - while ((item = g_dir_read_name(dir))) { + char *arr[] = {"pidgin", "evolution", "gajim", NULL}; + int i = 0; + while (item = arr[i++]) { char *plugindir; plugindir = g_strdup_printf ("plugins/%s/.libs/", item);
(In reply to comment #9) > I get the reason why this bug happens so far only on Solaris. nautilus-sendto > link to lgconf-2, libgconf-2.so links to libdbus-glib-1.so on Linux, while it > does not on Solaris. It doesn't. $ ldd /usr/lib64/libgconf-2.so linux-vdso.so.1 => (0x00007fff5bfe0000) libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x0000003911c00000) libORBit-2.so.0 => /usr/lib64/libORBit-2.so.0 (0x0000003914800000) libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x0000003c7a800000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003c74800000) libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x0000003911800000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000003911000000) libc.so.6 => /lib64/libc.so.6 (0x0000003c74000000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003c74c00000) libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x0000003911400000) librt.so.1 => /lib64/librt.so.1 (0x0000003c75000000) libcap-ng.so.0 => /lib64/libcap-ng.so.0 (0x0000003c7a400000) /lib64/ld-linux-x86-64.so.2 (0x0000003c73c00000)
On my Ubuntu 10.04, it does halton@hp-dv2000:$ ldd /usr/lib/libgconf-2.so|grep dbus-glib libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2 (0x003f2000) Bastin, are you on other distro and could you check whether nautilus-sendto has link to libdbus-glib? $ ldd /usr/bin/nautilus-sendto |grep dbus-glib If so, I guess you'll meet this bug 100% if apply the hacking code in comment #9. Note, to get this core dump, you need run "./nautilus-sendto <your_file>" under src directory.
If I change pidgin plugin's never_unload property to TRUE (Just like gajim does). This bug is resolved, can we fix this bug as this way? diff --git a/src/plugins/pidgin/pidgin.c b/src/plugins/pidgin/pidgin.c index 6cfe98a..319fdbd 100644 --- a/src/plugins/pidgin/pidgin.c +++ b/src/plugins/pidgin/pidgin.c @@ -463,7 +463,7 @@ NstPluginInfo plugin_info = { "pidgin", N_("Instant Message (Pidgin)"), NULL, - FALSE, + TRUE, NAUTILUS_CAPS_NONE, init, get_contacts_widget,
Ping, is the change in comment #12 acceptable?
Fixed in gnome-2-28 and master. I'll remove the ability to unload plugins in the next revision of the plugin API.