mission-control-5 crashed with SIGABRT in g_assertion_message()

Bug #1059233 reported by Perfecto
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Empathy
Fix Released
Medium
apparmor (Ubuntu)
Won't Fix
Undecided
Unassigned
empathy (Ubuntu)
Fix Released
Medium
Unassigned
libaccounts-glib (Ubuntu)
Invalid
Undecided
Unassigned
telepathy-mission-control-5 (Ubuntu)
Invalid
High
Unassigned

Bug Description

Nothing more.

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: telepathy-mission-control-5 1:5.13.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.5.3-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Sun Sep 30 21:28:16 2012
ExecutablePath: /usr/lib/telepathy/mission-control-5
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.5.0-16-generic root=UUID=c4fd79ed-d733-4333-a5d7-83d161109544 ro quiet splash vt.handoff=7
ProcEnviron:
 SHELL=/bin/false
 PATH=(custom, no user)
 LANGUAGE=es_ES:en
 LANG=es_ES.UTF-8
Signal: 6
SourcePackage: telepathy-mission-control-5
StacktraceTop:
 g_assertion_message () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_assertion_message_expr () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? () from /usr/lib/mission-control-plugins.0/mcp-account-manager-uoa.so
 g_object_newv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: mission-control-5 crashed with SIGABRT in g_assertion_message()
UpgradeStatus: Upgraded to quantal on 2012-09-27 (2 days ago)
UserGroups:

Revision history for this message
Perfecto (perfecto) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_assertion_message (domain=domain@entry=0x0, file=file@entry=0x7f3bfa3ae848 <Address 0x7f3bfa3ae848 out of bounds>, line=line@entry=91, func=func@entry=0x7f3bfa3ae900 <Address 0x7f3bfa3ae900 out of bounds>, message=<optimized out>) at /build/buildd/glib2.0-2.34.0/./glib/gtestutils.c:1877
 g_assertion_message_expr (domain=0x0, file=0x7f3bfa3ae848 <Address 0x7f3bfa3ae848 out of bounds>, line=91, func=0x7f3bfa3ae900 <Address 0x7f3bfa3ae900 out of bounds>, expr=<optimized out>) at /build/buildd/glib2.0-2.34.0/./glib/gtestutils.c:1888
 ?? ()
 ?? ()
 ?? ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in telepathy-mission-control-5 (Ubuntu):
status: New → Invalid
Revision history for this message
Apport retracing service (apport) wrote : Crash report cannot be processed

Thank you for your report!

However, processing it in order to get sufficient information for the
developers failed (it does not generate a useful symbolic stack trace). This
might be caused by some outdated packages which were installed on your system
at the time of the report:

outdated debug symbol package for initscripts: package version 2.88dsf-13.10ubuntu13 dbgsym version 2.88dsf-13.10ubuntu11.1
outdated debug symbol package for libecryptfs0: package version 100-0ubuntu1 dbgsym version 96-0ubuntu3
outdated debug symbol package for libstdc++6: package version 4.7.2-2ubuntu1 dbgsym version 4.6.3-1ubuntu5

Please upgrade your system to the latest package versions. If you still
encounter the crash, please file a new report.

Thank you for your understanding, and sorry for the inconvenience!

tags: removed: need-amd64-retrace
tags: added: running-unity
Revision history for this message
Iain Lane (laney) wrote :

I'm providing a trace myself.

Changed in telepathy-mission-control-5 (Ubuntu):
status: Invalid → Triaged
importance: Undecided → High
Revision history for this message
Iain Lane (laney) wrote :

Pasting my comments from the dupe.

Starting program: /usr/lib/telepathy/mission-control-5
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

(process:23949): accounts-glib-WARNING **: Error opening accounts DB: unable to open database file

(process:23949): accounts-glib-CRITICAL **: ag_manager_new_for_service_type: assertion `AG_IS_MANAGER (manager)' failed

(process:23949): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:23949): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(process:23949): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:23949): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
[New Thread 0x7ffbf6a6b700 (LWP 23950)]
**
ERROR:empathy-webcredentials-monitor.c:91:empathy_webcredentials_monitor_constructed: assertion failed: (AG_IS_MANAGER (self->priv->manager))

Program received signal SIGABRT, Aborted.

Revision history for this message
Iain Lane (laney) wrote :

(gdb) break empathy-webcredentials-monitor.c:91
Breakpoint 3 at 0x7ffbf800a059: file empathy-webcredentials-monitor.c, line 91.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/lib/telepathy/mission-control-5
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[…]
Breakpoint 3, empathy_webcredentials_monitor_constructed (object=0x106fc80)
    at empathy-webcredentials-monitor.c:91
91 empathy-webcredentials-monitor.c: No such file or directory.
(gdb) print self->priv->manager
$5 = (AgManager *) 0x0

Revision history for this message
Iain Lane (laney) wrote :

(gdb) print ag_manager_new_for_service_type ("IM")

(process:26835): accounts-glib-WARNING **: Error opening accounts DB: unable to open database file

(process:26835): accounts-glib-CRITICAL **: ag_manager_new_for_service_type: assertion `AG_IS_MANAGER (manager)' failed
$4 = 0

