Re: Hanging run-parts
> Hello, my cron.daily scripts turned to zombies everyday.
> I described this problem in debian-user, but didn't get any answers.
>
> 11300 ? S 0:03 /usr/sbin/cron
> 3390 ? SW 0:00 \_ /USR/SBIN/CRON
> 3393 ? SW 0:00 | \_ /bin/sh -c test -e /usr/sbin/anacron ||
> run-parts --report /etc/cron.daily 2>&1 | mail -s "[Log]
> 3403 ? SW 0:00 | \_ run-parts --report /etc/cron.daily
> 4373 ? Z 0:00 | | \_ [man-db <defunct>]
> 3404 ? SW 0:00 | \_ mail -s [Log] Daily report from
Maul
> 7789 ? SW 0:00 \_ /USR/SBIN/CRON
> 7792 ? SW 0:00 | \_ /bin/sh -c test -e /usr/sbin/anacron ||
> run-parts --report /etc/cron.daily 2>&1 | mail -s "[Log]
> 7798 ? SW 0:00 | \_ run-parts --report /etc/cron.daily
> 8129 ? Z 0:00 | | \_ [exim <defunct>]
> 7799 ? SW 0:00 | \_ mail -s [Log] Daily report from
Maul
> 1343 ? SW 0:00 \_ /USR/SBIN/CRON
> 1347 ? SW 0:00 \_ /bin/sh -c test -e /usr/sbin/anacron ||
> run-parts --report /etc/cron.daily 2>&1 | mail -s "[Log]
> 1351 ? SW 0:00 \_ run-parts --report /etc/cron.daily
> 2541 ? Z 0:00 | \_ [find <defunct>]
> 1352 ? SW 0:00 \_ mail -s [Log] Daily report from
Maul
> 1365 ? SW 0:00 \_ /USR/SBIN/CRON
> 1366 ? SW 0:00 \_ /bin/sh -c test -e /usr/sbin/anacron ||
> run-parts --report /etc/cron.daily 2>&1 | mail -s "[Log]
> 1367 ? SW 0:00 \_ run-parts --report /etc/cron.daily
> 2560 ? Z 0:00 | \_ [proftpd <defunct>]
> 1361 ? SW 0:00 \_ mail -s [Log] Daily report from
Maul
>
> ps afx output after 4 days of my vacation.
> cron.daily scripts are standart except backup and site_index
> -----------------------------------------
> maul:/lib/modules# ls /etc/cron.daily/
> backup calendar exim find man-db modutils netbase proftpd quota
> samba site_index standard sysklogd
> -----------------------------------------
> backup - uses TOB to backup all changed data on hard disk and transfer
> gzipped tar to my comp via samba mount.
> site_index - uses mnogosearch (www.mnogosearch.org) to index some local
> sites
>
> Both scripts doesn't turn to zombies, it's some standart script everyday.
> cron.daily starts at 9pm.
>
> I will try to separate my scripts to my own cron.mydaily directory today.
> But behavior is bad, because system has free resourses
> -----------------------------------------
> maul:/lib/modules# free
> total used free shared buffers cached
> Mem: 256100 251608 4492 0 1864 32892
> -/+ buffers/cache: 216852 39248
> Swap: 511132 54572 456560
> -----------------------------------------
I separeted my cron scripts to own cron.mydaily directory
Here my crontab file
> -----------------------------------------
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
03 0 * * * root test -e /usr/sbin/anacron || run-parts --report
/etc/cron.logrotate 2>&1 | mail -s "[Log] Logrotate report from Maul" e@mail
0 3 * * * root test -e /usr/sbin/anacron || run-parts --report
/etc/cron.mydaily 2>&1 | mail -s "[Log] MyDaily report from Maul" e@mail
00 9 * * * root test -e /usr/sbin/anacron || run-parts --report
/etc/cron.daily 2>&1 | mail -s "[Log] Daily report from Maul" e@mail
00 1 * * 7 root test -e /usr/sbin/anacron || run-parts --report
/etc/cron.weekly 2>&1 | mail -s "[Log] Weekly report from Maul" e@mail
00 6 1 * * root test -e /usr/sbin/anacron || run-parts --report
/etc/cron.monthly 2>&1 | cat /dev/null
> -----------------------------------------
Now hanging mydaily and daily scripts ...
mydaily contain only 2 script, ps shows that second script is zombie
kill -9 second script doesn't really kill it.
Killing parent process (run-parts) does this job.
And I get a e@mail, which contains
First script completed - OK
Second script completed - OK
It is true... Second script really does its job.
What heppened with run-parts ?
> ---
> Sergey "BeerBong" Polyakov
> chief of WebZavod (http://www.webzavod.ru)
Reply to: