Bug 821419 - RFE: Make accessible mapped + deleted files (shared libraries)
Summary: RFE: Make accessible mapped + deleted files (shared libraries)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-14 12:44 UTC by Jan Kratochvil
Modified: 2012-05-14 15:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-14 15:21:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Kratochvil 2012-05-14 12:44:21 UTC
Description of problem:
If a process is running its executable + shared libraries may be already deleted. If that process crashes we can no longer analyse the core file as its shared libraries are no longer available

Currently one has to create whole new chroot with the older libraries installed, this is very time consuming (ABRT Retrace Server).  One could just download the older separate .debug files and using the libraries which were available at the core dumping time.

Version-Release number of selected component (if applicable):
kernel-3.3.5-2.fc16.x86_64

How reproducible:
Always.

Steps to Reproduce:
xz >/dev/null & p=$!; yum some downgrade/update; cat /proc/$p/maps

Actual results:
No way to access /usr/lib64/liblzma.so.5.0.99.
$ cat /proc$p/maps
39cfe00000-39cfe23000 r-xp 00000000 00:11 27528913 /usr/lib64/liblzma.so.5.0.99 (deleted)
39cfe23000-39d0023000 ---p 00023000 00:11 27528913 /usr/lib64/liblzma.so.5.0.99 (deleted)
39d0023000-39d0024000 r--p 00023000 00:11 27528913 /usr/lib64/liblzma.so.5.0.99 (deleted)
39d0024000-39d0025000 rw-p 00024000 00:11 27528913 /usr/lib64/liblzma.so.5.0.99 (deleted)

Expected results:
Make them accessible for example by:
cat /proc/$p/mappedfiles/00:11-27528913 >/tmp/liblzma.so.5.0.99

Additional info:
The executable itself is already accessible as /proc/$p/exe.
One can 'cat' it out even if it is already deleted during core dumping time by /proc/sys/kernel/core_pattern command.

Comment 1 Dave Jones 2012-05-14 15:21:26 UTC
I recommend bringing this up on lkml/linux-mm.


Note You need to log in before you can comment on or make changes to this bug.