Launchpad has imported 7 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=72138.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2013-11-28T22:25:15+00:00 Sebastien Bacher wrote:

Created attachment 89967
reset the error to NULL, so the next call is working

That bug exists in 5.16 but doesn't apply to trunk due to some
refactoring

Way to trigger it:
- create a user/.local/share/telepathy where the user has no write rights
- try running mission-control
- see the warnings and segfault

Stacktrace
#0  0xb77d1424 in __kernel_vsyscall ()
#1  0xb7039aff in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb703d083 in __GI_abort () at abort.c:90
#3  0xb7076a95 in __libc_message (do_abort=do_abort@entry=2, 
    fmt=fmt@entry=0xb717a0d0 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
#4  0xb70817c2 in malloc_printerr (action=<optimized out>, 
    str=<optimized out>, ptr=0x863b728) at malloc.c:4923
#5  0xb7082510 in _int_free (av=0xb71bb440 <main_arena>, p=0x863b720, 
    have_lock=0) at malloc.c:3779
#6  0xb72265d0 in g_free (mem=mem@entry=0x863b728)
    at /build/buildd/glib2.0-2.38.1/./glib/gmem.c:197
#7  0x08085bdd in _commit (self=self@entry=0x85da000, am=am@entry=0x8638a78, 
    account=account@entry=0x0) at mcd-account-manager-default.c:259
#8  0x08085ec0 in _list (self=0x85da000, am=0x8638a78)
    at mcd-account-manager-default.c:364
#9  0xb7797442 in mcp_account_storage_list (storage=storage@entry=0x85da000, 
    am=am@entry=0x8638a78) at account-storage.c:952
#10 0x0808376e in mcd_storage_load (self=0x8638a78) at mcd-storage.c:740
#11 0x08070937 in _mcd_account_manager_constructed (obj=0x85d8680)
    at mcd-account-manager.c:1682

The code does g_error_free() an error to reuse it, but without resetting
it to NULL, which makes the next call not set a new one and the
g_warning hit an invalid read.

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/7

------------------------------------------------------------------------
On 2013-11-28T22:53:54+00:00 Xavier Claessens wrote:

You should use g_clear_error() instead. I'm actually tempted to do a big
s/g_error_free/g_clear_error/ and ban g_error_free() in our coding style
checker, like we already banned some _free() in favor of their
corresponding _unref().

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/8

------------------------------------------------------------------------
On 2013-11-29T12:54:02+00:00 Simon McVittie wrote:

(In reply to comment #1)
> You should use g_clear_error() instead

I agree...

> I'm actually tempted to do a big s/g_error_free/g_clear_error/

... but I think this is going too far - it's often obvious that the
error is both non-NULL and no longer used, for instance in this idiom
for dealing with errors that there's no way to signal (yes that's a
design flaw, but often one that we're stuck with medium-term):

static void
foo (void)
{
  GError *error = NULL;

  if (do_a_thing (&error))
    {
      WARNING ("%s", error->message);
      g_error_free (error);
    }
}

or when interacting with dbus-glib:

static void
do_something_on_dbus (DBusGMethodInvocation *context)
{
  GError *error = NULL;

  if (do_something (&error))
    {
      dbus_g_method_return (context);
    }
  else
    {
      dbus_g_method_return_error (context, error);
      g_error_free (error);
    }
}

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/9

------------------------------------------------------------------------
On 2013-12-04T17:36:16+00:00 Sebastien Bacher wrote:

Created attachment 90260
new version using g_clear_error

ok, updated to use g_clear_error, I've only done that specific change
and not tried to replace other uses

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/10

------------------------------------------------------------------------
On 2013-12-04T17:58:43+00:00 Simon McVittie wrote:

Comment on attachment 90260
new version using g_clear_error

Review of attachment 90260:
-----------------------------------------------------------------

Looks good to me.

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/11

------------------------------------------------------------------------
On 2013-12-04T18:27:11+00:00 Simon McVittie wrote:

Comment on attachment 90260
new version using g_clear_error

Review of attachment 90260:
-----------------------------------------------------------------

Actually, I take that back. This is g_clear_error (error), it needs to
be g_clear_error (&error). Did you test this?

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/12

------------------------------------------------------------------------
On 2013-12-04T18:30:03+00:00 Simon McVittie wrote:

Fixed in git for 5.16.1; I added the necessary "&" to make it work.

Reply at: https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-
control-5/+bug/1143463/comments/13


** Changed in: mission-control-5
       Status: Unknown => Fix Released

** Changed in: mission-control-5
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to telepathy-mission-control-5 in Ubuntu.
https://bugs.launchpad.net/bugs/1143463

Title:
  mission-control-5 crashed with SIGABRT in __libc_message()

Status in Telepathy Mission Control 5:
  Fix Released
Status in “telepathy-mission-control-5” package in Ubuntu:
  Confirmed

Bug description:
  crash

  ProblemType: Crash
  DistroRelease: Ubuntu 13.04
  Package: telepathy-mission-control-5 1:5.14.0-0ubuntu1
  ProcVersionSignature: Ubuntu 3.8.0-9.18-generic 3.8.1
  Uname: Linux 3.8.0-9-generic i686
  ApportVersion: 2.8-0ubuntu4
  Architecture: i386
  Date: Sun Mar  3 13:23:08 2013
  ExecutablePath: /usr/lib/telepathy/mission-control-5
  InstallationDate: Installed on 2012-04-17 (320 days ago)
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
  MarkForUpload: True
  ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.8.0-9-generic 
root=UUID=98089200-ea70-444a-a0d7-d13d5821abe9 ro quiet splash vt.handoff=7
  ProcEnviron:
   SHELL=/bin/false
   XDG_RUNTIME_DIR=<set>
   PATH=(custom, no user)
   LANGUAGE=en_IN:en
   LANG=en_IN
  Signal: 6
  SourcePackage: telepathy-mission-control-5
  StacktraceTop:
   raise () from /lib/i386-linux-gnu/libc.so.6
   abort () from /lib/i386-linux-gnu/libc.so.6
   ?? () from /lib/i386-linux-gnu/libc.so.6
   ?? () from /lib/i386-linux-gnu/libc.so.6
   ?? () from /lib/i386-linux-gnu/libc.so.6
  Title: mission-control-5 crashed with SIGABRT in raise()
  UpgradeStatus: Upgraded to raring on 2012-08-19 (196 days ago)
  UserGroups:

To manage notifications about this bug go to:
https://bugs.launchpad.net/mission-control-5/+bug/1143463/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to