Bug 156626 - strange bootup failures inside service scripts that.. potentially a problem with failure function
strange bootup failures inside service scripts that.. potentially a problem w...
Status: CLOSED DUPLICATE of bug 156355
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-02 13:39 EDT by Jef Spaleta
Modified: 2014-03-16 22:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-02 14:19:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
drop-dead trivial test script to test failure condition in service start on bootup (1.18 KB, text/plain)
2005-05-02 13:39 EDT, Jef Spaleta
no flags Details

  None (edit)
Description Jef Spaleta 2005-05-02 13:39:16 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.

exec=/bin/false
lockfile=/var/lock/subsys/jeftest
#exec=/bin/true
start() {
    if action "Doing a simple failure test using $exec" $exec
        then
        echo "test 1\n"
        action "Looks good" /bin/true
        echo "test 2\n"
    else
        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"
        sleep 3
        echo "test 6\n"
    fi
    echo "test 7\n"
    retval=$?
    echo "test 8\n"
    [ "$retval" -eq "0" ] && touch $lockfile
    echo "test 9\n"
    return $retval
}


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
start.


How reproducible:
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:
initscripts-8.09-1
kernel-smp-2.6.11-1.1276_FC4
SysVinit-2.85-39
Comment 1 Jef Spaleta 2005-05-02 13:39:16 EDT
Created attachment 113928 [details]
drop-dead trivial test script to test failure condition in service start on bootup
Comment 2 Bill Nottingham 2005-05-02 14:19:28 EDT

*** This bug has been marked as a duplicate of 156355 ***

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