Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fcron problems: fcrondyn ls crashes fcron
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 273

PostPosted: Mon Mar 25, 2013 10:44 am    Post subject: fcron problems: fcrondyn ls crashes fcron Reply with quote

Hi,


My fcron installation has problems. I'll try to tackle one issue at a time:

Whenever I do an ls in the fcrondyn shell, fcrondyn exits after a (partial?) listing and when I then check fcron using '/etc/init.d/fcron status', I get the message that fcron has crashed. This is a perfectly reproducable crash.

How should I fix/analyze this problem?


TIA,

Erik
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1538

PostPosted: Mon Mar 25, 2013 7:49 pm    Post subject: Reply with quote

equaeghe ...

I can't reproduce this with the stable fcron:

Code:
# equery list fcron
sys-process/fcron-3.1.1
# fcrondyn -i
fcrondyn>ls systab
ID    SCHEDULE         CMD
1     03/25/2013 20:50 test -x /usr/sbin/run-crons && /usr/sbin/run-crons
0     03/25/2013 20:57 /usr/libexec/check_system_crontabs -s 0
5     03/25/2013 20:59 rm -f /var/spool/cron/lastrun/cron.hourly
4     03/26/2013 03:09 rm -f /var/spool/cron/lastrun/cron.daily
3     03/30/2013 04:19 rm -f /var/spool/cron/lastrun/cron.weekly
2     04/01/2013 05:29 rm -f /var/spool/cron/lastrun/cron.monthly

best ... khay
Back to top
View user's profile Send private message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 273

PostPosted: Tue Mar 26, 2013 8:49 am    Post subject: Reply with quote

khayyam wrote:
I can't reproduce this with the stable fcron:


I'm also using stable fcron...

Code:
# equery list fcron
 * Searching for fcron ...
[IP-] [  ] sys-process/fcron-3.1.1:0
# /etc/init.d/fcron status
 * status: started                                   
# fcrondyn -x 'ls systab'                                                                           
ID    SCHEDULE         CMD                                                                                     
3     03/31/2013 03:56 /usr/local/bin/backup+mount.sh internal monthly                                         
7     03/31/2013 03:56 /usr/local/bin/backup+mount.sh external monthly                                         
connection closed by fcron                                                                                     
# /etc/init.d/fcron status                                                                         
 * status: crashed
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1538

PostPosted: Tue Mar 26, 2013 1:14 pm    Post subject: Reply with quote

equaeghe ...

ok, it looks as though your trying to pass parameters to the script, and I suspect there are extraneous characters from the way that fcrondyn outputs it. Also, this doesn't look like the "system crontab" as there is no *.{daily,weekly,monthly}, did you run 'emerge --config sys-process/fcron' on emerging?

It seems the obvious solution would be to remove the old systab, run 'emerge --config sys-process/fcron' and add 'backup-internal.sh' and 'backup-external.sh' (u+x) to /etc/cron.monthly calling '/usr/local/bin/backup+mount.sh' with their respective parameters.

HTH & best ... khay
Back to top
View user's profile Send private message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 273

PostPosted: Tue Mar 26, 2013 3:20 pm    Post subject: Reply with quote

khayyam wrote:
ok, it looks as though your trying to pass parameters to the script, and I suspect there are extraneous characters from the way that fcrondyn outputs it. Also, this doesn't look like the "system crontab" as there is no *.{daily,weekly,monthly}, did you run 'emerge --config sys-process/fcron' on emerging?


No, it seems not...

khayyam wrote:
It seems the obvious solution would be to remove the old systab, run 'emerge --config sys-process/fcron' and add 'backup-internal.sh' and 'backup-external.sh' (u+x) to /etc/cron.monthly calling '/usr/local/bin/backup+mount.sh' with their respective parameters.


