From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ismael Farf??n <sulfurfff@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Getting PIDs out of inodes?
Date: Thu, 16 Jan 2014 04:44:15 +0000 [thread overview]
Message-ID: <20140116044414.GV10323@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CANXECd7hFohMQxYpLX3Cfzn7fghsesQTD1S1pHPS4_TvWHR7ow@mail.gmail.com>
On Wed, Jan 15, 2014 at 04:08:01PM -0600, Ismael Farf??n wrote:
> Hello list.
>
> I'm struggling with a problem involving some orphan descriptors I
> found in a crash dump.
>
> I'd like to know who created or inherited (as in fork) them. I mustn't
> talk ill of the dead, but they are my prime suspects because of this
> (doesn't shows with ps):
> [49886.362859] umount.nfs[8425]: segfault at 19... bla bla
>
> Given what I read[1,2], there doesn't seem to be a direct way to get
> the struct file (which contains a PID) out of the inode.
That makes no sense. struct file does *not* contain a PID.
> I don't know if it's possible to script an iteration with crash over
> all tasks in search of a particular inode.
> DENTRY INODE TYPE PATH
> ffff880936419900 ffff8808d17c5518 REG foo.txt
>
> Any ideas on how to know who created the file descriptors?
... and descriptor != struct file. Moreover, if "who?" is "which process?",
it might have been dead, buried and its PID reused a long time ago - opened
file can easily outlive the process that had opened it. What are you actually
trying to do? Details, please...
next prev parent reply other threads:[~2014-01-16 4:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 22:08 Getting PIDs out of inodes? Ismael Farfán
2014-01-16 4:44 ` Al Viro [this message]
2014-01-16 16:14 ` Ismael Farfán
2014-01-16 19:02 ` J. Bruce Fields
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=20140116044414.GV10323@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sulfurfff@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.