gdm-simple-slave crashed with SIGSEGV in _nss_compat_getpwnam_r()

Bug #805154 reported by Blümchen Blau
722
This bug affects 140 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Fix Released
High
Unassigned
Oneiric
Won't Fix
Low
Unassigned
Precise
Fix Released
Low
Unassigned

Bug Description

SRU justification:

[Impact]

* With automatic login enabled in /etc/gdm/custom.conf, gdm crashes instead of logging in, and doesn't respawn, dropping to a text console instead.

[Test Case]

* install gdm and choose it as the default display manager at the debconf prompt

* create /etc/gdm/custom.conf with contents:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=some-username

(where "some-username" is a user on the system)

* Reboot (or stop the previous display manager and start gdm)

* In gdm in precise-updates, instead of logging in, gdm crashes, the system drops to a text console, and a gdm-simple-slave segfault is recorded in dmesg.

[Regression Potential]

* Minimal. The change consists only of adding a missing NULL parameter check.

Original description:

Chrash happend while trying to change a desktop-icon. Searching the icon in a hidden folder ".xxxx" in the user directory.

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: gdm 3.0.4-0ubuntu3
ProcVersionSignature: Ubuntu 3.0-2.3-generic-pae 3.0.0-rc4
Uname: Linux 3.0-2-generic-pae i686
NonfreeKernelModules: fglrx
Architecture: i386
Date: Sun Jul 3 01:25:08 2011
ExecutablePath: /usr/lib/gdm/gdm-simple-slave
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110531.1)
ProcCmdline: /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display2
ProcEnviron:
 LANGUAGE=de_AT:de
 PATH=(custom, no user)
 LANG=de_AT.UTF-8
SegvAnalysis:
 Segfault happened at: 0xb77405b7 <_nss_compat_getpwnam_r+55>: movzbl (%edx),%eax
 PC (0xb77405b7) ok
 source "(%edx)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gdm
StacktraceTop:
 _nss_compat_getpwnam_r () from /lib/i386-linux-gnu/libnss_compat.so.2
 getpwnam_r () from /lib/i386-linux-gnu/libc.so.6
 getpwnam () from /lib/i386-linux-gnu/libc.so.6
 ?? ()
 ?? ()
