GNOME Bugzilla – Bug 324051
getting user and group list is synchronous
Last modified: 2021-06-18 15:15:16 UTC
Please describe the problem: This bug is reported in our internal bug database. Scenario: Root user; NIS setup with many users (say more than 10000 users) Steps to reproduce: a) Join the system in NIS setup with more users and login as root into GNOME desktop b) On the desktop, right click on any icon and select properties. Nautilus looks freezed. After around 2 mnutes, the properties window will be shown. If properties for any other icon is selected, again nautilus looks freezed for another 2 minutes. Steps to reproduce: 1. 2. 3. Actual results: Nautilus appears freezed till 2 minutes. If properties is selected again, it freezes again. Expected results: Does this happen every time? Happens every time Other information:
When running as root, nautilus creates a "File Owner" option menu under Permissions tab of Properties windows and fills in the option menu with each of the user names present in local system plus NIS. Since root can change ownership of any file/directory, the option menu is shown for root user only. Its not shown for non-root users, hence the bug is not seen for non-root users. The issue will not be seen if "nis" is removed from "passwd:" entry in /etc/nsswitch.conf file. The code first gets entry for each user (local + NIS), makes a list and sorts the list in alphabatical order (nautilus_get_user_names function). Then it traverses the list once again and fills in the option menu with each user name as an item (synch_user_menu function) If there are more than 10000 users, getting passwd entries for each user, filling the list, sorting the list in alphabatical order and creating option menu items for each users takes lot of time. Since the operation is done synchnonously, nautilus looks freezed, whenever properties is selected.
What's the point of trying to make a menu with over 10000 entries? How about just having a text box when there are over, say 20 users? Or when the machine is using non-local accounts?
*** Bug 576366 has been marked as a duplicate of this bug. ***
A bit similar to bug 623285.
*** Bug 623285 has been marked as a duplicate of this bug. ***
Yeah doing synchronous IO is a big no-no. We should fix this.
Matthias, do we have API in accounts service we could use to get some kind of user list? Still, there is no way we can support adding all users to a combobox here.
My proposal is to fetch a list of the users that have actually logged into this system from accountservice and show them in a dropdown with a Other... item appended. If the other item is selected we can just show an entry box.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.