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 1651257 - access to automounted dir with expiration time set can hang
Summary: access to automounted dir with expiration time set can hang
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-19 14:41 UTC by David Tardon
Modified: 2019-08-06 12:43 UTC (History)
4 users (show)

Fixed In Version: systemd-219-64.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:43:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1572543 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1596241 1 None None None 2022-03-13 15:10:30 UTC
Red Hat Product Errata RHSA-2019:2091 0 None None None 2019-08-06 12:43:55 UTC

Internal Links: 1572543 1596241

Description David Tardon 2018-11-19 14:41:10 UTC
Description of problem:
If an expiration time is set for an automount unit, an access to the automounted dir after it expired will hang if 'systemd daemon-reload' was run meanwhile.

Version-Release number of selected component (if applicable):
systemd-219.57.el7

How reproducible:
always

Steps to Reproduce:
# Setup
1. mkdir /etc/systemd/system/proc-sys-fs-binfmt_misc.automount.d
2. echo -e "[Automount]\nTimeoutIdleSec=5s" > /etc/systemd/system/proc-sys-fs-binfmt_misc.automount.d/timeout.conf # set up expiration time
3. systemctl daemon-reload # load the new config
4. systemctl restart proc-sys-fs-binfmt_misc.automount # optional, just to be sure
5. ls /proc/sys/fs/binfmt_misc # trigger the automount
6. sleep 5 # now let it expire
7. systemctl daemon-reload # trigger the bug
8. ls /proc/sys/fs/binfmt_misc # hang

Actual results:
ls hangs.

Expected results:
ls shows the content of the dir.

Additional info:
This is a regression in systemd-219-59 (7.5), caused by patch 0561-automount-if-an-automount-unit-is-masked-don-t-react.patch .

The bug can manifest itself during update from 7.3 to 7.5/7.6 (but not from 7.4 to 7.5), because systemd-219-30 in 7.3 hardcodes expiration timeout to 5min (expiration is disabled by default from 7.4 up). However, systemd-219-30 doesn't actually handle expiration. That was only fixed in systemd-219-42 in 7.4. And there is a lot of daemon-reloads run during the update.

Comment 2 David Tardon 2018-11-19 15:34:18 UTC
https://github.com/lnykryn/systemd-rhel/pull/243

Comment 3 kevin 2018-11-21 02:37:30 UTC
hello, 
what about 7.2? my issue happened in 7.2 with 'systemd-219-19.el7.x86_64' installed. I also did the steps to reproduce, but it didnt work on 7.2.

additional info:
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)

Thanks!

Comment 4 David Tardon 2018-11-21 08:59:10 UTC
(In reply to kevin from comment #3)
> hello, 
> what about 7.2? my issue happened in 7.2 with 'systemd-219-19.el7.x86_64'
> installed. I also did the steps to reproduce, but it didnt work on 7.2.

systemd didn't even handle automount expiration before 7.4. And the patch that causes this bug was added in 7.5. So whatever problem you have, it's something different than this.

Comment 6 Lukáš Nykrýn 2019-02-11 09:43:25 UTC
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/243 -> post

Comment 10 errata-xmlrpc 2019-08-06 12:43:36 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, 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/RHSA-2019:2091


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