segfault in accounts-daemon when logging in / gdm crash if user account is added or deleted

Bug #1004515 reported by Wookey on 2012-05-25
This bug affects 22 people
Affects Status Importance Assigned to Milestone
accountsservice (Ubuntu)

Bug Description

libaccountsservice contains a double free which under certain circumstances will cause accounts-daemon to segfault, and under other circumstances will cause gdm to segfault when a user account is added or removed.

[Test case]
In a precise machine with kerberos authentication, adding a new user via "sudo adduser test" will cause an X session running under GDM to crash with a segfault.

Once the patch is applied, running the same command line should not affect a running X session. For the test to have value, the session needs to have been started after the new accountsservice packages were installed.

[Possible regressions]
This is just one line removing a double free that has been applied upstream for 16 months, so the code itself should be fine. To be certain that everything is alright, not only gdm but also lightdm should be tested.

[Original description]
I noticed this in my logs. It's not obviously broken anything, but segfaults are bad so I thought it worth reporting.

May 25 14:16:16 e102475-lin gdm-session-worker[2198]: AccountsService-WARNING: SetLanguage call failed: not access to HOME yet so language not saved
May 25 14:16:17 e102475-lin kernel: [ 6288.041531] accounts-daemon[2200]: segfault at 596fa6 ip 00007f283fad1e40 sp 00007fff221eb4e0 error 4 in[7f$
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
DistroRelease: Ubuntu 12.04
Package: accountsservice 0.6.15-2ubuntu9
PackageArchitecture: amd64
 PATH=(custom, no user)
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Tags: precise third-party-packages
Uname: Linux 3.2.0-24-generic x86_64
UpgradeStatus: Upgraded to precise on 2011-11-09 (197 days ago)
UserGroups: adm fuse sbuild sudo

apport information

tags: added: apport-collected precise third-party-packages
description: updated

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in accountsservice (Ubuntu):
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, your crash report is either missing or challenging to deal with as a ".crash" file. Please follow these instructions to have apport report a new bug about your crash that can be dealt with by the automatic retracer.

If you are running the Ubuntu Stable Release you might need to enable apport in /etc/default/apport and restart.

Now open your file manager, navigate to your /var/crash directory and open the crash report you wish to submit.
If this fails you will have to open a terminal and file your report with 'ubuntu-bug /var/crash/_my_crash_report.crash' where _my_crash_report.crash is the crash you would like to report. If you get an error that you aren't allowed to access this report you will have to file it with 'sudo ubuntu-bug /var/crash/_my_crash_report.crash'.

I'm closing this bug report since the process outlined above will automatically open a new bug report which can then dealt with more efficiently. Thanks in advance for your cooperation and understanding.

Changed in accountsservice (Ubuntu):
importance: Undecided → Low
status: Confirmed → Invalid
quazgar (quazgar) wrote :

I can confirm this segfault on 12.04:

For some users on trying to log in, these lines appear in /var/log/syslog:

Sep 28 11:25:02 smaxx04 automount[1111]: syntax error in nsswitch config near [ syntax error ]
Sep 28 11:25:10 automount[1111]: last message repeated 2 times
Sep 28 11:25:10 smaxx04 kernel: [ 8321.988293] accounts-daemon[2820]: segfault at 20 ip 00007f93f75f2c30 sp 00007ffff4022e28 error 4 in[7f93f75d0000+42000]
Sep 28 11:25:10 smaxx04 kernel: [ 8321.988519] gdm-session-wor[3185]: segfault at 7f99b6e21d90 ip 00007f99b495e898 sp 00007fff5b1bc0d0 error 4 in[7f99b48e0000+1b3000]

gdm then hangs on the password entry stage, it can only be set back to the login screen by 'service gdm restart'. It should probably be noted that this only happens for some users and some of the time. The home directories are automounted via NFS, authentication is provided over LDAP, afaik.

/var/crash is empty by the way, with enabled=1 in /etc/default/apport

Changed in accountsservice (Ubuntu):
status: Invalid → New
quazgar (quazgar) wrote :

Not being able to login should increase the importance, btw.

Omer Akram (om26er) wrote :

rubik, accounts-daemon crash should not prevent you from login. Why are you using GDM? Ubuntu comes with LightDM pre installed.

Dave Moore (d-moore) wrote :

We seem to be getting a similar problem:
Authentication by LDAP and pam_mkhome.
Login from terminal on ctrl-alt-f1 works every time.
Login from GDM is intermittent, sometimes imediate login, sometimes after 3rd or 4th attempt, sometimes not at all.
accounts-daemon sefault occurs in log.
LightDM also fails in the same manner.
Unity is not an option since it causes problems with some of our software.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in accountsservice (Ubuntu):
status: New → Confirmed
Yannick (ybarbeaux) wrote :

I can confirm this issue.
This is really annoying since users cannot login anymore on any station with 12.04 installed.
The relevant lines in syslog are:

Oct 4 11:25:17 station-15 kernel: [ 76.913030] show_signal_msg: 21 callbacks suppressed
Oct 4 11:25:17 station-15 kernel: [ 76.913036] accounts-daemon[1689]: segfault at 312d3945 ip b76e27c3 sp bfd2c3f0 error 4 in[b76bd000+47000]
Oct 4 11:25:17 station-15 kernel: [ 76.913774] gdm-session-wor[1687]: segfault at 286e8 ip b748237f sp bff82360 error 4 in[b740c000+1a3000]

Same situation as rubik-cube: home directories are automounted via NFS, authentication is provided over LDAP

This critical problem has been occuring for about one week here

Ralph (simmler) on 2012-11-14
Changed in accountsservice (Ubuntu):
status: Confirmed → Fix Released
Ralph (simmler) wrote :

sorry, wrong button
its not fixed :-(

mcsan (octagonhead) wrote :

@Ralph: You or the original reporter should be able to change the status back to 'New' (??)

I get this too in 12.10 with GDM installed, though everything seems to work fine

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm (Ubuntu):
status: New → Confirmed
ghomem (gustavo) wrote :

I'm only seing the gdm-session-worker segfault part. Happens on 12.04 with GDM.

Same problem : Nfs mounts on a netapp, Kerberos authentication

=> gdm-session-wor[2543]: segfault at a50cbbc ip 0069a160 sp bf8eb600 error 4 in[624000+1a3000]

gdm icons turns and turns. Esc key pushed, i try again and this time it works.

apport enabled but no crash file

anything else you want us to try ?

Well got a news to help noobs like me !

I just installed these 2 packages from Debian Sid (unstable) in this order :

dpkg -i libaccountsservice0_0.6.21-8_i386.deb
dpkg -i accountsservice_0.6.21-8_i386.deb

The 2 packages easily replace the packages from ubuntu, and so far there is no side effect and the best :

No more Segfault violation.

 I still keep any other packages (pam, gdm, etc ...) from the ubuntu 12.04.

Hope it helps.

summary: - segfault in accounts-daemon when logging in
+ segfault in accounts-daemon when logging in / gdm crash if user account
+ is added or deleted

I have a similar problem as described in

I can confirm that the solution is to upgrade the accountservice packages.

In my ppa I provide a "no change" backport from raring to precise.

Using this backport results in the following update:

   accountsservice (0.6.15-2ubuntu9.6 => 0.6.29-1ubuntu8~precise1~ppa1)
   gir1.2-accountsservice-1.0 (0.6.15-2ubuntu9.6 => 0.6.29-1ubuntu8~precise1~ppa1)
   libaccountsservice0 (0.6.15-2ubuntu9.6 => 0.6.29-1ubuntu8~precise1~ppa1)

Using this packages solves for me the problem.

I suggest a backport of accountservice to precise to fix the problem in precise.
As a preliminary workaround my ppa may be used.

(see also

Ubuntu Bug Squad volunteer triager

Margarita Manterola (marga-9) wrote :

I was affected by this bug from the gdm side (my gdm session crashed, taking away all my X sessions whenever a user was added or deleted).

I can confirm that installing the new accountservice packages provided by H.-Dirk Schmitt fixes the bug for me.

I'm not sure if a full backport is needed. Maybe we could just backport the patch? I'll have a look at the changes and see how hard that could be.


Margarita Manterola (marga-9) wrote :

Took me longer than expected due to the amount of code involved, but with a little help from git bisect I was able to identify the fixing patch, which was a very simple one.

It just removes a duplicate call to g_free that shouldn't have been there.

This was applied upstream from version 0.6.17 onwards, so only precise is affected.

I'm attaching a debdiff for a fixed version in precise.


description: updated
Jamie Strandboge (jdstrand) wrote :

Unsubscribing ubuntu-sponsors since accountsservice is fixed and there is nothing to sponsor for gdm.

Margarita Manterola (marga-9) wrote :

accountsservice is NOT fixed. That was a user mistake marking the bug as fixed release when it was not fixed at all.

Please, someone with bug control rights mark this as affecting Precise. All following distributions are not affected.

Andreas Moog (ampelbein) on 2013-07-23
Changed in accountsservice (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Low
no longer affects: gdm (Ubuntu)
no longer affects: gdm (Ubuntu Precise)
Dimitri John Ledkov (xnox) wrote :

Uploaded into precise-proposed unapproved queue. Pending a member of ubuntu-sru team to accept the package:
Uploading to ubuntu (via ftp to
  Uploading accountsservice_0.6.15-2ubuntu9.7.dsc: done.
  Uploading accountsservice_0.6.15-2ubuntu9.7.debian.tar.gz: done.
  Uploading accountsservice_0.6.15-2ubuntu9.7_source.changes: done.
Successfully uploaded packages.

Unsubscribing ubuntu-sponsors, Subscribing ubuntu-sru team.

Changed in accountsservice (Ubuntu Precise):
status: Triaged → In Progress
assignee: nobody → Dmitrijs Ledkovs (xnox)
assignee: Dmitrijs Ledkovs (xnox) → nobody
Qianqian Fang (fangq) wrote :

I am not able to logon my computer (running 12.04) due to this exact error. I enabled precise-proposed repo from synaptic, but I don't see the updates. Please let me know how to apply the fix.

Hello Wookey, or anyone else affected,

Accepted accountsservice into precise-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in accountsservice (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Margarita Manterola (marga-9) wrote :

I confirm that the package in proposed fixes the issue for me.


shan (shan40) on 2013-11-26
Changed in accountsservice (Ubuntu):
assignee: nobody → shan (shan40)
Ryan Tandy (rtandy) wrote :

I reported bug #1255356 separately and discovered the same double free as the cause. I have verified that accountsservice from precise-proposed fixes the bug reported by Wookey and fixes the bug I reported as well.

tags: added: verification-done
removed: verification-needed
Ryan Tandy (rtandy) on 2013-11-27
Changed in accountsservice (Ubuntu):
assignee: shan (shan40) → nobody
Changed in accountsservice (Ubuntu):
assignee: nobody → Marcus Colla Magnus O.R. (collamagnus-or)
Changed in accountsservice (Ubuntu Precise):
assignee: nobody → Marcus Colla Magnus O.R. (collamagnus-or)
status: Fix Committed → Fix Released

Hi Marcus,

On Wed, Dec 18, 2013 at 12:09 PM, Marcus Colla Magnus O.R.
<email address hidden> wrote:
> ** Changed in: accountsservice (Ubuntu Precise)
> Status: Fix Committed => Fix Released

I don't think this is correct. The fixed package is still in
precise-proposed and hasn't been released to precise-updates yet, so
the status should still be Fix Committed. The status will be changed
automatically once the package migrates to precise-updates.

Ryan Tandy (rtandy) on 2013-12-19
Changed in accountsservice (Ubuntu):
assignee: Marcus Colla Magnus O.R. (collamagnus-or) → nobody
Changed in accountsservice (Ubuntu Precise):
assignee: Marcus Colla Magnus O.R. (collamagnus-or) → nobody

The verification of the Stable Release Update for accountsservice has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

aminebend (alg-amine) on 2014-08-05
Changed in accountsservice (Ubuntu):
assignee: nobody → aminebend (alg-amine)
Changed in accountsservice (Ubuntu Precise):
assignee: nobody → aminebend (alg-amine)
Ryan Tandy (rtandy) on 2014-08-05
Changed in accountsservice (Ubuntu):
assignee: aminebend (alg-amine) → nobody
Changed in accountsservice (Ubuntu Precise):
assignee: aminebend (alg-amine) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers