From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21869 invoked by alias); 18 Dec 2013 20:16:04 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 21841 invoked by uid 48); 18 Dec 2013 20:16:04 -0000 From: "jan.kratochvil at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: shlibs X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q4/txt/msg00572.txt.bz2 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.