Re: Debugging stuck mount
From: Morten Hein Tiljeset
Date: Thu Aug 08 2024 - 10:21:13 EST
> It's likely held alive by some random file descriptor someone has open.
> IOW, try and walk all /proc/<pid>/fd/<nr> in that case and see whether
> anything keeps it alive.
Thanks for the suggestion, but I've already tried the equivalent of that by
using a debugger to find the superblock in question and then walking all open
fds and comparing the superblock pointer. I've validated that this approach
works in a synthetic example where I create a new namespace, mount the
filesystem under /mnt, run a program to open /mnt/foo and lazy unmount /mnt.
Walking procfs seems less precise. I've tried iterating through /proc/*/fd/*
and comparing the Device entry of stat -L, also without luck.