Red Hat Bugzilla – Bug 156626
strange bootup failures inside service scripts that.. potentially a problem with failure function
Last modified: 2014-03-16 22:53:41 EDT
Description of problem:
I'm having multiple bootup issues for several service scripts. If any service
script 'fails' using action or failure functions the bootup appears to hang at
that service script.
I've seen this with several services that fail on startup, in order to simplify
the problem I've created a very trivial service script that uses /bin/false to
force a failure condition and instrumented with stupid echo statements. From my
testing it appears the boot up sequence stalls inside the action statement. The
last message i see is:
Doing a simple failure test using /bin/false [FAILED]
with no additional echo statements, indicating the process has gotten hung up in
the failure function from /etc/rc.d/init.d/functions
Attached is the full script that you can use with chkconfig to retest on your
systems. Here is the relevant start function that gets called at boot up.
if action "Doing a simple failure test using $exec" $exec
echo "test 1\n"
action "Looks good" /bin/true
echo "test 2\n"
echo "test 3\n"
echo "the action failed"
echo "test 4\n"
action "lets do another action that succeeds" /bin/true
echo "test 5\n"
echo "test 6\n"
echo "test 7\n"
echo "test 8\n"
[ "$retval" -eq "0" ] && touch $lockfile
echo "test 9\n"
Note that if i switch exec=/bin/true no problems at all. This only happens
when failure function is used.. in any script. In my test case action function
calls failure.. but it also happens in scripts that call failure directly from
Not 100%, more like 9 out of 10
Steps to Reproduce:
1.enable a script you know will call the failure function
2. boot up, preferable with rhgb deactivated
3. watch the system stop responded after recieving the FAILED message
4. requires removal of power to reboot.
The system is rawhide synced as off may 1st, notably:
Created attachment 113928 [details]
drop-dead trivial test script to test failure condition in service start on bootup
*** This bug has been marked as a duplicate of 156355 ***