[Pkg-utopia-maintainers] Bug#1110748: pkexec takes a long time when `ulimit -n` is high

Simon McVittie smcv at debian.org
Mon Aug 11 10:41:48 BST 2025


Control: forwarded -1 https://github.com/polkit-org/polkit/issues/88
Control: tags -1 + upstream

On Sun, 10 Aug 2025 at 20:04:53 +0100, Colin Fletcher wrote:
>/etc/security/limits.d/nofile.conf had:
>@audio   -  nofile     unlimited
>
>The solution is probably "don't do that, then": I do appreciate that
>setting 'nofile unlimited' is maybe a bad idea.

Yes. It is considerably more compatible with arbitrary software if you 
keep the soft limit for file descriptors (ulimit -n, ulimit -Sn) set to 
1024, while raising the *hard* limit (ulimit -Hn), as described in more 
detail here: https://0pointer.net/blog/file-descriptor-limits.html

trixie's systemd sets the hard limit for file descriptors to be large by 
default anyway (around half a million) so you probably no longer need 
this customization.

Ideally pkexec should use g_fdwalk_set_cloexec() or close_range() to 
cope with large fd limits more efficiently, and that's a valid upstream 
bug report (which has already existed since 2019).

     smcv



More information about the Pkg-utopia-maintainers mailing list