Notifications from /proc/self/mountinfo are async, so if we stop a service (and while doing so get rid of the credentials mount point of it), then it will take a while until the notification reaches us and we actually scan the table again. In particular as we nowadays ratelimit notifications on the table, since it's so inefficient. And as I learnt the ratelimiting is actually quite regularly hit during shutdown, where a flurry of umount events are genreated. Hence, let's check if a mount point is actually a mountpoint before trying to unmount it. And if it isn't let's wait for the notification to come in. (This race might be triggred not just by us on ourselves btw: there are other daemons that unmount stuff when stopping where the race also exists, but might simply be harder to trigger: if during service shutdown these services remove some mount then they might collide with us doing the same. After all, we have the rule to unmount everything mounted automatically for you during shutdown.) In the long run we should also start making us of this when it becomes available: https://github.com/util-linux/util-linux/issues/2132 With that we can make issues like this go away entirely from our side of things at least. Fixes: #25527
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
