Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] Performance regression when entering big custom homes #1317

Closed
stendler opened this issue Mar 30, 2024 · 1 comment
Closed

[Error] Performance regression when entering big custom homes #1317

stendler opened this issue Mar 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@stendler
Copy link

Describe the bug
Since 1.7.0 (f7e8532) the startup time of my distroboxes (or first enter after stop) with custom homes has increased dramatically.

To Reproduce
Enter a distrobox with a custom home folder with about 3 million files worth of around 700GB.

Expected behavior

  • fast startup
  • no ownership changes to any existing nested file or folder

Logs
It stays in Setting up skel... for a long time in chown -R 1000:1000 <custom-home>

container log excerpt (click to expand)
+ printf 'distrobox: Setting up user home...\n'  
distrobox: Setting up user home...  
++ getent passwd username  
++ cut -d: -f6  
+ '[' <custom-home> '!=' <custom-home> ']'  
+ printf 'distrobox: Ensuring user'\''s access...\n'  
distrobox: Ensuring user's access...  
+ '[' '!' -e /etc/passwd.done ']'  
+ '[' 0 -eq 1 ']'  
+ touch /etc/passwd.done  
+ '[' -n /home/username ']'  
+ '[' -d /etc/skel ']'  
+ printf 'distrobox: Setting up skel...\n'  
distrobox: Setting up skel...  
++ find /etc/skel/ -type f  
+ skel_files='/etc/skel/.bash_logout  
/etc/skel/.bash_profile  
/etc/skel/.bashrc'  
+ for skel_file in ${skel_files}  
++ basename /etc/skel/.bash_logout  
+ base_file_name=.bash_logout  
++ dirname /etc/skel/.bash_logout  
+ skel_file_path=/etc/skel  
+ file_path_for_home=  
+ '[' -n '' ']'  
+ '[' '!' -f <custom-home>/.bash_logout ']'  
+ for skel_file in ${skel_files}  
++ basename /etc/skel/.bash_profile  
+ base_file_name=.bash_profile  
++ dirname /etc/skel/.bash_profile  
+ skel_file_path=/etc/skel  
+ file_path_for_home=  
+ '[' -n '' ']'  
+ '[' '!' -f <custom-home>/.bash_profile ']'  
+ for skel_file in ${skel_files}  
++ basename /etc/skel/.bashrc  
+ base_file_name=.bashrc  
++ dirname /etc/skel/.bashrc  
+ skel_file_path=/etc/skel  
+ file_path_for_home=  
+ '[' -n '' ']'  
+ '[' '!' -f <custom-home>/.bashrc ']'  
+ chown -R 1000:1000 <custom-home>

Desktop:

  • podman 4.9.3
  • distrobox 1.7.0.1
  • Host: opensuse microos
  • Installed via zypper / transactional-update / was bundled

Additional context

  • This only happens on container startup. So when entering in one window, entering again or opening an application while the container is running will be faster, even if the first enter is still stuck at that step.
  • The custom home folder may contain other container volume mounts, which break if their ownership changes.
  • I'm not sure why skel files are copied in the first place, if the custom home directory is not empty. Could this be skipped or made optional?
@stendler stendler added the bug Something isn't working label Mar 30, 2024
@Wiedzmin89
Copy link

I have same issue with NFS home folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants