Hi Hector,                                                
                                                                                
   
  Thanks for the detailed setup. To help you get closer to what we're seeing,   
   
  here's a more complete picture of our environment — the complexity is likely 
why
  your simpler setup doesn't reproduce it.                                      
   
                                                            
  Our configuration:

  - Ubuntu 24.04, autofs 5.1.9-1ubuntu4.1                                       
   
  - The autofs service runs under systemd with LimitNOFILE=524288 (not the 
default
  20480 shell ulimit — this matters for how long accumulation takes before 
symptoms
   appear)                                                  
  - We have 25+ indirect autofs maps, all backed by LDAP (ldap:ou=...): /home,  
   
  /group, /proj, /tool, /build, /regres, /public, /archive, /devl, /products,   
   
  /hardwire, /wrk, /web, and a dozen more project-specific maps
  - Each LDAP map contains many entries — hundreds in the case of /home and 
/proj  
  - Map timeout is 900 seconds                                                  
   
                                                                                
   
  How we observe the leak:                                                      
   
                                                                                
   
  The fd count is only visible as root — /proc/<pid>/fd for the automount 
daemon is
   not readable by unprivileged users:                      
                                                                                
   
  pid=$(systemctl show autofs --property=MainPID --value)   
  ls /proc/$pid/fd | wc -l                                                      
   
                                                                                
   
  On a freshly restarted autofs we see ~80 fds. Over days of normal user 
activity  
  on a compute host, this climbs gradually. We alert at 75% of LimitNOFILE 
(~393K  
  fds) and treat 90% (~471K) as critical.                                       
   
                                                            
  Our workaround:

  Weekly systemctl restart autofs via cron, which resets the count instantly. 
This 
  is what triggered the bug report — we needed to understand why we had to do 
this.
                                                                                
   
  What I'd leave to your expertise:                                             
   
  
  The core question is what lookup pattern drives the accumulation — whether 
it's  
  the volume of unique indirect map entries accessed, failed mount attempts, 
rapid
  mount/expire cycling, or something in the LDAP map resolution path. You'll 
know  
  better than I do which of those to stress first given the autofs 5.1.9 
codebase.

  Happy to provide strace output from an affected host, the exact fd breakdown 
by  
  type (ls -la /proc/$pid/fd | grep socket etc.), or packet captures if any of 
that
   would help narrow down the code path.                                        
   
                                                            
  Thanks again.

  Marc

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152277

Title:
  automount leaks Unix socketpairs per mount helper invocation — fd
  exhaustion after days/weeks of uptime

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/2152277/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to