After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 324051 - getting user and group list is synchronous
getting user and group list is synchronous
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Properties Dialog
2.26.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 576366 623285 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-14 10:26 UTC by Narayana Pattipati
Modified: 2021-06-18 15:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Narayana Pattipati 2005-12-14 10:26:45 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:
Comment 1 Narayana Pattipati 2005-12-14 10:53:25 UTC
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.
Comment 2 Martijn Vernooij 2006-06-21 09:47:18 UTC
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?
Comment 3 Harry Lu 2009-05-11 08:37:14 UTC
*** Bug 576366 has been marked as a duplicate of this bug. ***
Comment 4 André Klapper 2011-08-18 19:45:46 UTC
A bit similar to bug 623285.
Comment 5 William Jon McCann 2012-08-30 02:19:04 UTC
*** Bug 623285 has been marked as a duplicate of this bug. ***
Comment 6 William Jon McCann 2012-08-30 02:20:15 UTC
Yeah doing synchronous IO is a big no-no. We should fix this.
Comment 7 William Jon McCann 2012-08-30 02:22:31 UTC
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.
Comment 8 William Jon McCann 2012-08-30 13:27:35 UTC
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.
Comment 9 André Klapper 2021-06-18 15:15:16 UTC
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.