devkit segfaults in do_show_info()
gibboris at gmail.com
gibboris at gmail.com
Mon Oct 5 15:18:37 PDT 2009
[patch attached about the segfault]
About the NULL values :
dbus_g_proxy_call doesn't succeed :
------------------------------------
$ /usr/libexec/devkit-disks-daemon
(devkit-disks-daemon:346): devkit-disks-daemon-WARNING **: Failed to acquire org.freedesktop.DeviceKit.Disks
(devkit-disks-daemon:346): devkit-disks-daemon-WARNING **: Could not acquire name; bailing out
------------------------------------
so after having installed consolekit devkit-disks-dameon feels better
anyway when :
$ devkit-disks --show-info /dev/sda7
devkit-disks-daemon throws :
** (devkit-disks-daemon:9668): WARNING **: introspection data references non-existing property NativePath
[ ... same message for each property follow ... ]
(I can't even find this g_warning in the Devicekit* sources)
Raph
On Thu, Oct 01, 2009 at 01:22:56PM +0200, gibboris at gmail.com wrote:
> As a precision :
> dbus_g_proxy_call() returns 0 but hash_table contains 0
> entry.
> It's maybe related to the fact that
> props->device_file_by_id[n]
> and
> props->device_file_by_path[n]
> are NULL => segfault
>
> the "for" loop should probably contains something like :
> props->device_file_by_id != NULL
> and
> props->device_file_by_path != NULL
> (do_show_info, lines 1000-1010)
>
> as it done with, eg, props->device_mount_paths.
> (anyway it doesn't explain why I get NULL values everywhere)
>
> Raph
>
> On Tue, Sep 29, 2009 at 08:20:35PM +0200, gibboris at gmail.com wrote:
> > Hi,
> > I experience segault using devicekit-disks 007
> > (both gentoo ebuild of gnome overlay and from sources)
> >
> > It probably stops in :
> > "for (n = 0; props->device_file_by_id[n] != NULL; n++)"
> > of do_show_info() in devkit-disks.c
> >
> > The backtrace is helpless :
> > #0 0x0000000000403637 in do_show_info ()
> > #1 0x0000000000404be6 in main ()
> > ----
> > 0x000000000040362e <do_show_info+334>: callq 0x4019b0 <g_print at plt>
> > 0x0000000000403633 <do_show_info+339>: mov 0x30(%rbx),%rax
> > 0x0000000000403637 <do_show_info+343>: mov (%rax),%rsi
> > 0x000000000040363a <do_show_info+346>: test %rsi,%rsi
> > 0x000000000040363d <do_show_info+349>: je 0x403667 <do_show_info+391>
> > 0x000000000040363f <do_show_info+351>: xor %r12d,%r12d
> > 0x0000000000403642 <do_show_info+354>: nopw 0x0(%rax,%rax,1)
> > 0x0000000000403648 <do_show_info+360>: xor %eax,%eax
> > 0x000000000040364a <do_show_info+362>: mov $0x405dc8,%edi
> > 0x000000000040364f <do_show_info+367>: inc %r12d
> > ----
> > I can't --dump as it segfault after the "device-file:"
> > of the first device (sda)
> >
> > ---------------------
> > Commenting both loops let's devkit-disks continue ... but ...
> > with NULL|0|no|01 jan. 1970|... values for all devices
> >
> > dbus-monitor --system --monitor only throws two times :
> > signal sender=org.freedesktop.DBus -> dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
> > string ":1.123"
> > string ":1.123"
> > string ""
> > ______
> > Adding some debug infos I come into :
> >
> > in device_properties_get() : call to :
> > g_hash_table_foreach (hash_table, (GHFunc) collect_props, props);
> > and in collect_props() I put a :
> > g_warning("[COLLECT_PROPS]\n");
> > which does NOT appears (if you know about a way to debug there so
> > I can track this down ...)
> >
> > Wish it helps
> >
> > Raph
> > _______________________________________________
> > devkit-devel mailing list
> > devkit-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/devkit-devel
> _______________________________________________
> devkit-devel mailing list
> devkit-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/devkit-devel
-------------- next part --------------
--- tools/devkit-disks.c.old 2009-10-05 23:34:32.000000000 +0200
+++ tools/devkit-disks.c 2009-10-05 23:32:01.000000000 +0200
@@ -963,9 +963,9 @@
props->device_major,
props->device_minor);
g_print (" device-file: %s\n", props->device_file);
- for (n = 0; props->device_file_by_id[n] != NULL; n++)
+ for (n = 0; props->device_file_by_id!=NULL && props->device_file_by_id[n] != NULL; n++)
g_print (" by-id: %s\n", (char *) props->device_file_by_id[n]);
- for (n = 0; props->device_file_by_path[n] != NULL; n++)
+ for (n = 0; props->device_file_by_path!=NULL && props->device_file_by_path[n] != NULL; n++)
g_print (" by-path: %s\n", (char *) props->device_file_by_path[n]);
g_print (" detected at: %s\n", time_buf);
g_print (" system internal: %d\n", props->device_is_system_internal);
More information about the devkit-devel
mailing list