Title: gdm-simple-slave crashed with SIGSEGV in _nss_compat_getpwnam_r()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Blümchen Blau (bluemchen-blau) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 _nss_compat_getpwnam_r (name=0x0, pwd=0xb742ec40, buffer=0x8bde400 "P\347B\267P\347B\267\370\343\275\b\370\343\275\bct_get_username: assertion `session != NULL' failed", buflen=1024, errnop=0xb70966e8) at nss_compat/compat-pwd.c:860
 __getpwnam_r (name=0x0, resbuf=0xb742ec40, buffer=0x8bde400 "P\347B\267P\347B\267\370\343\275\b\370\343\275\bct_get_username: assertion `session != NULL' failed", buflen=1024, result=0xbfd38708) at ../nss/getXXbyYY_r.c:256
 getpwnam (name=0x0) at ../nss/getXXbyYY.c:117
 home_dir_using_ecryptfs (username=<value optimized out>) at gdm-simple-slave.c:640
 idle_connect_to_display (slave=0x8bcb800) at gdm-simple-slave.c:1435

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gdm (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
affects: gdm (Ubuntu) → eglibc (Ubuntu)
Changed in eglibc (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
assignee: Canonical Foundations Team (canonical-foundations) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

seems a bug in the recent gdm update:

home_dir_using_ecryptfs (const gchar *username)
...
        info = getpwnam (username);

that call is done with a NULL username

visibility: private → public
affects: eglibc (Ubuntu) → gdm (Ubuntu)
Changed in gdm (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Sebastien Bacher (seb128) wrote :

gdm is not default in oneiric but that's a segfault and should still be fixed there

Changed in gdm (Ubuntu):
status: New → Triaged
Revision history for this message
Andrea Amoroso (heiko81) wrote :

for me it happens also at boot..don't know why but it tries to start gdm instead of lightdm..it gives error and stops booting..then if i execute sudo lightdm it starts without problems and almost everything works (it's still alpha 2)..i found the error executing dmesg..
I upgrade ubuntu from 11.04 to 11.10 about a month ago..
for now I solved it executing in boot Ctrl + Alt + F6 and then sudo lightdm..hope this may help someone with the same problems..

Revision history for this message
Gvozdik Artem (gvozdik) wrote :

Happened after upgrading from 11.04 to 11.10, amd64

tags: added: bugpattern-needed
tags: removed: bugpattern-needed
tags: added: bugpattern-written
Revision history for this message
Safetronik (safetronik) wrote :

Update kdm

Revision history for this message
Alexander Kabakow (alexzak) wrote :

Happened after upgrading from 11.04 to 11.10, ia32
Couple of days worked fine, but today fails

My duplicate of this bug here: #877170

Revision history for this message
MarcinStac (marcinstac) wrote : Re: [Bug 805154] Re: gdm-simple-slave crashed with SIGSEGV in_nss_compat_getpwnam_r()

Hello

 The only thing I could do in similar circumstances 2 months ago was apt-get install kdm and use kdm instead of gdm, (all this Gnome 3 software is to wise for me).

Have a Nice Day

Revision history for this message
Alexander Kabakow (alexzak) wrote :

Btw bug can be easily workarounded

$ sudo apt-get install lightdm
$ sudo nano /etc/X11/default-display-manager

and write to it: /usr/sbin/lightdm (instead of /usr/sbin/gdm for gdm)

I can work with out distractions now :)
Thanks

Changed in gdm (Ubuntu):
assignee: Robert Ancell (robert-ancell) → nobody
importance: Medium → High
Revision history for this message
Jake Kauth (jake-h6) wrote :

MeToo.

After upgrading from 10.04 to 10.10, 11.04, then 11.10, I started getting this bug.

The fix for me was to disable autologin (and other options?) by doing this
"mv /etc/gdm/custom /etc/gdm/custom.conf.bak" and rebooting.

Revision history for this message
Bob Bib (bobbib) wrote :

Got this crash after executing "guest-session" from the GNOME terminal.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gdm (Ubuntu Oneiric):
status: New → Confirmed
Revision history for this message
Kent Seaton (spr0k3t) wrote :

Bug is still present in 12.04. Installed clean and removed unity components. Replaced lightdm with gdm. Crash comes up every time a user is logged in.

Revision history for this message
John Thomas (jt2354) wrote :

Possibly not the same problem, but I had set up auto-login for a new user without thinking about it. Going back into user manager and switching off auto-login appears to have fixed my gdm issue.

tags: added: precise
Revision history for this message
Haris Ibrahim K. V. (blucalvin) wrote :

It happened to me in Ubuntu 12.04. I uninstalled unity and unity-2d and installed gdm and gnome-shell. When I rebooted, everything was working fine. But when I selected the option "Don't ask for password while logging in" from "System-settings -> user accounts", the next time rebooting hung with the error message "cannot write bytes: Broken pipe".

Changed in gdm (Ubuntu Oneiric):
status: Confirmed → Won't Fix
importance: Undecided → Low
Changed in gdm (Ubuntu Precise):
importance: Undecided → High
status: New → Triaged
importance: High → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 3.0.4-0ubuntu16

---------------
gdm (3.0.4-0ubuntu16) quantal; urgency=low

  * debian/patches/42_no_ecryptfs_autologin.patch:
    - don't try to get infos on null usernames (lp: #805154)
 -- Sebastien Bacher <email address hidden> Fri, 06 Jul 2012 12:10:10 +0200

Changed in gdm (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Andreas (2td0lkn-andreas) wrote :

Thank you for fixing this problem.
Will the updated package appear in precise as well?
The current version as per 2012-08-05 is still 3.0.4-0ubuntu15.

Revision history for this message
Arrigo Marchiori (ardovm) wrote :

I can confirm this bug still exists on Precise.
IMHO it should have higher importance, as it is a show-stopper.

Revision history for this message
Vortex (v4vortex) wrote :

Appearently still happening in Precise (on two of my systems). Please fix it for the LTS, thanks!

Revision history for this message
Ryan Tandy (rtandy) wrote :

The change from 3.0.4-0ubuntu16 is trivial: two lines plus a bit of quilt noise. For me at least the crash is easily reproduced by activating automatic login, and the patch fixes it. Would be lovely to have this uploaded if possible. Thanks for considering.

Ryan Tandy (rtandy)
description: updated
Revision history for this message
Iain Lane (laney) wrote :

Thanks for the debdiff, I just uploaded it into the queue for precise-proposed.

Changed in gdm (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Stéphane Graber (stgraber) wrote : Please test proposed package

Hello Blümchen, or anyone else affected,

Accepted gdm into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gdm/3.0.4-0ubuntu15.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed 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 https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gdm (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ryan Tandy (rtandy) wrote :

Following the test case in the description...

~$ cat /etc/gdm/custom.conf
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=rtandy

... with gdm from precise-updates:

~$ dpkg-query -W gdm
gdm 3.0.4-0ubuntu15.2

gdm crashes to a text console and the segfault is recorded in dmesg:

[ 15.338261] gdm-simple-slav[1075]: segfault at 0 ip b651e69e sp bfc90860 error 4 in libnss_compat-2.15.so[b651b000+7000]

After installing gdm from precise-proposed and rebooting:

~$ dpkg-query -W gdm
gdm 3.0.4-0ubuntu15.3

gdm starts properly and automatically logs me in to my desktop session.

Marking verified.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 3.0.4-0ubuntu15.3

---------------
gdm (3.0.4-0ubuntu15.3) precise; urgency=low

  * debian/patches/42_no_ecryptfs_autologin.patch:
    - don't try to get infos on null usernames (lp: #805154)
 -- Ryan Tandy <email address hidden> Mon, 25 Nov 2013 13:33:30 -0800

Changed in gdm (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for gdm 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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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