Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 156626 - strange bootup failures inside service scripts that.. potentially a problem with failure function
Summary: strange bootup failures inside service scripts that.. potentially a problem w...
Keywords:
Status: CLOSED DUPLICATE of bug 156355
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-02 17:39 UTC by Jef Spaleta
Modified: 2014-03-17 02:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-02 18:19:28 UTC


Attachments (Terms of Use)
drop-dead trivial test script to test failure condition in service start on bootup (deleted)
2005-05-02 17:39 UTC, Jef Spaleta
no flags Details

Description Jef Spaleta 2005-05-02 17:39:16 UTC
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 17:39:16 UTC
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 18:19:28 UTC

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