RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1961492 - autofs: regression in offset ordering
Summary: autofs: regression in offset ordering
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: autofs
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta
: ---
Assignee: Ian Kent
QA Contact: Kun Wang
URL:
Whiteboard:
Depends On:
Blocks: 1965870
TreeView+ depends on / blocked
 
Reported: 2021-05-18 06:13 UTC by Ian Kent
Modified: 2021-11-10 07:15 UTC (History)
2 users (show)

Fixed In Version: autofs-5.1.4-69.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1965870 (view as bug list)
Environment:
Last Closed: 2021-11-09 19:32:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
Patch - fix offset entries order (5.90 KB, patch)
2021-05-19 01:22 UTC, Ian Kent
no flags Details | Diff
Patch - use mapent tree root for tree_mapent_add_node() (3.43 KB, patch)
2021-05-19 01:24 UTC, Ian Kent
no flags Details | Diff
Patch - eliminate redundant cache lookup in tree_mapent_add_node() (2.86 KB, patch)
2021-05-19 01:25 UTC, Ian Kent
no flags Details | Diff
Patch - fix hosts map offset order (7.91 KB, patch)
2021-05-19 01:26 UTC, Ian Kent
no flags Details | Diff
Patch - fix direct mount deadlock (3.57 KB, patch)
2021-05-19 01:27 UTC, Ian Kent
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4372 0 None None None 2021-11-09 19:32:58 UTC

Description Ian Kent 2021-05-18 06:13:15 UTC
Description of problem:

As a result of the changes for bug 1912106 I have found a couple more regressions, this is one.

This is due to exports offset mount ordering.

Version-Release number of selected component (if applicable):
autofs-5.1.4-68.el8


How reproducible:
Always under certain circumstances.

Steps to Reproduce:
1. Setup an NFS server with out of order exports.

Note: the server name I use below is f28 and it is define
in /etc/hosts with an FQDN of f28.long.domain.name.themaw.net.

mkdir /autofs
mkdir /exports
mkdir /exports/data/tmp
mkdir /exports/data/lib

Create /etc/exports as:
/autofs         *(rw,sync,no_subtree_check)
/exports                *(insecure,rw,sync,no_subtree_check)
/exports/data/tmp       *(insecure,rw,sync,no_subtree_check)
/exports/data/lib       *(insecure,rw,sync,no_subtree_check)

Check order of exports returned:
showmount -e
Export list for f28:
/exports/data/lib *
/exports/data/tmp *
/exports          *
/autofs           *

2. Ensure the /net entry in /etc/auto.master is uncommented:
/net    -hosts

3. Start autofs and trigger mount /net/f28/exports/data/tmp:
ls /net/f28/exports/data/tmp

4. stop autofs and observe that shutdown has not succeeded
   cleanly, as it should in this case.
service stop autofs
cat /proc/mounts|grep \/net
-hosts /net autofs rw,relatime,fd=-1,pgrp=21690,timeout=60,minproto=5,maxproto=5,indirect,pipe_ino=-1 0 0
-hosts /net/f28/exports autofs rw,relatime,fd=6,pgrp=21690,timeout=60,minproto=5,maxproto=5,offset,pipe_ino=130159 0 0

5. Cleanup
umount /net/f28/exports /net

Actual results:
Not all mounts can be umounted at shutdown when they should be in this case.


Expected results:
All mounts not in use at shutdown are umounted cleanly.

Comment 1 Ian Kent 2021-05-19 01:22:54 UTC
Created attachment 1784646 [details]
Patch - fix offset entries order

Comment 2 Ian Kent 2021-05-19 01:24:07 UTC
Created attachment 1784647 [details]
Patch - use mapent tree root for tree_mapent_add_node()

Comment 3 Ian Kent 2021-05-19 01:25:14 UTC
Created attachment 1784648 [details]
Patch - eliminate redundant cache lookup in tree_mapent_add_node()

Comment 4 Ian Kent 2021-05-19 01:26:31 UTC
Created attachment 1784649 [details]
Patch - fix hosts map offset order

Comment 5 Ian Kent 2021-05-19 01:27:42 UTC
Created attachment 1784650 [details]
Patch - fix direct mount deadlock

Comment 20 errata-xmlrpc 2021-11-09 19:32:44 UTC
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 (autofs bug fix and enhancement update), 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/RHBA-2021:4372


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