Recent accountsservice update causes login window to hang
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Light Display Manager |
Undecided
|
Unassigned | ||
| | accountsservice (Ubuntu) |
Undecided
|
Robert Ancell | ||
Bug Description
Hi,
The recent 0.6.35-0ubuntu7.1 update (see https:/
I've already done things like set the login window to require the user to enter their username and password rather than list all users, but the login window still hangs while accounts-daemon is doing its thing.
The behavior I see, is:
1) just after boot, there's a black screen, right after the plymouth splash disappears, for 2-3 minutes before lightdm appears
2) You type a username into the username field and press 'Tab'
3) lightdm appears to hang for 5-10mins before the cursor moves to the password field. During this time, I see an accounts-daemon spawn for each user on the system, sequentially (in alphabetical order). Once the last user's accounts-daemon process finishes, the cursor moves to the password field.
This not only happens on first boot, but every time a user logs out and the system returns to the login window.
Any chance we can have the UID_MAX check back? Or some equivalent? This is causing a serious problem for us!
Thanks!
Hello,
I am also affected by this bug, having ~6000 user accounts on my system.
I observe exactly the same things as reported in the original bug report.
I think that lightdm should not consult accountsservice at all,
when the number of existing users is large (e.g. more than 100, could be set in the lightdm configuration files).
So, probably this is more a lightdm issue.
Cheers,
Yannis
System info (lsb_release -a):
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
| Steve Langasek (vorlon) wrote : | #3 |
Robert, have you seen this regression reported against the accountsservice SRU?
| Changed in accountsservice (Ubuntu): | |
| assignee: | nobody → Robert Ancell (robert-ancell) |
| Derek Poon (dpoon) wrote : | #4 |
I have found something close to a root cause, and I observe this hang 100% of the time under the following conditions:
1. Packages libnss-
2. /etc/nsswitch.conf contains "passwd: files ldap"
3. An LDAP user has logged in recently, as recorded in /var/log/wtmp.
4. dbus and lightdm are started on boot.
In lightdm_
DBus tries to dispatch the message to accounts-daemon. However, accounts-daemon isn't listening for requests because it hasn't fully started up yet. Rather, it is stuck in the user_locale_
The language-validate shell script runs not as root, but as an LDAP user. Bash never gets a chance to execute its first command, since it gets stuck during initialization with a getpwuid() call for that LDAP user that never returns. (To see that, I suggest hacking user_language_
On the other hand, libnss-ldapd, which bills itself as the successor fork to libnss-ldap,[3] does not suffer from such a problem. Unfortunately, if you install ldap-auth-
In summary, executing `killall language-validate` after boot serves as a workaround, as it lets accounts-daemon continue its initialization. Running `service dbus restart` is a more forceful workaround, as it lets accounts-daemon launch after conditions are ready for LDAP lookups. The problem occurs with libnss-
[1]: http://
[2]: http://
[3]: http://
[4]: http://
| Derek Poon (dpoon) wrote : | #5 |
Why lightdm behaves the way it does…
In common/user-list.c, load_users() calls load_passwd_file(). The intended code path is is for load_passwd_file() to make use of the org.freedesktop
[1]: https:/
[2]: https:/
[3]: https:/
| Gunnar Hjalmarsson (gunnarhj) wrote : | #6 |
Hi!
I'm currently working with bug #1443178, and I suspect that the solution I propose there may help address the performance issue discussed above.
The idea is to save the language and locale settings, based on the system default, at the creation of a new user. That way those values would be handy available in accountsservice's keyfile, and e.g. the expensive function user_language_
| Gunnar Hjalmarsson (gunnarhj) wrote : | #7 |
Version 0.6.35-0ubuntu7.2 of accountsservice is now available in trusty-proposed, and the performance ought to have improved significantly due to the change on a system with many users.
@Stephen, @Ioannis and @Derek: It would be great if you could install the new version, and let us know about your observations as regards performance.
| Changed in accountsservice (Ubuntu): | |
| status: | Confirmed → Incomplete |
| Derek Poon (dpoon) wrote : | #8 |
This may be a duplicate of bug 996791.
https:/
| Derek Poon (dpoon) wrote : | #9 |
@Gunnar, 0.6.35-0ubuntu7.2 may be improve performance in some cases, but it does nothing to avoid the infinite hang that I characterized in comment #4. The fact that it calls user_language_
| Gunnar Hjalmarsson (gunnarhj) wrote : | #10 |
Right, Derek. Actually, shouldn't the LDAP issue you described be reported as a separate libnss-ldap bug?


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