so it's because this fails. Let's see why that might be.

Revision history for this message
Iain Lane (laney) wrote :

I tracked this down to a failure to open the sqlite3 DB in libaccounts-glib (ag-manager.c)

,----
| ret = sqlite3_open (filename, &priv->db);
| g_free (filename);
|
| if (ret != SQLITE_OK)
| {
| if (priv->db)
| {
| g_warning ("Error opening accounts DB: %s",
| sqlite3_errmsg (priv->db));
| sqlite3_close (priv->db);
| priv->db = NULL;
| }
| return FALSE;
| }
`----

and constructed a C program to reproduce it (attached). Modify the URL to match
yours and compile with

,----
| gcc -g `pkg-config --cflags sqlite3` test.c `pkg-config --libs sqlite3`
`----

You'll see that it fails to open and gives an error. In my case it returned 14
(unable to open file). Then if you change sqlite3_open to sqlite3_open16 you'll
be able to open the file again.

I'm going to try making this change in libaccounts-glib now.

Revision history for this message
Iain Lane (laney) wrote :

Hmm, no, that was a red herring sadly. If I specify the file as a path instead of a URI in my example then it always succeeds.

Revision history for this message
Iain Lane (laney) wrote :

OK I basically duplicated the first half of libaccounts-glib's open_db() into my example and it still reliably works.

Revision history for this message
Iain Lane (laney) wrote :

in my example; open("/home/laney/.config/libaccounts-glib/accounts.db", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 3

Revision history for this message
Iain Lane (laney) wrote :

strace:

open("/home/laney/.config/libaccounts-glib/accounts.db", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = -1 EACCES (Permission denied)
open("/home/laney/.config/libaccounts-glib/accounts.db", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Do you have any apparmor denials?

Revision history for this message
Iain Lane (laney) wrote :

Yes, that's a good hint. Thanks!

Oct 4 11:56:30 raleigh kernel: [11256.440807] type=1400 audit(1349348190.236:43): apparmor="DENIED" operation="open" parent=32517 profile="/usr/lib/telepathy/mission-control-5" name="/srv/home/laney/.config/libaccounts-glib/accounts.db" pid=32519 comm="mission-control" requested_mask="rwc" denied_mask="rwc" fsuid=1000 ouid=1000
Oct 4 11:56:30 raleigh kernel: [11256.440821] type=1400 audit(1349348190.236:44): apparmor="DENIED" operation="open" parent=32517 profile="/usr/lib/telepathy/mission-control-5" name="/srv/home/laney/.config/libaccounts-glib/accounts.db" pid=32519 comm="mission-control" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Oct 4 11:56:30 raleigh kernel: [11256.440870] type=1400 audit(1349348190.236:45): apparmor="DENIED" operation="mknod" parent=32517 profile="/usr/lib/telepathy/mission-control-5" name=2F7372762F686F6D652F6C616E65792F6465762F63616E6F6E6963616C2F7061636B6167696E672F6465736B746F702F676E6F6D652D6465736B746F70332FE6A0AFE6B5AFE2BDA5E685ACE695AEE2BDB9E68CAEE6B9AFE6A5A6E2BDA7E6A5ACE685A2E68DA3E795AFE791AEE2B5B3E6B1A7E689A9E684AFE68DA3E795AFE791AEE2B9B3E689A4 pid=32519 comm="mission-control" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000

Revision history for this message
Iain Lane (laney) wrote :

Yeah, seems like something is dereferencing my /home -> /srv/home symlink and passing this to apparmor, which denies it. If I add this to HOMEDIRS in tunables then everything works.

We can see from my above strace that the open() call is using the path in /home/ though. So I suspect the problem is in apparmor. I'm adding an apparmor task now. Jamie, could you take a quick look and tell me what you think?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Sorry for the problems you are facing. I confirmed that the access was due to a file in /srv/home/.... AppArmor necessarily resolves symlinks when making access decisions. As such, if your home directory is not in HOMEDIRS then you will get these sorts of denials. Adjusting HOMEDIRS is the correct thing to do in this case (see https://wiki.ubuntu.com/DebuggingApparmor#Adjusting_Tunables). You can also use 'sudo dpkg-reconfigure apparmor' to configure this for your system as well without trigger the conffile prompt.

Changed in apparmor (Ubuntu):
status: New → Won't Fix
Iain Lane (laney)
Changed in libaccounts-glib (Ubuntu):
status: New → Invalid
Changed in telepathy-mission-control-5 (Ubuntu):
status: Triaged → Invalid
Changed in empathy (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in empathy:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package empathy - 3.6.0-0ubuntu2

---------------
empathy (3.6.0-0ubuntu2) quantal-proposed; urgency=low

  * debian/patches/50_uoa_no_crash_database.patch: Take patch from upstream
    bug #685498 to not crash MC when the accounts database cannot be read,
    commonly caused by apparmor denials when the user has a home directory in
    a nonstandard location (LP: #1059233).
 -- Iain Lane <email address hidden> Fri, 05 Oct 2012 12:42:35 +0100

Changed in empathy (Ubuntu):
status: Triaged → Fix Released
Changed in empathy:
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.