Ok. I re-emerged fcron, did `fcrontab -r -u systab` (after saving its contents, my fcron'ed backup planning, to /root/systab.save), did `emerge --config sys-process/fcron`, `cp systab.save /etc/cron.d/backup`, and `/usr/libexec/check_system_crontabs -s 0`. Now I have:

Code:
# fcrondyn -x ls
ID    USER   SCHEDULE         CMD
21    systab 03/26/2013 16:10 test -x /usr/sbin/run-crons && /usr/sbin/run-crons
12    systab 03/26/2013 16:12 /usr/libexec/check_system_crontabs -s 0
13    systab 03/26/2013 16:14 /usr/local/bin/backup+mount.sh external monthly
14    systab 03/26/2013 16:21 /usr/local/bin/backup+mount.sh external weekly
15    systab 03/26/2013 16:29 /usr/local/bin/backup+mount.sh external daily
16    systab 03/26/2013 16:36 /usr/local/bin/backup+mount.sh external hourly
17    systab 03/26/2013 16:44 /usr/local/bin/backup+mount.sh internal monthly
18    systab 03/26/2013 16:51 /usr/local/bin/backup+mount.sh internal weekly
25    systab 03/26/2013 16:59 rm -f /var/spool/cron/lastrun/cron.hourly
19    systab 03/26/2013 16:59 /usr/local/bin/backup+mount.sh internal daily
20    systab 03/26/2013 17:06 /usr/local/bin/backup+mount.sh internal hourly
24    systab 03/27/2013 03:09 rm -f /var/spool/cron/lastrun/cron.daily
23    systab 03/30/2013 04:19 rm -f /var/spool/cron/lastrun/cron.weekly
22    systab 04/01/2013 05:29 rm -f /var/spool/cron/lastrun/cron.monthly


I'll see whether that works for a couple of days, but I already think you provided me with the winning clue, thanks!
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1538

PostPosted: Tue Mar 26, 2013 4:50 pm    Post subject: Reply with quote

equaeghe wrote:
Ok. I re-emerged fcron, did `fcrontab -r -u systab` (after saving its contents, my fcron'ed backup planning, to /root/systab.save), did `emerge --config sys-process/fcron`, `cp systab.save /etc/cron.d/backup`, and `/usr/libexec/check_system_crontabs -s 0`.

equaeghe ... by doing this you duplicate the systab, so just run 'emerge --config sys-process/fcron'. This will take the content of /etc/crontab (system crontab) and turn it into systab. The comment in /etc/crontab re running 'crontab /etc/crontab' is confusing, as that file is provided by fcron, and when you emerge fcron it provides postinst info to run 'emerge --config sys-process/fcron'.

So, start from a clean slate:

Code:
# /etc/init.d/fcron stop
# rm /var/spool/fcron/systab*
# emerge --config sys-process/fcron
# /etc/init.d/fcron start

That should provide a systab with only the content of the current /etc/crontab. However, I'd suggest you don't use /etc/crontab for anything other than the default systab (because its not, by default, fcrons 'systab'), edit it to just have those jobs provided with the default config ... *then* ... run backup+mount.sh with the respective parameters from /etc/cron.monthly/ via seperate scripts. The reason being that if you use use /etc/crontab then you will have a situtation where your editing a file that fcron doesn't use.

HTH & best ... khay
Back to top
View user's profile Send private message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 273

PostPosted: Tue Mar 26, 2013 7:12 pm    Post subject: Reply with quote

khayyam wrote:
equaeghe wrote:
Ok. I re-emerged fcron, did `fcrontab -r -u systab` (after saving its contents, my fcron'ed backup planning, to /root/systab.save), did `emerge --config sys-process/fcron`, `cp systab.save /etc/cron.d/backup`, and `/usr/libexec/check_system_crontabs -s 0`.

equaeghe ... by doing this you duplicate the systab, so just run 'emerge --config sys-process/fcron'. This will take the content of /etc/crontab (system crontab) and turn it into systab. The comment in /etc/crontab re running 'crontab /etc/crontab' is confusing, as that file is provided by fcron, and when you emerge fcron it provides postinst info to run 'emerge --config sys-process/fcron'.


I'm sorry, but here I must disagree, what I do makes perfect sense and is in line with the use of check_system_crontabs (see this file for info). I do not want to put my backup script in the /etc/cron.{hourly,daily,weekly,monthly} directories, because my definition of hourly, daily, weekly, and monthly is based on my estimate of how much uptime I will have (a 'day' is about 8 hours, etc.). (I am also not sure the scripts in /etc/cron.{hourly,daily,weekly,monthly} are run by uptime or wall time and how they work in light of much downtime). Also note that I do not touch /etc/crontab and that my `fcrondyn -x ls` output is now as it should be.

Cheers,

Erik
Back to top
View user's profile Send private message
luciano
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 88

PostPosted: Fri Oct 18, 2013 8:45 pm    Post subject: Reply with quote

Hi Erik,

I'm also having the same problem when running 'fcrondyn -x ls', causing the process to crash. I see the following in the system logs:

Code:

Oct 18 21:41:24 [fcron] Client's pid=15352, uid=0, gid=0 username=root_
Oct 18 21:41:24 [kernel] [17082.021254] fcron[15336]: segfault at 10 ip 000000000040ee19 sp 00007fffeb0c1240 error 4 in fcron[400000+17000]
Oct 18 21:41:37 [/etc/init.d/fcron] status: crashed


Did you do anything else besides emerge --configure to fix this problem?
Back to top
View user's profile Send private message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 273

PostPosted: Fri Oct 18, 2013 8:49 pm    Post subject: Reply with quote

luciano wrote:
I'm also having the same problem when running 'fcrondyn -x ls', causing the process to crash. [...]
Did you do anything else besides emerge --configure to fix this problem?

Well, I reinstalled my system crontab. I don't exactly remember, but I think I encountered this again... reinstalling the system crontab made it work again. Now it's been a while since I had any trouble. So I still don't really know what was the problem. Good luck.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum