init failing to shutdown system

init failing to shutdown system

Post by Chad Willia » Sun, 02 Mar 2003 13:14:13



This was on a 280r with solaris 2.8, patchlevel 14. I tried shutdown,
and then init 6 both to no avail, system would just keep on ticking at
the same run level, none of the shutdown scripts would  run.

#[/root]# truss init 6

execve("/usr/sbin/init", 0xFFBEFDA4, 0xFFBEFDB0)  argc = 2
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF3A0000
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
open("/usr/lib/libpam.so.1", O_RDONLY)          = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF390000
mmap(0x00000000, 98304, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF370000
mmap(0xFF386000, 2839, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 24576) = 0xFF386000
munmap(0xFF376000, 65536)                       = 0
memcntl(0xFF370000, 6660, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libmp.so.2", O_RDONLY)           = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 90112, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF350000
mmap(0xFF364000, 865, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 16384) = 0xFF364000
munmap(0xFF354000, 65536)                       = 0
memcntl(0xFF350000, 3124, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libcmd.so.1", O_RDONLY)          = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 90112, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF330000
mmap(0xFF344000, 1155, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 16384) = 0xFF344000
munmap(0xFF334000, 65536)                       = 0
memcntl(0xFF330000, 4344, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libsocket.so.1", O_RDONLY)       = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 114688, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF310000
mmap(0xFF32A000, 4365, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 40960) = 0xFF32A000
munmap(0xFF31A000, 65536)                       = 0
memcntl(0xFF310000, 14496, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libbsm.so.1", O_RDONLY)          = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 155648, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF2E0000
mmap(0xFF302000, 8744, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 73728) = 0xFF302000
munmap(0xFF2F2000, 65536)                       = 0
memcntl(0xFF2E0000, 20896, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libnsl.so.1", O_RDONLY)          = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 704512, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF200000
mmap(0xFF29C000, 32732, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 573440) = 0xFF29C000
mmap(0xFF2A4000, 30920, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF2A4000
munmap(0xFF28C000, 65536)                       = 0
memcntl(0xFF200000, 82236, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libkstat.so.1", O_RDONLY)        = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF2C0000
mmap(0xFF2D2000, 460, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 8192) = 0xFF2D2000
munmap(0xFF2C2000, 65536)                       = 0
memcntl(0xFF2C0000, 2244, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libc.so.1", O_RDONLY)            = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
mmap(0x00000000, 794624, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF100000
mmap(0xFF1BA000, 24692, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 696320) = 0xFF1BA000
munmap(0xFF1AA000, 65536)                       = 0
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF1F0000
memcntl(0xFF100000, 113380, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)                                        = 0
open("/usr/lib/libdl.so.1", O_RDONLY)           = 3
fstat(3, 0xFFBEF4DC)                            = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF390000
close(3)                                        = 0
open("/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1", O_RDONLY) = 3
fstat(3, 0xFFBEF36C)                            = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF1E0000
mmap(0x00000000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xFF1D0000
close(3)                                        = 0
munmap(0xFF1E0000, 8192)                        = 0
umask(022)                                      = 022
umask(022)                                      = 022
brk(0x000291A8)                                 = 0
brk(0x0002B1A8)                                 = 0
getpid()                                        = 5255 [5254]
auditsys(BSM_AUDITCTL, 0x00000014)              Err#22 EINVAL
getuid()                                        = 0 [0]
auditsys(BSM_AUDITCTL, 0x00000014)              Err#22 EINVAL
alarm(0)                                        = 0
sigaction(SIGALRM, 0xFFBEFA78, 0xFFBEFB28)      = 0
sigfillset(0xFF1C0910)                          = 0
sigprocmask(SIG_BLOCK, 0xFFBEFB18, 0xFFBEFB08)  = 0
alarm(5)                                        = 0
sigsuspend(0xFFBEFAF8)          (sleeping...)
    Received signal #14, SIGALRM, in sigsuspend() [caught]
sigsuspend(0xFFBEFAF8)                          Err#4 EINTR
setcontext(0xFFBEF7E0)
alarm(0)                                        = 0
sigprocmask(SIG_UNBLOCK, 0xFFBEFB18, 0x00000000) = 0
sigaction(SIGALRM, 0xFFBEFA78, 0x00000000)      = 0
kill(1, SIGFPE)                                 = 0
llseek(0, 0, SEEK_CUR)                          = 9192
_exit(0)

 
 
 

init failing to shutdown system

Post by Darren Dunha » Mon, 03 Mar 2003 15:50:48



> This was on a 280r with solaris 2.8, patchlevel 14. I tried shutdown,
> and then init 6 both to no avail, system would just keep on ticking at
> the same run level, none of the shutdown scripts would  run.

Are any startup/shutdown scripts still running from boot?  If init
doesn't finish rc3, it'll ignore other requests.

'ps -ef | grep rc'

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

 
 
 

1. /etc/rc.shutdown, init, and the shutdown/reboot/halt commands

After learning of the ability to run a script (/etc/rc.shutdown) at
shutdown time in FreeBSD 2.2.5, I was somewhat surprised to discover
exactly how and when it is invoked!

My first attempts to run the shutdown script failed dismally.  Every
time I did a "shutdown -h ..." or "shutdown -r ...", the system simply
shutdown.  No script was run!  I looked at the init code and it looked
like it should be run so I simply executed the command "kill -TERM 1"
and, lo and behold, the script ran as I expected it to.

Further investigation of the 'shutdown' program showed that a SIGTERM is
_NOT_ sent to init.  It simply invokes the 'reboot' or 'halt' programs,
neither of which send a SIGTERM to init.

Given my habit of using shutdown/reboot/halt to bring a system down, I
am rather curious as to how the designer/coder of this new "feature"
intented it be used.  Are we looking at incomplete functionality?

I can get around the problem by renaming shutdown, reboot, and halt to
something else and putting my own shutdown in their place that _DOES_ do
a kill -TERM on init but that seems rather kludgy!

Tony

2. user can't ypcat passwd, but root can

3. Return key fails after init 1 init 3

4. Diamond Stealth II S22o inst instructions

5. System hangs after partition check (init fails?)

6. Help: collision SCCS and C format

7. Installation fails on root file system init...

8. UDP Source IP on Solaris 2.6

9. ***HELP! Fail to kill process during system shutdown

10. INIT/reboot/shutdown problems: Please HELP

11. INIT errors during shutdown???

12. Init Shutdown Sequence from Case's Power Button?

13. shutdown or init command not responding