public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug shlibs/16344] New: Linux /proc/PID/map_files/ for deleted files
Date: Wed, 18 Dec 2013 20:16:00 -0000	[thread overview]
Message-ID: <bug-16344-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=16344

            Bug ID: 16344
           Summary: Linux /proc/PID/map_files/ for deleted files
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: shlibs
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com

Backtracing already deleted files does not work:

$ gdb -q -p $p
Attaching to process 12280
.../elfutils/tests/deleted (deleted): No such file or directory.
(gdb) bt
#0  0x472bd360 in ?? ()
Cannot access memory at address 0x2cc946e8

This commonly happens for long-term running processes/daemons which have been
nightly automatically upgraded or which have been nightly prelinked by prelink.

But it could work, recent Linux kernels support /proc/PID/map_files/
demonstrated by elfutils use:
 
https://lists.fedorahosted.org/pipermail/elfutils-devel/2013-December/003638.html

Current Linux kernels (3.11.10) permit only root user as the tracer but (1)
hopefully it gets fixed in the future and (2) at least for the use in ABRT it
is OK as backtracer is run from core dumping hook.

Linux kernels have always supported also /proc/PID/exe which works for deleted
main executable.  It even works for non-root users.  But it works only for the
executable, not for shared libraries.  I find more useful to push for Linux
kernel /proc/PID/map_files/ permissions fix than to implement /proc/PID/exe.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2013-12-18 20:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 20:16 jan.kratochvil at redhat dot com [this message]
2014-02-19 20:13 ` [Bug shlibs/16344] " jan.kratochvil at redhat dot com
2014-03-27 18:27 ` jan.kratochvil at redhat dot com

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=bug-16344-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).