GNOME Bugzilla – Bug 530316
gnome-keyring-daemon crashed with SIGSEGV in location_manager_hal_init()
Last modified: 2008-05-19 12:30:23 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/218434 "... The occurrence of this bug seems most prevalent on USB, Compact Flash (attached via IDE) and SCSI based boot devices. Debug -------- I have attached gdb to gnome-keyring-manager and captured a full backtrace, register info and tread backtrace at the point of SEGV. As I ran gdb pointed at the sources for keyring-daemon I have also captured 'list'. On the console I get the following output: >** Message: adding removable location: volume_label_Ubuntu_8_04_i386 at /media/cdrom0 >** Message: adding removable location: volume_uuid_87cfbf2f_6fcb_42cb_95ef_92e3aec6d4f1 at / > >** (gnome-keyring-daemon:6249): WARNING **: location device 'FILE' already registered at: / > >Program received signal SIGSEGV, Segmentation fault. It seems that gnome-keyring-daemon is being screwed up while it tries to probe the HAL about storage - This might explain the apparent correlation between boot disk type and whether one sees the bug. We die in hal_device_property() at gkr-location.c:324 323 locvol = g_hash_table_lookup (pv->volumes_by_name, name); 324 locvol->hal_volume = TRUE; It seems that we might benefit from some kind of bounds check in this code as we seem to be taking it as gospel that 'locvol' will always return a valid address. The SEGV happens while executing the instruction @ 0x080759c7 - This has been consistent throughout my old /var/log/messages files: 0x080759c2 <hal_device_property+834>: call 0x804f8e0 <g_hash_table_lookup@plt> 0x080759c7 <hal_device_property+839>: movl $0x1,0x14(%eax) 0x080759ce <hal_device_property+846>: jmp 0x80758a5 <hal_device_property+549> So in order to set locvol->hal_volume=TRUE we take $eax + 0x14, dereference it and write a gboolean there. This is fine for the first few volumes and $eax always = 0x80ca828 which I trust is the valid address of a GkrLocationVolume structure. But when I get a SEGV $eax = 0 ..." The corresponding stacktrace: ""#0 hal_device_property (hal_ctx=0x80af768, udi=0x80b0138 "/org/freedesktop/Hal/devices/volume_uuid_744a680e_31d7_4045_bc59_111f6592138f", key=0x808faf4 "volume.is_mounted", is_removed=0, is_added=1) at gkr-location.c:324 324 gkr-location.c: No such file or directory. in gkr-location.c (gdb) bt
+ Trace 196316
Thanks for looking into that so deeply. Fixed. This will be included in 2.22.2
Thanks to everyone for finding a fix. When might 2.22.2 be released?
May 28th: http://live.gnome.org/TwoPointTwentythree