[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug in cronscript?



> Oh, you mean that it fails when you run the script by hand too, not just
> when it's run from cron? Interesting. I wonder if your /bin/sh is
> something strange.

Should  be a standard Woody install?

> Since you're stracing the shell script, you'll need to add the -f option
> to strace to make sure it traces child processes.

Ok, that gives 147k of output.. what am i looking for?

the last piece is

                         = 022
6199  stat64("/var/lib/locate/locatedb", 0xbffffc3c) = -1 ENOENT (No such
file or directory)
6199  lstat64("/var/lib/locate/locatedb.n", {st_mode=S_IFREG|0644,
st_size=10, ...}) = 0
6199  lstat64("/var/lib/locate/locatedb", 0xbffffa7c) = -1 ENOENT (No such
file or directory)
6199  rename("/var/lib/locate/locatedb.n", "/var/lib/locate/locatedb") = 0
6199  _exit(0)                          = ?
6180  <... wait4 resumed> [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) =
6199
6180  rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [CHLD], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  --- SIGCHLD (Child exited) ---
6180  wait4(-1, 0xbffff3d8, WNOHANG, NULL) = -1 ECHILD (No child processes)
6180  sigreturn()                       = ? (mask now [])
6180  rt_sigaction(SIGINT, {SIG_DFL}, {0x806e2f8, [], 0x4000000}, 8) = 0
6180  stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
6180  stat64("/bin/chmod", {st_mode=S_IFREG|0755, st_size=15816, ...}) = 0
6180  stat64("/bin/chmod", {st_mode=S_IFREG|0755, st_size=15816, ...}) = 0
6180  rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
6180  fork()                            = 6200
6180  rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
6200  getpid( <unfinished ...>
6180  <... rt_sigprocmask resumed> NULL, 8) = 0
6200  <... getpid resumed> )            = 6200
6180  rt_sigprocmask(SIG_BLOCK, [CHLD],  <unfinished ...>
6200  close(255 <unfinished ...>
6180  <... rt_sigprocmask resumed> [], 8) = 0
6200  <... close resumed> )             = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD],  <unfinished ...>
6200  rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
6180  <... rt_sigprocmask resumed> [CHLD], 8) = 0
6200  <... rt_sigprocmask resumed> NULL, 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [CHLD],  <unfinished ...>
6200  rt_sigaction(SIGTSTP, {SIG_DFL},  <unfinished ...>
6180  <... rt_sigprocmask resumed> NULL, 8) = 0
6200  <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
6200  rt_sigaction(SIGTTIN, {SIG_DFL},  <unfinished ...>
6180  <... rt_sigprocmask resumed> NULL, 8) = 0
6200  <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD],  <unfinished ...>
6200  rt_sigaction(SIGTTOU, {SIG_DFL},  <unfinished ...>
6180  <... rt_sigprocmask resumed> [], 8) = 0
6200  <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
6180  rt_sigaction(SIGINT, {0x806e2f8, [], 0x4000000},  <unfinished ...>
6200  rt_sigaction(SIGHUP, {SIG_DFL},  <unfinished ...>
6180  <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
6200  <... rt_sigaction resumed> {0x8078c0c, [], 0x4000000}, 8) = 0
6180  wait4(-1,  <unfinished ...>
6200  rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
6200  rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0
6200  rt_sigaction(SIGTERM, {SIG_DFL}, {0x8078c0c, [], 0x4000000}, 8) = 0
6200  rt_sigaction(SIGCHLD, {SIG_DFL}, {0x806f070, [], 0x4000000}, 8) = 0
6200  execve("/bin/chmod", ["chmod", "644", "/var/lib/locate/locatedb"], [/*
15 vars */]) = 0
6200  uname({sys="Linux", node="cookiemonster", ...}) = 0
6200  brk(0)                            = 0x804cb04
6200  open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
6200  open("/etc/ld.so.cache", O_RDONLY) = 3
6200  fstat64(3, {st_mode=S_IFREG|0644, st_size=10154, ...}) = 0
6200  old_mmap(NULL, 10154, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
6200  close(3)                          = 0
6200  open("/lib/libc.so.6", O_RDONLY)  = 3
6200  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"...,
1024) = 1024
6200  fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
6200  old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40017000
6200  mprotect(0x4012a000, 40160, PROT_NONE) = 0
6200  old_mmap(0x4012a000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x4012a000
6200  old_mmap(0x40130000, 15584, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40130000
6200  close(3)                          = 0
6200  munmap(0x40014000, 10154)         = 0
6200  brk(0)                            = 0x804cb04
6200  brk(0x804cb2c)                    = 0x804cb2c
6200  brk(0x804d000)                    = 0x804d000
6200  lstat64("/var/lib/locate/locatedb", {st_mode=S_IFREG|0644, st_size=10,
...}) = 0
6200  chmod("/var/lib/locate/locatedb", 0644) = 0
6200  _exit(0)                          = ?
6180  <... wait4 resumed> [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) =
6200
6180  rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [CHLD], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  --- SIGCHLD (Child exited) ---
6180  wait4(-1, 0xbffff4b8, WNOHANG, NULL) = -1 ECHILD (No child processes)
6180  sigreturn()                       = ? (mask now [])
6180  rt_sigaction(SIGINT, {SIG_DFL}, {0x806e2f8, [], 0x4000000}, 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  read(255, "\nexit 0\n", 5912)     = 8
6180  rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6180  _exit(0)                          = ?
6179  <... wait4 resumed> [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) =
6180
6179  rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [CHLD], 8) = 0
6179  rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
6179  rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
6179  rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
6179  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6179  --- SIGCHLD (Child exited) ---
6179  wait4(-1, 0xbffff758, WNOHANG, NULL) = -1 ECHILD (No child processes)
6179  sigreturn()                       = ? (mask now [])
6179  rt_sigaction(SIGINT, {SIG_DFL}, {0x806e2f8, [], 0x4000000}, 8) = 0
6179  rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
6179  rt_sigprocmask(SIG_BLOCK, [CHLD TTOU], [], 8) = 0
6179  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6179  rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
6179  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
6179  read(255, "", 277)                = 0
6179  _exit(0)                          = ?
cookiemonster:~#


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: