Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1457975 - [RHEL7.X] df -al or df -ali is timing out when using a huge amount ou direct mappings on autofs
[RHEL7.X] df -al or df -ali is timing out when using a huge amount ou direct ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos (Show other bugs)
7.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Pavel Moravec
Ondřej Pták
https://github.com/sosreport/sos/pull...
:
Depends On:
Blocks: 1420851 1464262
  Show dependency treegraph
 
Reported: 2017-06-01 12:22 EDT by Marco Benatto
Modified: 2018-04-10 14:03 EDT (History)
9 users (show)

See Also:
Fixed In Version: sos-3.5-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 14:01:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A program to create a huge autofs direct map (1.22 KB, text/plain)
2017-06-01 12:22 EDT, Marco Benatto
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0963 None None None 2018-04-10 14:03 EDT

  None (edit)
Description Marco Benatto 2017-06-01 12:22:58 EDT
Created attachment 1284211 [details]
A program to create a huge autofs direct map

Description of problem:

When using autofs large direct maps, df -a df -ali could not complete in time during sosreport.


"[root@client73 ~]# sosreport --batch

sosreport (version 3.3)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp/sos.UNlJGo and may be provided to a Red Hat support
representative.

Any information provided to Red Hat will be treated in accordance with
the published support policies at:

  https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.


 Setting up archive ...
 Setting up plugins ...
 Running plugins. Please wait ...

  Running 1/80: abrt...        
  Running 2/80: acpid...        
  Running 3/80: anaconda...        
  Running 4/80: anacron...        
  Running 5/80: auditd...        
  Running 6/80: autofs...        
  Running 7/80: block...        
  Running 8/80: boot...        
  Running 9/80: cgroups...        
  Running 10/80: chrony...        
  Running 11/80: cron...        
  Running 12/80: dbus...        
  Running 13/80: devicemapper...        
  Running 14/80: devices...        
  Running 15/80: dmraid...        
  Running 16/80: etcd...        
  Running 17/80: filesys...        
[plugin:filesys] command 'df -al' timed out after 300s <-- 
[plugin:filesys] command 'df -ali' timed out after 300s" <--

Version-Release number of selected component (if applicable):

rhel-7.3
sos-3.3-4.el7.noarch
coreutils-8.22-18.el7.x86_64


How reproducible:

Always

Steps to Reproduce:

1. Use the attached program to create a large direct map (~30k entries);
2. Configure autofs do use the mappings;
3. Run:
    sosreport --batch


Actual results:

df -al and df -ali times out and generate an empty output on sosreport


Additional info:

Since on RHEL7.x the /etc/mtab file is a symlink to /proc/self/mounts and as direct maps on autofs creates one entry on kernel's mount table for each mapping  the df -a* command will spend lots of time scanning the table, running stat(2) and on the worst case executing statfs(2) on each direct mount triggering unnecessary mounts.

This is a side effect from mtab reflecting the Kernel's mount table view on RHEL7.x, which lead all application which relies on getmntent(3) to see the -auto entries.

My suggestions for this, on sosreport and as -l is not enough on this case, is exclude autofs entries when running df like on the command bellow:

df -ali -x autofs

which will skip the -auto entries from mtab to being listed.
Comment 16 Pavel Moravec 2017-09-06 09:07:41 EDT
Thanks, upstream PR to add "-x autofs" created.
Comment 19 Pavel Moravec 2017-11-02 11:15:42 EDT
Fixed via sos 3.5 rebase.
Comment 25 errata-xmlrpc 2018-04-10 14:01:47 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0963

Note You need to log in before you can comment on or make changes to this bug.