Bug 821419 - RFE: Make accessible mapped + deleted files (shared libraries)
RFE: Make accessible mapped + deleted files (shared libraries)
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-14 08:44 EDT by Jan Kratochvil
Modified: 2012-05-14 11:24 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-14 11:21:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Kratochvil 2012-05-14 08:44:21 EDT
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 11:21:26 EDT
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.