ggl-gtk crashed with SIGSEGV in ggadget::dbus::DBusProxy::CallMethod()

Bug #319874 reported by Roland Dreier
68
This bug affects 5 people
Affects Status Importance Assigned to Milestone
google-gadgets (Ubuntu)
Fix Released
Medium
jaduncan

Bug Description

Just installed google-gadgets-gtk and selected the google gadgets chooice in the applications menu. Apparently crashed during startup without displaying anything or doing anything I could see.

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/ggl-gtk
Package: google-gadgets-gtk 0.10.3-1ubuntu1
ProcCmdline: /usr/bin/ggl-gtk
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 11
SourcePackage: google-gadgets
StacktraceTop:
 ggadget::dbus::DBusProxy::CallMethod ()
 ggadget::framework::linux_system::Machine::Machine ()
 ?? ()
 ?? ()
 _init ()
Title: ggl-gtk crashed with SIGSEGV in ggadget::dbus::DBusProxy::CallMethod()
Uname: Linux 2.6.28-4-generic i686
UserGroups: adm admin floppy fuse

Tags: apport-crash
Revision history for this message
Roland Dreier (roland.dreier) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:Machine (this=0xb67e5340)
global constructors keyed to linux_system_framework.cc ()
__do_global_ctors_aux ()
_init ()
call_init () from /lib/ld-linux.so.2

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Changed in google-gadgets:
importance: Undecided → Medium
Revision history for this message
Roland Dreier (roland.dreier) wrote :

This crash is occurring because ggl-gtk is not able to connect to the DBus system bus and it ends up blindly trying to invoke a method on the uninitialized NULL pointer for its system bus object. In Machine::Machine(), the code calls DBusProxy::NewSystemProxy(), which fails internally (and silently) and just returns NULL, so the first CallMethod() operation gets a SEGV.

I enabled more tracing, and I see that NewSystemProxy is failing when trying to invoke the Ping method on the system bus; the code

      if (dbus_error_is_set(&error))
        DLOG("Failed to retrieve reply from %s|%s, error: %s, %s",
     name_.c_str(), path_.c_str(), error.name, error.message);

in RetrieveReplyMessage() in dbus_proxy.cc prints:

Failed to retrieve reply from org.freedesktop.Hal|/org/freedesktop/Hal/devices/computer, error: org.freedesktop.DBus.Error.AccessDenied, Rejected send message, 1 matched rules; type="method_call", sender=":1.168" (uid=1000 pid=22508 comm="ggl-gtk ") interface="org.freedesktop.DBus.Peer" member="Ping" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3267 comm="/usr/sbin/hald "))

which is not surprising since ggl-gtk is an unprivileged app trying to use the system bus.

Revision history for this message
Roland Dreier (roland.dreier) wrote :

It seems that the newer upstream release 0.10.5 has code to check the return value of NewSystemProxy() and continue without crashing. This version is already packaged in the Debian repository, and I tried building it on my Jaunty system. On startup, it prints

  No permissions to access D-Bus.

but at least doesn't crash.

So the best way forward seems to be to merge the 0.10.5 package for Jaunty, since the Ubuntu-specific changes look minimal and easy to merge, and the current 0.10.3 package is completely broken.

Revision history for this message
Roland Dreier (roland.dreier) wrote :

I see that 0.10.5-0.1ubuntu1 is now in the archive, which has the fix for this bug. So this bug can probably be marked as resolved now.

Revision history for this message
jaduncan (jaduncan) wrote :

Confirmed that this error does not affect me now.

Revision history for this message
jaduncan (jaduncan) wrote :

Fix inherited from Debian

Changed in google-gadgets:
assignee: nobody → jaduncan
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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