Bug 803632 - Behavior of /proc/***/exe link
Summary: Behavior of /proc/***/exe link
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-15 10:11 UTC by Lukáš Nykrýn
Modified: 2014-06-09 11:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-02 13:01:48 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Lukáš Nykrýn 2012-03-15 10:11:03 UTC
Description of problem:
In some cases /proc/***/exe link does not have (deleted) suffix when the binary changes.

Version-Release number of selected component (if applicable):
[root@rhel5 ~]# uname -a
Linux rhel5 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

Install the squid package

[root@localhost ~]# /etc/init.d/squid start
Spouštím squid: .                                          [  OK  ]
[root@localhost ~]# ps -A | grep squid
 2790 ?        00:00:00 squid
 2793 ?        00:00:00 squid
[root@localhost ~]# cp /usr/sbin/squid /usr/sbin/squid.copy
[root@localhost ~]# mv -f /usr/sbin/squid.copy /usr/sbin/squid

Actual results:
[root@localhost ~]# readlink /proc/2790/exe
/usr/sbin/squid
[root@localhost ~]# readlink /proc/2793/exe
/usr/sbin/squid


Expected results:
As in rhel6

[root@rhel6 ~]# readlink /proc/1919/exe
/usr/sbin/squid (deleted)
[root@rhel6 ~]# readlink /proc/1922/exe
/usr/sbin/squid (deleted)


Additional info:
With more simple binary

#include <unistd.h>
int main()
{while (1) sleep(3600);}

and the same steps link has (deleted) suffix.

This issue causes different behavior of pidof in rhel5 and rhel6 (#760251).

Comment 1 Lukáš Nykrýn 2012-03-17 07:21:56 UTC
Actually there is no difference in used binaries, problem is with their names. It seems that the suffix does not appear, when the name of binary is substring of the name of copy. 
https://bugzilla.redhat.com/show_bug.cgi?id=760251#c9

Comment 2 RHEL Program Management 2012-10-30 06:13:03 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2014-03-07 13:32:58 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 4 RHEL Program Management 2014-06-02 13:01:48 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).


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