Created attachment 53195 [details] [review] Patch adding retries to ListCachedUsers call Description of problem: With /apps/gdm/simple-greeter/disable_user_list set to true (on a system with many users), gdm occasionally fails with "ActUserManager: ListCachedUsers failed: Did not receive a reply" Version-Release number of selected component (if applicable): accountsservice-0.6.14 How reproducible: Often with LDAP enabled. Steps to Reproduce: 1. su -c "gconftool-2 --set --type boolean \ /apps/gdm/simple-greeter/disable_user_list true" -s /bin/sh gdm 2. reboot Actual results: gdm login does not appear Expected results: gdm login should appear Additional info: Tests were done on a Fedora 15 machine upgraded with glib2-2.31.0 and gdm-3.2.1 It probably should be noted that the system in question has LDAP enabled, and with the network disconnected, 5-6 retries are needed before LDAP times out and gdm can display the login box.
if we need to do retries we should do them on the daemon side and not in the library. ListCachedUsers should be robust. On the other hand, we should investigate why retries are needed and potentially fix the root problem. Another thought is the ListCachedUsers call should probably have an INT_MAX timeout.
(In reply to comment #1) > if we need to do retries we should do them on the daemon side and not in the > library. ListCachedUsers should be robust. As to where this is best done, I have no preferences. I fixed it in the account manager mostly because I didn't know what other applications might use (and fail) on the same call. > On the other hand, we should investigate why retries are needed and potentially > fix the root problem. The reason seems to be that LDAP does not give appropriate answers until the network is up. When the disable_user_list is false, I think I'm saved due to mounting and reading of users home directories (probably .face, etc), making things sync up. The case of LDAP and a disconnected network cable should be considered (which gives a 2 minute timeout). Locally I have made a libnss_conditional_ldap.so.2 which short circuits ldap when not on the right network (controlled by a file in /etc/NetworkManager/dispatcher.d/, status is propagated to users by change of desktop background [which explains why I stumbled as described in https://bugzilla.gnome.org/show_bug.cgi?id=663549] :-() > Another thought is the ListCachedUsers call should probably have an INT_MAX > timeout. Coupled with retries perhaps :-) I have stated the problem and feel confident that more able people can suggest a better solution. Thanks.
I don't think having it in the account manager is wrong, I just think it should be in the accounts service not the accounts service library.
If you elaborate where and how, I could give it a try.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/47.
Created attachment 140996 [details] attachment-7210-0.html On vacation
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.