-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-9.6
-
None
-
No
-
Low
-
rhel-systemd
-
5
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
A customer is seeing a delay of 5 seconds when logging in through ssh. It appears that the delay is due to executing hostnamectl command from inside /etc/profile, which leads to having systemd spawn systemd-hostnamed, the latter taking 5 seconds to complete.
The delay in the spawning is faced before executing systemd-hostnamed but while doing the remounts: processing of /proc/self/mountinfo is performed 104 times for the customer and the file contains 2832 lines.
This issue looks very similar to RHEL8's one RHEL-106970 even though it's less critical here because there is no utab parsing anymore.
What is the impact of this issue to you?
Long delays spawning login shells
Please provide the package NVR for which the bug is seen:
systemd-252-46.el9_5.3
systemd-252-51.el9_6.2
How reproducible is this bug?:
Always on customer system, it's sufficient to log in while having a large mount table.
Reproducer
With ~4000 mounts, it takes 4.6s to execute hostnamectl command:
- On my laptop I export /root and create 100 subdirectories /root/%d
- On the RHEL9 VM I mount these NFS exports
# for i in $(seq 1 100); do mkdir -p /root/$i; mount NFSSERVER:/root/$i /root/$i; done
- On the RHEL9 VM I bind-mount these NFS exports 40 times each
# for i in $(seq 1 40); do mkdir -p /mnt/binds/$i; for j in $(seq 1 100); do mkdir -p /mnt/binds/$i/$j; mount --bind /root/$i /mnt/binds/$i/$j; done; done
- I execute hostnamectl
# systemctl is-active systemd-hostnamed inactive # time hostnamectl [...] real 0m4.667s user 0m0.005s sys 0m0.006s
- is related to
-
RHEL-106970 Cannot start services configured with ProtectHome=yes due to having many mounts and huge number of lines in /run/mount/utab
-
- New
-