mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Morten Hein Tiljeset" <morten@tiljeset.com>
To: "Christian Brauner" <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Debugging stuck mount
Date: Thu, 08 Aug 2024 16:20:43 +0200	[thread overview]
Message-ID: <e244e74d-9e26-4d4e-a575-ea4908a8a893@app.fastmail.com> (raw)
In-Reply-To: <20240808-hangar-jobverlust-2235f6ef0ccb@brauner>

> 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.

  reply	other threads:[~2024-08-08 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  9:40 Morten Hein Tiljeset
2024-08-08 12:32 ` Christian Brauner
2024-08-08 14:20   ` Morten Hein Tiljeset [this message]
2024-08-08 14:58     ` Christian Brauner
2024-08-09  7:39       ` Morten Hein Tiljeset
2024-08-09 12:41         ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e244e74d-9e26-4d4e-a575-ea4908a8a893@app.fastmail.com \
    --to=morten@tiljeset.com \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®