Bug 803632

Summary: Behavior of /proc/***/exe link
Product: Red Hat Enterprise Linux 5 Reporter: Lukáš Nykrýn <lnykryn>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED WONTFIX QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: dwd, lnykryn
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 09:01:48 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Lukáš Nykrýn 2012-03-15 06:11:03 EDT
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
[root@localhost ~]# readlink /proc/2793/exe

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 03:21:56 EDT
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. 
Comment 2 RHEL Product and Program Management 2012-10-30 02:13:03 EDT
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 Product and Program Management 2014-03-07 08:32:58 EST
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 Product and Program Management 2014-06-02 09:01:48 EDT
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).