ghostbsd / issues

Issue tracker for GhostBSD
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

GTK/Gnome processes looping through file descriptors on startup #58

Open ltning opened 2 years ago

ltning commented 2 years ago

Describe the bug

When starting mate-terminal, gnome-terminal, xfce4-terminal, or whenever pinentry-gnome3 is invoked (used for SSH logins using hardware key), I have noticed that I'm waiting for 2-3 seconds more than I should.

Upon researching the issue, I found that something is causing the processes to loop through all possible file handles - which on this system defaults to about 8 million. This obviously takes some time.

When reducing openfiles to 65536 in /etc/login.conf, running cap_mkdb and rebooting, the impact of the problem is reduced to insignificance - everything feels snappy.

See attached output of truss -o xfce4term.log -f xfce4-terminal in a clean environment.

xfce4term.log

How to reproduce the bug?

Make sure kern.maxfiles and kern.maxfilesperproc are set to defaults (in the ~8M range). I have not been able to confirm whether this has any actual impact, but I believe it informs the default openfiles limits.

Start mate-terminal or xfce4-terminal; there's a 1-3 second pause before the login scripts are run.

Expected behavior

Insta-prompt. :)

ericbsd commented 11 months ago

issue moved from ghostbsd/ghostbsd-src to ghostbsd/issues