[BusyBox 0004554]: poweroff, shutdown, halt require -f to function in 1.11.1

bugs at busybox.net bugs at busybox.net
Sat Sep 20 16:15:02 UTC 2008


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=4554 
====================================================================== 
Reported By:                edwardsm
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   4554
Category:                   Documentation
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             08-12-2008 20:13 PDT
Last Modified:              09-20-2008 09:15 PDT
====================================================================== 
Summary:                    poweroff, shutdown, halt require -f to function in
1.11.1
Description: 
Poweroff, shutdown and halt return to the prompt and do nothing.  This was
not
an issue in the previous installed 1.1.0, but that version would not
properly
start my application startup scripts from /etc/rc.sysinit. The 1.11.1
starts my
applications just fine, but I can only stop the system by adding the "-f"
option
to shutdown or poweroff.

====================================================================== 

---------------------------------------------------------------------- 
 edwardsm - 08-13-08 15:17  
---------------------------------------------------------------------- 
A rebuild using the "defconfig" on a different platform yielded a working
executable.  The inotifyd had to be removed again, but otherwise it was
unchanged.
Execution of scripts and reboot work fine.  The defect is obviously config
dependent.  A build on Fedora 9 (P4) built a static image that seg faults
when
executed on the 2.4.34.1 kernel.

 

---------------------------------------------------------------------- 
 vda - 08-14-08 14:55  
---------------------------------------------------------------------- 
Please do "strace -o pwoff.log poweroff" and post the log. 

---------------------------------------------------------------------- 
 vda - 09-20-08 09:15  
---------------------------------------------------------------------- 
One of possible issues here is that init may try to print some messages:

        m = "reboot";
        ...
        message(L_CONSOLE | L_LOG, "Requesting system %s", m);

If write() to console blocks, init will be unable to proceed.

Fix: add in init_main():

        console_init();
+       fcntl(STDERR_FILENO, F_SETFL, fcntl(STDERR_FILENO, F_GETFL) |
O_NONBLOCK); 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-12-08 20:13  edwardsm       New Issue                                    
08-12-08 20:13  edwardsm       Status                   new => assigned     
08-12-08 20:13  edwardsm       Assigned To               => BusyBox         
08-13-08 15:17  edwardsm       Note Added: 0010414                          
08-13-08 15:17  edwardsm       Note Edited: 0010414                         
08-14-08 14:55  vda            Note Added: 0010424                          
09-20-08 09:15  vda            Note Added: 0011724                          
======================================================================




More information about the busybox-cvs mailing list