gdm doesn't load with large passwd file

Bug #471542 reported by BrandonS
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Fix Released
Medium
Robert Ancell
Lucid
Fix Released
Low
Robert Ancell

Bug Description

Binary package hint: gdm

Noticed an issue with the newest gdm available in Karmic. It appears that this gdm version does not want to load in our environment.

We have a very large passwd file:
cat /etc/passwd | wc -l
34113

with home directories being served out of NFS.

When gdm loads on this machine, it hangs forever, while the mount table goes up. It appears that gdm is attempting to mount and read every single home directory for every single user in the passwd file. Notices in syslog appear about being unable to read the .face file in each user's home directory.

I went ahead and disabled the user list using:
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
--type bool --set /apps/gdm/simple-greeter/disable_user_list true

stracing the process shows a bunch of these messages (usernames removed for security purposes):
[pid 13493] inotify_add_watch(5, "*********************", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOENT (No such file or directory)
[pid 13493] inotify_add_watch(5, "/usr2/*******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 3
[pid 13493] inotify_add_watch(5, "/usr2/*****", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 4
[pid 13493] inotify_add_watch(5, "/usr2/*******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 5
[pid 13493] inotify_add_watch(5, "/usr2/********", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 6
[pid 13493] inotify_add_watch(5, "/usr2/*******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 7
[pid 13493] inotify_add_watch(5, "/usr2/*******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 8
[pid 13493] inotify_add_watch(5, "/usr2/*******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 EACCES (Permission denied)
[pid 13493] inotify_add_watch(5, "/usr2/*******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 9
[pid 13493] inotify_add_watch(5, "/usr2/******", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = 10
[pid 13493] inotify_add_watch(5, "/usr2/*****", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 EACCES (Permission denied)

And now no more errors appear about the .face files, however the mounting behavior is still happening. I highly doubt the automounter on this box will be able to handle 32K+ simultaneous mounts on it, and it seems very unnecessary.

Killing gdm on this machine immediately stops mounting the home directories, and then I have to go back and do a umount -t nfs -a to unmount them all.

lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10

/usr/sbin/automount -V

Linux automount version 5.0.4

Directories:
        config dir: /etc/default
        maps dir: /etc
        modules dir: /usr/lib/autofs

Compile options:
  ENABLE_FORCED_SHUTDOWN ENABLE_IGNORE_BUSY_MOUNTS WITH_HESIOD
  WITH_LDAP WITH_SASL LIBXML2_WORKAROUND

apt-cache policy gdm
gdm:
  Installed: (none)
  Candidate: 2.28.1-0ubuntu1
  Version table:
     2.28.1-0ubuntu1 0
        500 http://archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Changed in gdm (Ubuntu):
importance: Undecided → Medium
Revision history for this message
BrandonS (brandonsqc) wrote :

Any updates on this? It happens on Lucid as well.

Revision history for this message
BrandonS (brandonsqc) wrote :

It appears this is fixed in gdm-2.30.1 any idea on when this might be added to lucid?

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new gdm has been uploaded some days ago to the ubuntu-desktop ppa for testing and will go to lucid updates once tested

Revision history for this message
BrandonS (brandonsqc) wrote :

Just tested the new gdm: gdm_2.30.2-0ubuntu1_amd64.deb and still having the same problems with this.

However, I downloaded the 2.30.2 code from gnome.org and compiled and installed it and it does not have this same problem.

Changed in gdm (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Robert, could you have a look at this issue?

Changed in gdm (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

Confirmed here.

= Steps to reproduce =

On the server:

- Create user1 (uid 1001), user2 (uid 1002) and user3 (uid 1003), with home directory under /home/autofs/

- Install package nfs-kernel-server, configure /etc/exports with:

    /home/autofs *(rw)

On the client:

- Create user1 (uid 1001), user2 (uid 1002) and user3 (uid 1003) with home under /home/autofs/. Notice the uid are consistent with the server.

- Install package autofs5, configure /etc/auto.master with:

    /home/autofs /etc/auto.home

and /home/auto.home with:
    * -fstype=nfs,soft,intr,nosuid nfsserver:/home/autofs/&

(where "nfsserver" is the hostname of the aserver above)

- Reboot (for good measure)

- At the GDM prompt, switch to a VT with Ctrl-Alt-F1, login as a non-autofs user

- Witness all autofs home directory are currently mounted

When we disable the user listing as explained in the bug description, the home directory would not get mounted when GDM started, but they all will as soon as a single user log on.

When testing using a different display manager (xdm), it only mount the user home directory on log in, as expected.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed in lp:~ubuntu-desktop/gdm/ubuntu. The UserManager patch (used by the user switcher) did not honour the new user filters added in 2.29.0, they have been update to do so. So after logging in the user switcher would trigger all users/faces being scanned.

To disable users the following line must be in /etc/gdm/custom.conf:
[greeter]
IncldueAll=false

Changed in gdm (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.30.2-0ubuntu2

---------------
gdm (2.30.2-0ubuntu2) maverick; urgency=low

  * Upload to maverick, the new version has new bugs which means it doesn't
    qualify for lucid-updates right now, a new update to lucid will be done
    using the current lucid version until those issues are resolved

  [ Robert Ancell ]
  * debian/patches/16_gdmserver_user_manager.patch:
  * debian/patches/24_system_uid.patch:
    - Update to match IncludeAll behaviour in greeter (LP: #471542)
 -- Sebastien Bacher <email address hidden> Wed, 09 Jun 2010 12:23:38 +0200

Changed in gdm (Ubuntu):
status: Fix Committed → Fix Released
Changed in gdm (Ubuntu Lucid):
importance: Undecided → Low
assignee: nobody → Robert Ancell (robert-ancell)
status: New → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

There is a candidate lucid update rebased on the current lucid version which has been uploaded now, the debdiff is on bug #585574

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted gdm into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

Tested 2.30.2-0ubuntu1, and home directories still get all automounted as soon as a user (any user) logs in. I am testing the correct package?

Thanks!

Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue could be similar to bug #562509 and due to icons watching, upstream dropped that in http://git.gnome.org/browse/gdm/commit/?h=gnome-2-30&id=744557f87c84398860c102ba8f8d10790487ae32 which got backported in that upgrade but some of the distro changes seem to do something similar

Robert, could you check if that's an issue and if your changes need similar cleaning?

Revision history for this message
Sebastien Bacher (seb128) wrote :

just as a comment the sru update has been done without vcs since the vcs tracks the newer version now

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 471542] Re: gdm doesn't load with large passwd file

Etienne Goyer [2010-06-09 15:37 -0000]:
> Tested 2.30.2-0ubuntu1, and home directories still get all automounted
> as soon as a user (any user) logs in. I am testing the correct package?

No, that's the previous SRU. You need 2.30.2.is.2.30.0-0ubuntu1 now.

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

Gotta love the version number! :)

Using 2.30.2.is.2.30.0-0ubuntu1, the home directory are not mounted as soon as GDM runs, which would resolve the bug as reported here.

However, shortly after a user logs in, the directory do get automounted. I presume there is another process poking into user's home directory that triggers the automount (user-switcher, perhaps?). But that is not the topic of this bug, which can be considered resolved.

Thanks guys!

EtienneG

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
BrandonS (brandonsqc) wrote :

Meant to update sooner, but after testing this new package it does in
fact solve our problem as well.

Thanks.

On 06/11/2010 12:16 PM, Etienne Goyer wrote:
> Gotta love the version number! :)
>
> Using 2.30.2.is.2.30.0-0ubuntu1, the home directory are not mounted as
> soon as GDM runs, which would resolve the bug as reported here.
>
> However, shortly after a user logs in, the directory do get automounted.
> I presume there is another process poking into user's home directory
> that triggers the automount (user-switcher, perhaps?). But that is not
> the topic of this bug, which can be considered resolved.
>
> Thanks guys!
>
> EtienneG
>

--
Brandon J. Schwartz
Senior IT Engineer
<email address hidden>
858-651-7208

Changed in gdm (Ubuntu Lucid):
status: Fix Committed → Fix Released
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.