Bug 185429

Summary: "Stray" processes after a bootup
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: initscriptsAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-11 02:17:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2006-03-14 19:12:11 UTC
Description of problem:

Even after a boot to a single-user mode, or any other level, one can see
in a process table:

....
root       159  0.0  0.0      0     0 ?        S    11:42   0:00 [kswapd0]
root       313  0.0  0.1   2044   688 ?        Ss   11:42   0:00 /bin/nash /init 1
root       391  0.0  0.0      0     0 ?        S    11:42   0:00 [kjournald]
root       455  0.4  0.1   8608   952 ?        S<s  11:42   0:00 /sbin/udevd -d
....

'/sbin/udevd -d' is likely what we want but '/bin/nash' should be gone by
now.  Is this a problem of a stuck nash or 'init' script on initrd is not
really correct?

Maybe 'nash' should know how to "exec"?  It does not seem to have that
capability.  Or it should terminate anyway but it is not doing it?
 
Version-Release number of selected component (if applicable):
mkinitrd-5.0.32-1

How reproducible:
every time

Comment 1 Michal Jaegermann 2006-03-14 19:35:25 UTC
One, rather unclean, way to deal with that would be to put
'pkill nash' somwhere in startup scripts after file systems got
mounted (it is /usr/bin/pkill or use /bin/kill with /sbin/pidof
but then an output of pidof needs to be checked).

Otherwise we are still mapping deleted executables.  
Try 'cat /proc/$(pgrep nash)/maps' to see.

Comment 2 Peter Jones 2006-03-14 20:55:04 UTC
What version of initscripts do you have installed?  They should be doing:

killall nash-hotplug >/dev/null 2>&1

just before starting udev, and that should kill this process.  (nash-hotplug is
the name, but ps displays argv[] rather than the actual process name)

Comment 3 Michal Jaegermann 2006-03-14 21:41:50 UTC
> What version of initscripts do you have installed?
initscripts-8.31-1.  This is the current version available.
> They should be doing ...
Well, yes, they do on line 168 of /etc/rc.d/rc.sysinit
but clearly this is not terminating that process.
Maybe timing?

Oh, I see.  'killall' is /usr/bin/killall and /usr is mounted later.
If you want that at this point then you need something like
 
   nashpid=$(/sbin/pidof nash); [ "$nashpid" ] && /bin/kill $nashpid

This works.  'pidof nash-hotplug' is empty.  Otherwise that killall
can be used further down.

So this looks like initscripts problem.

Comment 4 Michal Jaegermann 2006-05-08 16:43:51 UTC
This bug is still present in FC5 with all updates available 2006-05-08

Comment 5 petrosyan 2008-03-11 01:26:20 UTC
Fedora Core 5 is no longer maintained. Is this bug still present in Fedora 7 or
Fedora 8?

Comment 6 Michal Jaegermann 2008-03-11 02:17:45 UTC
> Is this bug still present in Fedora 7 or Fedora 8?

Hm, let's have a look (which surely you could do equally well
yourself).  Tap, tap, tap ....  No, apparently not.  At least
in an updated Fedora 7 because, IIRC, it was still present just
after a 7 release - although I would not swear that at this moment.