Bug 312041 - utrace: /proc/<pid>/maps not always accessible when receiving PTRACE_EVENT_EXIT
utrace: /proc/<pid>/maps not always accessible when receiving PTRACE_EVENT_EXIT
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
7
All Linux
medium Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On: 285761
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-28 20:43 EDT by Jan Kratochvil
Modified: 2008-01-14 14:05 EST (History)
3 users (show)

See Also:
Fixed In Version: kernel-2.6.24-0.150.rc7.git4.fc9.x86_64
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-14 14:05:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Testcase. (3.39 KB, text/plain)
2007-09-28 20:43 EDT, Jan Kratochvil
no flags Details

  None (edit)
Description Jan Kratochvil 2007-09-28 20:43:43 EDT
+++ This bug was initially created as a clone of Bug #285761 +++

Backport of the Rawhide Bug for F-7.

Description of problem:
I trace a process using ptrace and the PTRACE_O_TRACEEXIT option. When I get
the PTRACE_EVENT_EXIT notification for the process I examine its memory
mappings by reading /proc/<pid>/maps. This works on vanilla Linux kernels.

On the Fedora kernel this works if the process exited normally, but if it was
killed by a signal I get EACCES when trying to open /proc/<pid>/maps.

I guess this is undocumented behaviour, but it would be good to know if I
should expect a fix or work around the problem somehow.

I am running the x86_64 version of the kernel on a Core 2 T7200.


Version-Release number of selected component (if applicable):
kernel-2.6.22.9-91.fc7.x86_64


How reproducible:
Every time.


Steps to Reproduce:
1. Compile and run the attached test case.


Actual results:
Test case fails to open /proc/<pid>/maps.


Expected results:
Test case prints the contents of /proc/<pid>/maps.
Comment 1 Jan Kratochvil 2007-09-28 20:43:43 EDT
Created attachment 211171 [details]
Testcase.
Comment 2 Christopher Brown 2008-01-14 13:05:49 EST
Hello,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug and will try and assist you in resolving it if I can.

There hasn't been much activity on this bug for a while. Could you tell me if
you are still having problems with the latest kernel?

If the problem no longer exists then please close this bug or I'll do so in a
few days if there is no additional information lodged.
Comment 3 Jan Kratochvil 2008-01-14 14:04:28 EST
(In reply to comment #2)
> There hasn't been much activity on this bug for a while. Could you tell me if
> you are still having problems with the latest kernel?

This bug is formally still valid - its Fedora 8 counterpart is Bug 285761 and
the main tracker page is at: http://sourceware.org/systemtap/wiki/utrace/tests

Bug was already fixed by Roland McGrath upstream:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=00ec99da43a7c2aed46c6595aa271b84bb1b1462;hp=6e800af233e0bdf108efb7bd23c11ea6fa34cdeb
It was verified as already fixed in Rawhide:
  kernel-2.6.24-0.150.rc7.git4.fc9.x86_64
    http://koji.fedoraproject.org/koji/buildinfo?buildID=31270
It was verified as still buggy for the latest Fedora 8 kernel:
  kernel-2.6.23.9-85.fc8.x86_64
Comment 4 Jan Kratochvil 2008-01-14 14:05:20 EST
Closing as RAWHIDE.

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