shares-admin crashes on start when udev has been restarted without reboot

Bug #490694 reported by jkroll
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
liboobs
Fix Released
Undecided
Unassigned
liboobs (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: gnome-system-tools

starting "shares-admin" immediately segfaults.

ProblemType: Crash
Architecture: i386
Date: Tue Dec 1 07:44:21 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/shares-admin
NonfreeKernelModules: fglrx
Package: gnome-system-tools 2.28.1-0ubuntu2
ProcCmdline: shares-admin
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SegvAnalysis:
 Segfault happened at: 0xf60d50: mov (%edx,%esi,4),%eax
 PC (0x00f60d50) ok
 source "(%edx,%esi,4)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gnome-system-tools
StacktraceTop:
 ?? () from /usr/lib/liboobs-1.so.4
 g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
 ?? () from /usr/lib/libgobject-2.0.so.0
 ?? () from /usr/lib/liboobs-1.so.4
 g_object_newv () from /usr/lib/libgobject-2.0.so.0
Title: shares-admin crashed with SIGSEGV in g_type_create_instance()
Uname: Linux 2.6.31-15-generic i686
UserGroups: adm admin audio cdrom dialout lpadmin plugdev sambashare

Revision history for this message
jkroll (junk-mailbox) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:oobs_ifaces_config_init (config=0x9d2ec88) at oobs-ifacesconfig.c:194
g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
?? () from /usr/lib/libgobject-2.0.so.0
oobs_object_constructor (type=164919904,
g_object_newv () from /usr/lib/libgobject-2.0.so.0

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in gnome-system-tools (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote : Re: shares-admin crashed with SIGSEGV in g_type_create_instance()

Thanks for your report. I'd need more debugging to find the precise line that triggers the crash, since the stacktrace seems to have changed the line numbers a bit. Could you install debug package from [1] and run shared-admin in gdb? The procedure is:
gdb shares-admin
[crash]
ba
q

And then post the output of the ba command here. Thanks!

1: http://ddebs.ubuntu.com/pool/main/libo/liboobs/liboobs-1-4-dbgsym_2.22.2-0ubuntu1_i386.ddeb

Changed in gnome-system-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
jkroll (junk-mailbox) wrote :

After enabling apport, generating the crash report, and rebooting, I can't reproduce it any longer. Sorry.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Ah, from your description I thought was occurring all the time. So I'm forced to close the report, since the stacktrace we have is very strange: the reported line is not in the function it's said to be, and I am to believe the line number, I can't really find what could have lead to a crash, apart from libhal returning invalid data.

Changed in gnome-system-tools (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Johannes Kroll (j-kroll) wrote : Re: [Bug 490694] Re: shares-admin crashed with SIGSEGV in g_type_create_instance()

On Tue, 01 Dec 2009 12:59:38 -0000
Milan Bouchet-Valat <email address hidden> wrote:

> Ah, from your description I thought was occurring all the time. So I'm
> forced to close the report, since the stacktrace we have is very
> strange: the reported line is not in the function it's said to be, and I
> am to believe the line number, I can't really find what could have lead
> to a crash, apart from libhal returning invalid data.

It did crash several times before, but not after rebooting. Now that you
mentioned Hal, I remember that I restarted udev in that session.
And indeed, I can reproduce the crash like this:

$ sudo stop udev
udev stop/waiting
$ sudo start udev
udev start/running, process 7356
$ shares-admin
Segmentation fault (core dumped)

Do you think I should open another bug report about this? For another
package?

Regards,
Johannes

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote : Re: shares-admin crashed with SIGSEGV in g_type_create_instance()

Interesting! Could you simply try the steps I described in my first comment? We must find out what's going on before reporting this against HAL. I may well be that liboobs is doing something bad here.

Changed in gnome-system-tools (Ubuntu):
status: Invalid → Incomplete
summary: - shares-admin crashed with SIGSEGV in g_type_create_instance()
+ shares-admin crashes on start when udev has been restarted without
+ reboot
Revision history for this message
Johannes Kroll (j-kroll) wrote : Re: [Bug 490694] Re: shares-admin crashed with SIGSEGV in g_type_create_instance()
Download full text (3.7 KiB)

On Tue, 01 Dec 2009 13:23:37 -0000
Milan Bouchet-Valat <email address hidden> wrote:

> Interesting! Could you simply try the steps I described in my first
> comment? We must find out what's going on before reporting this against
> HAL. I may well be that liboobs is doing something bad here.

Here's the gdb output:

$ gdb shares-admin
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/shares-admin...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/shares-admin
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
hal_context_get_initial_devices (config=0x80aec88) at oobs-ifacesconfig.c:194
194 oobs-ifacesconfig.c: No such file or directory.
 in oobs-ifacesconfig.c
(gdb) ba
#0 hal_context_get_initial_devices (config=0x80aec88)
    at oobs-ifacesconfig.c:194
#1 init_hal_context (config=0x80aec88) at oobs-ifacesconfig.c:233
#2 oobs_ifaces_config_init (config=0x80aec88) at oobs-ifacesconfig.c:246
#3 0x0020697f in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#4 0x001eb748 in ?? () from /usr/lib/libgobject-2.0.so.0
#5 0x00e8410a in oobs_object_constructor (type=134969616,
    n_construct_properties=1, construct_params=0x80b7910) at oobs-object.c:210
#6 0x001ecb62 in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#7 0x001ed5f1 in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#8 0x001ed70e in g_object_new () from /usr/lib/libgobject-2.0.so.0
#9 0x00e95d0b in oobs_ifaces_config_get () at oobs-ifacesconfig.c:815
#10 0x08052a33 in ?? ()
#11 0x0020697f in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#12 0x001eb748 in ?? () from /usr/lib/libgobject-2.0.so.0
#13 0x08055655 in ?? ()
#14 0x08052993 in ?? ()
#15 0x001ecb62 in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#16 0x001ed5f1 in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#17 0x001ed70e in g_object_new () from /usr/lib/libgobject-2.0.so.0
#18 0x080521d6 in ?? ()
#19 0x08052bc6 in ?? ()
#20 0x00a4ab56 in __libc_start_main (main=0x8052b40, argc=1,
---Type <return> to continue, or q <return> to quit---
    ubp_av=0xbffff314, init=0x8056e60, fini=0x8056e50,
    rtld_fini=0x236d20 <_dl_fini>, stack_end=0xbffff30c) at libc-start.c:220
#21 0x0804e3a1 in ?? ()
(gdb) q

BTW, after restarting udev, Xfce4's "Governor Plugin", which allows to
change the CPU governor, exits after printing the message:
"Could not find a device able to handle cpufreq control"
Don't know if this is related, or relevant... Looks to me like udev
doesn't handle being restarted properly, and liboobs crashing in turn.

(I tried disabling udev in the first place because it prevents my second
harddrive from spinning down. The HD is unmounted and unused, but I had
...

Read more...

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Sadly gdb doesn't seem to find the source file, which does not allow us to get details about the crash. From what I see in the code, we could crash if libhal returns an array without telling us its real size. We could check that the code in libhal is not buggy in that regard, but anyway HAL is now deprecated and I guess we should remove the use of libhal here. Not sure somebody will do that, though.

Anyway, I really don't think disabling udev is a good idea. Granted, shares-admin should not crash in that case, but udev should be fixed not to wake up your drive.

Changed in gnome-system-tools (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

OK, I've finally found http://bugs.gentoo.org/278760 which explains that libhal returns NULL when no devices are found, not even setting the number of devices to 0. So we should check that before trying to add them to our internal list.

I don't know why shares-admin needs the list of network interfaces at all, actually. Could we get rid of this in the first place?

Changed in gnome-system-tools (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Here's a patch that you can apply against the liboobs package if you want to check that it works. It seems to work here, but I never get the crash, even if the error was set.

affects: gnome-system-tools (Ubuntu) → liboobs (Ubuntu)
Changed in liboobs (Ubuntu):
status: Triaged → Incomplete
status: Incomplete → Triaged
Changed in liboobs:
status: New → Fix Committed
Revision history for this message
jkroll (junk-mailbox) wrote :

Hi,

I agree that udev should be fixed in the first place, it has no reason to touch the sleeping drive.

Your patch fixes the crash for me:

$ $LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH shares-admin

(shares-admin:16955): Liboobs-WARNING **: Could not find any network device on the system: The name org.freedesktop.Hal was not provided by any .service files.

The shares-admin window shows up, and I can edit shares. Thanks.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Fix released and uploaded for a long time.

Changed in liboobs:
status: Fix Committed → Fix Released
Changed in liboobs (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.