[arch-general] Replace dcron once again?
It doesn't seem like dcron is maintained very well [1], so I think we should consider switching. FS#18681 [2] is quite a critical bug in a crond when everyone expects jobs to run only once. I'd like to go with fcron because it seems to work very well for most people, has a lot of features while having a small dependency tree. Comments welcome. [1] http://repo.or.cz/w/dcron.git [2] https://bugs.archlinux.org/task/18681 -- Florian Pritz -- {flo,bluewind}@server-speed.net
On 07.11.2010 18:39, Florian Pritz wrote:
It doesn't seem like dcron is maintained very well [1], so I think we should consider switching. FS#18681 [2] is quite a critical bug in a crond when everyone expects jobs to run only once.
I'd like to go with fcron because it seems to work very well for most people, has a lot of features while having a small dependency tree.
Comments welcome.
[1] http://repo.or.cz/w/dcron.git [2] https://bugs.archlinux.org/task/18681
+1 I was bitten by that bug quite badly and it spawned 20+ backup jobs.
Am Sun, 07 Nov 2010 18:39:13 +0100 schrieb Florian Pritz <bluewind@server-speed.net>:
It doesn't seem like dcron is maintained very well [1], so I think we should consider switching. FS#18681 [2] is quite a critical bug in a crond when everyone expects jobs to run only once.
I'd like to go with fcron because it seems to work very well for most people, has a lot of features while having a small dependency tree.
Comments welcome.
[1] http://repo.or.cz/w/dcron.git [2] https://bugs.archlinux.org/task/18681
Before switching to the new dcron I always used fcron. I didn't notice any issues with dcron but I also hadn't had any issues with fcron, and fcron has a lot of useful features also for systems which don't run 24/7. So if there are serious issues with dcron I'd also suggest switching to fcron as default. Heiko
I'd like to go with fcron because it seems to work very well for most people, has a lot of features while having a small dependency tree.
I think fcron is kind of heavy for most users. I'd rather we switch to cronie, which is the descendent of vixie-cron. It's developed by RedHat, well maintained, supports PAM and SELinux and can be built with anacron features. Kaiting. -- Kiwis and Limes: http://kaitocracy.blogspot.com/
Am Sun, 7 Nov 2010 13:57:50 -0500 schrieb Kaiting Chen <kaitocracy@gmail.com>:
I think fcron is kind of heavy for most users. I'd rather we switch to cronie, which is the descendent of vixie-cron. It's developed by RedHat, well maintained, supports PAM and SELinux and can be built with anacron features.
I disagree with Kaiting, because cronie doesn't have anacron features. If it's compiled with --enable-anacron there is no anacron feature compiled into cronie. Instead there is a separate anacron daemon compiled and that makes it unnecessarily complicated in using and configuring it. And people who need anacron features have to run two daemons and configure two daemons. With fcron you have all in one and need to run and configure only one daemon. And fcron is by far not bloated and complicated to configure. Instead there are several ways to configure fcron like crontab, scripts in /etc/cron.{daily,weekly,monthly} and in /etc/cron.d. And to use anacron features you only need to prefix a crontab entry with an @. So I think fcron is much more flexible, much easier to configure and to use than cronie, and has features for rather every use case. And, please, don't make such a regression again. Btw., cronie is in AUR since May and still has only 1 vote while fcron is proven to run very well since years. Heiko
On Sun, 7 Nov 2010 21:09:12 +0100 Heiko Baums <lists@baums-on-web.de> wrote:
Am Sun, 7 Nov 2010 13:57:50 -0500 schrieb Kaiting Chen <kaitocracy@gmail.com>:
I think fcron is kind of heavy for most users. I'd rather we switch to cronie, which is the descendent of vixie-cron. It's developed by RedHat, well maintained, supports PAM and SELinux and can be built with anacron features.
I disagree with Kaiting, because cronie doesn't have anacron features.
If it's compiled with --enable-anacron there is no anacron feature compiled into cronie. Instead there is a separate anacron daemon compiled and that makes it unnecessarily complicated in using and configuring it. And people who need anacron features have to run two daemons and configure two daemons.
With fcron you have all in one and need to run and configure only one daemon. And fcron is by far not bloated and complicated to configure. Instead there are several ways to configure fcron like crontab, scripts in /etc/cron.{daily,weekly,monthly} and in /etc/cron.d. And to use anacron features you only need to prefix a crontab entry with an @.
So I think fcron is much more flexible, much easier to configure and to use than cronie, and has features for rather every use case.
And, please, don't make such a regression again.
Btw., cronie is in AUR since May and still has only 1 vote while fcron is proven to run very well since years.
Heiko
I agree with Heiko and Florian, I myself am using fcron since spring and moved at my machines(including VMs that run more often) one after another to fcron and I'm happy with it. It's easy to configure, comes with the default jobs (=runs /etc/cron.{daily,weekly,monthly}/*) and thus if for a user who doesn't do much with cron nothing to worry about, everyone else gets next to the default possibilities several features that are really helpful. Furthermore it is well documented, so even people who begin to play with cronjobs have a spot where they can look for information and get an answer almost for sure. Thorsten -- Jabber: atsutane@freethoughts.de Blog: http://atsutane.freethoughts.de/ Key: 295AFBF4 FP: 39F8 80E5 0E49 A4D1 1341 E8F9 39E4 F17F 295A FBF4
Thorsten Töpper wrote:
On Sun, 7 Nov 2010 21:09:12 +0100 Heiko Baums <lists@baums-on-web.de> wrote:
Am Sun, 7 Nov 2010 13:57:50 -0500 schrieb Kaiting Chen <kaitocracy@gmail.com>:
I think fcron is kind of heavy for most users. I'd rather we switch to cronie, which is the descendent of vixie-cron. It's developed by RedHat, well maintained, supports PAM and SELinux and can be built with anacron features.
I disagree with Kaiting, because cronie doesn't have anacron features.
If it's compiled with --enable-anacron there is no anacron feature compiled into cronie. Instead there is a separate anacron daemon compiled and that makes it unnecessarily complicated in using and configuring it. And people who need anacron features have to run two daemons and configure two daemons.
With fcron you have all in one and need to run and configure only one daemon. And fcron is by far not bloated and complicated to configure. Instead there are several ways to configure fcron like crontab, scripts in /etc/cron.{daily,weekly,monthly} and in /etc/cron.d. And to use anacron features you only need to prefix a crontab entry with an @.
So I think fcron is much more flexible, much easier to configure and to use than cronie, and has features for rather every use case.
And, please, don't make such a regression again.
Btw., cronie is in AUR since May and still has only 1 vote while fcron is proven to run very well since years.
Heiko
I agree with Heiko and Florian, I myself am using fcron since spring and moved at my machines(including VMs that run more often) one after another to fcron and I'm happy with it. It's easy to configure, comes with the default jobs (=runs /etc/cron.{daily,weekly,monthly}/*) and thus if for a user who doesn't do much with cron nothing to worry about, everyone else gets next to the default possibilities several features that are really helpful. Furthermore it is well documented, so even people who begin to play with cronjobs have a spot where they can look for information and get an answer almost for sure.
+1 and don't forget that you can see what job will run when: # fcrondyn -x ls password for root : ID USER SCHEDULE CMD 14 markus 11/07/2010 22:20 /usr/bin/getmail -q 0 systab 11/07/2010 23:01 /usr/sbin/run-cron /etc/cron.hourly 12 root 11/07/2010 23:50 /usr/bin/rsnapshot daily 13 root 11/08/2010 00:00 /usr/bin/rsnapshot hourly 1 systab 11/08/2010 00:02 /usr/sbin/run-cron /etc/cron.daily 10 root 11/08/2010 02:15 /usr/sbin/trim / 11 root 11/13/2010 23:40 /usr/bin/rsnapshot weekly 2 systab 11/14/2010 00:22 /usr/sbin/run-cron /etc/cron.weekly 3 systab 12/01/2010 00:42 /usr/sbin/run-cron /etc/cron.monthly This is very useful for consistency checking.
On Sun, 7 Nov 2010 22:09:35 +0100, Thorsten Töpper <atsutane@freethoughts.de> wrote:
On Sun, 7 Nov 2010 21:09:12 +0100 Heiko Baums <lists@baums-on-web.de> wrote:
Am Sun, 7 Nov 2010 13:57:50 -0500 schrieb Kaiting Chen <kaitocracy@gmail.com>:
I think fcron is kind of heavy for most users. I'd rather we switch to cronie, which is the descendent of vixie-cron. It's developed by RedHat, well maintained, supports PAM and SELinux and can be built with anacron features.
I disagree with Kaiting, because cronie doesn't have anacron features.
If it's compiled with --enable-anacron there is no anacron feature compiled into cronie. Instead there is a separate anacron daemon compiled and that makes it unnecessarily complicated in using and configuring it. And people who need anacron features have to run two daemons and configure two daemons.
With fcron you have all in one and need to run and configure only one daemon. And fcron is by far not bloated and complicated to configure. Instead there are several ways to configure fcron like crontab, scripts in /etc/cron.{daily,weekly,monthly} and in /etc/cron.d. And to use anacron features you only need to prefix a crontab entry with an @.
So I think fcron is much more flexible, much easier to configure and to use than cronie, and has features for rather every use case.
And, please, don't make such a regression again.
Btw., cronie is in AUR since May and still has only 1 vote while fcron is proven to run very well since years.
Heiko
I agree with Heiko and Florian, I myself am using fcron since spring and moved at my machines(including VMs that run more often) one after another to fcron and I'm happy with it. It's easy to configure, comes with the default jobs (=runs /etc/cron.{daily,weekly,monthly}/*) and thus if for a user who doesn't do much with cron nothing to worry about, everyone else gets next to the default possibilities several features that are really helpful. Furthermore it is well documented, so even people who begin to play with cronjobs have a spot where they can look for information and get an answer almost for sure.
Thorsten
Let's not rush things: * Make sure that dcron is really a dead project and there is no chance for an update. Dropping a core package just because of one bug (which might get fixed) does not sound sane. * The crontab from dcron and fcron are not compatible. So fcron cannot be a simple drop-in repalcement * Some users might prefer dcron; simply replacing it is just not how we roll. People are free to install fcron if they like. -- Pierre Schmitz, https://users.archlinux.de/~pierre
Am Sun, 07 Nov 2010 23:50:22 +0100 schrieb Pierre Schmitz <pierre@archlinux.de>:
Let's not rush things:
* Make sure that dcron is really a dead project and there is no chance for an update. Dropping a core package just because of one bug (which might get fixed) does not sound sane.
See the both URLs Florian has given: https://bugs.archlinux.org/task/18681 Bug report opened: 14 March 2010 First comment from upstream dev, Jim Pryor: 14 April 2010 Last comment from upstream dev: 22 September 2010 http://repo.or.cz/w/dcron.git Latest change: 3 Feb 2010 Maybe someone should contact Jim first and ask him, if he still maintains dcron and if he will fix this bug.
* The crontab from dcron and fcron are not compatible. So fcron cannot be a simple drop-in repalcement
What are the differences? I didn't need to change anything when I switched from fcron to the new dcron. If I had to change a bit it was so easy, that I can't remember anymore. The only thing which has changed was the command to edit the crontab. It's crontab for dcron and fcrontab for fcron. But for such changes an announcement can be written in the News section of the website, in the mailing list and in the package's post_install(). See the latest xorg upgrade. And Florian's suggestion was not about removing dcron from the repos, but only to change the default cron daemon, which is installed without the user's interaction during installation, from dcron to fcron. So only new installations would be affected by this change anyway.
* Some users might prefer dcron; simply replacing it is just not how we roll. People are free to install fcron if they like.
I personally haven't seen big differences between fcron and dcron from the administrator's point of view. Heiko
The day was 07/11/10 23:58 when Heiko Baums had this to say......:
* The crontab from dcron and fcron are not compatible. So fcron cannot be a simple drop-in repalcement
What are the differences? I didn't need to change anything when I switched from fcron to the new dcron. If I had to change a bit it was so easy, that I can't remember anymore. The only thing which has changed was the command to edit the crontab. It's crontab for dcron and fcrontab for fcron. But for such changes an announcement can be written in the News section of the website, in the mailing list and in the package's post_install(). See the latest xorg upgrade.
And Florian's suggestion was not about removing dcron from the repos, but only to change the default cron daemon, which is installed without the user's interaction during installation, from dcron to fcron. So only new installations would be affected by this change anyway.
* Some users might prefer dcron; simply replacing it is just not how we roll. People are free to install fcron if they like.
I personally haven't seen big differences between fcron and dcron from the administrator's point of view.
Heiko
I've just switched to fcron, it's not a straight drop in AFAICT but not exactly hard. * crond needs changing to fcron in rc.conf DAEMONS * You'd need to backup/copy over your crontab from dcron over to fcron as it either overwrites the old on or uses one from a different location. (dcron syntax is working fine in fcron though) * crontab cmd is a little different (as the install msg tells you) If (big if i know) the default cron is going to be swapped out, the only thing i would suggest is warning in advance so people can backup crontab. +1 from me though for swapping, fcron looks a lot better/more versatile to me a humble user! Simon
FWIW: I've gone through the archives and found multiple threads about our cron discussions. http://mailman.archlinux.org/pipermail/arch-dev-public/2009-September/ http://mailman.archlinux.org/pipermail/arch-dev-public/2010-January (esp. http://mailman.archlinux.org/pipermail/arch-dev-public/2010-January/014781.h...) Seems like the last time we were on the verge of switching to fcron, but didn't because Jim took over dcron upstream (and added his "yacron" features.) The only negative thing i could find in the archives about fcron is that it doesn't support /etc/cron.d natively (but we can write scripts to work around that). Although Heiko seemed to suggest this is no longer true anymore. (?) Other then that, it seems a solid featureful-but-simple-enough cron daemon. Dieter
On 09.11.2010 11:47, Dieter Plaetinck wrote:
FWIW: I've gone through the archives and found multiple threads about our cron discussions. http://mailman.archlinux.org/pipermail/arch-dev-public/2009-September/ http://mailman.archlinux.org/pipermail/arch-dev-public/2010-January (esp. http://mailman.archlinux.org/pipermail/arch-dev-public/2010-January/014781.h...)
Seems like the last time we were on the verge of switching to fcron, but didn't because Jim took over dcron upstream (and added his "yacron" features.)
The only negative thing i could find in the archives about fcron is that it doesn't support /etc/cron.d natively (but we can write scripts to work around that). Although Heiko seemed to suggest this is no longer true anymore. (?)
Other then that, it seems a solid featureful-but-simple-enough cron daemon.
Dieter
Sooooo, not a mail since a while. Can we replace dcron now? :)
At Donnerstag, 11. November 2010 20:16 Sven-Hendrik Haase wrote:
Sooooo, not a mail since a while. Can we replace dcron now? :)
What i don't understand is this "replace" here because fcron (or incron) is only one "pacman -S" away. And i say this as an fcron user. :) See you, Attila
On 11.11.2010 21:15, Attila wrote:
At Donnerstag, 11. November 2010 20:16 Sven-Hendrik Haase wrote:
Sooooo, not a mail since a while. Can we replace dcron now? :) What i don't understand is this "replace" here because fcron (or incron) is only one "pacman -S" away. And i say this as an fcron user. :)
See you, Attila
The way I see it we at least shouldn't give/advise users to dcron as a default.
Not only this, but also the fact that now there are 2 crons being maintained: fcron in community and dcron in core. Removing dcron to, say, AUR, will be a wiser use of devs' time... On (11/11/10 21:35), Sven-Hendrik Haase wrote: -~> On 11.11.2010 21:15, Attila wrote: -~> The way I see it we at least shouldn't give/advise users to dcron as a -~> default. -- lisaev@svibor
On Thu, 2010-11-11 at 16:31 -0500, Leonid Isaev wrote:
Not only this, but also the fact that now there are 2 crons being maintained: fcron in community and dcron in core. Removing dcron to, say, AUR, will be a wiser use of devs' time...
Bottom-posting please. And I don't see a problem with the current situation, one is in [core] the other in [community] (devs vs TUs). It could be reverse, if that's what's meant by 'replacing'. As a result of this thread I've switched to fcron as well. No big deal.
On 11.11.2010 23:50, Ng Oon-Ee wrote:
On Thu, 2010-11-11 at 16:31 -0500, Leonid Isaev wrote:
Not only this, but also the fact that now there are 2 crons being maintained: fcron in community and dcron in core. Removing dcron to, say, AUR, will be a wiser use of devs' time... Bottom-posting please. And I don't see a problem with the current situation, one is in [core] the other in [community] (devs vs TUs). It could be reverse, if that's what's meant by 'replacing'.
As a result of this thread I've switched to fcron as well. No big deal.
As far as I am aware, dcron is installed by default and is being advised as the main crond for Arch on the wiki. By replacing I'd mean making fcron default in wiki and install.
From my naive point of view, it seems like dcron is more in line with
Thanks to this thread I decided to look at both dcron and fcron. First google result for dcron led me to this: 1 Why use dcron when there's fcron? ----------------------------------- - dcron is SIMPLE: dcron just gives you two binaries, crond and crontab, and consists only of a few source files. - dcron is SMALL: binaries (i386-elf) are only about 25k - dcron is MATURE: it is many distributions' default cron and in use since ~1994. - dcron is SECURE: that's the consequence of being simple and mature. - dcron WORKS: fcron only worked for root on my box, no matter how hard I tried. This is from a Linux From Scratch readme here: http://www.linuxfromscratch.org/hints/downloads/files/dcron.txt the Arch Way. In response to the initial concern about a bug in dcron, don't we have anyone in our userbase that could take a look at the dcron code? As far as updates, I wouldn't expect a basic mature package to be updated more than once or twice a year. Update frequency alone says nothing about the quality of the code. My vote would be to focus efforts on fixing the bug and to keep Arch as small and lightweight as possible at its base. One of the best parts of Arch for me is that it starts out minimalistic and you can extend it to make it fit your needs. Trying to make our favorite packages defaults instead of minimal, stable, small packages, is a mistake imho. Cheers, Alex
On Fri 12 Nov 2010 10:26 +0900, Alex Matviychuk wrote:
Thanks to this thread I decided to look at both dcron and fcron. First google result for dcron led me to this:
This is from a Linux From Scratch readme here: http://www.linuxfromscratch.org/hints/downloads/files/dcron.txt
Nice. The guy who wrote that article is an Archer and former TU. It's also from 7 years ago. I'm sure a good deal has changed since.
From my naive point of view, it seems like dcron is more in line with the Arch Way.
In response to the initial concern about a bug in dcron, don't we have anyone in our userbase that could take a look at the dcron code? As far as updates, I wouldn't expect a basic mature package to be updated more than once or twice a year. Update frequency alone says nothing about the quality of the code.
My vote would be to focus efforts on fixing the bug and to keep Arch as small and lightweight as possible at its base. One of the best parts of Arch for me is that it starts out minimalistic and you can extend it to make it fit your needs. Trying to make our favorite packages defaults instead of minimal, stable, small packages, is a mistake imho.
The only problem is finding someone who can do the work to maintain dcron. It's pretty damning to have a scheduler that can't schedule properly installed by default - that's what people seem to be concerned about mostly. I'd like to keep the simpler package too, but if it ain't working chuck it.
On Fri, Nov 12, 2010 at 11:57, Loui Chang <louipc.ist@gmail.com> wrote:
The only problem is finding someone who can do the work to maintain dcron. It's pretty damning to have a scheduler that can't schedule properly installed by default - that's what people seem to be concerned about mostly. I'd like to keep the simpler package too, but if it ain't working chuck it.
I agree, however, it sounds a bit odd to say that we should replace a simple package with a more complicated one in the hope the more complicated one will screw us over less going forward. We're just as bound to the idiosyncrasies and bugs of fcron as dcron, but with the added complexity of fcron. For such a crucial system package it would seem wise to deal with the devil that's easier to understand (in theory, I don't claim to understand the internals of e. Also, looking over the comments in the bugtracker (https://bugs.archlinux.org/task/18681), it seems this may not even be a dcron issue. I would urge further consideration before making a switch. Cheers, Alex
On Fri, Nov 12, 2010 at 13:10, Alex Matviychuk <alexmat@gmail.com> wrote:
For such a crucial system package it would seem wise to deal with the devil that's easier to understand (in theory, I don't claim to understand the internals of e.
That should read: For such a crucial system package it would seem wise to deal with the devil that's easier to understand (in theory, I don't claim to understand the internals of either package, but if I was forced to debug both, I imagine dcron would be easier to deal with based on lines of code alone.)
Am Fri, 12 Nov 2010 13:10:12 +0900 schrieb Alex Matviychuk <alexmat@gmail.com>:
I agree, however, it sounds a bit odd to say that we should replace a simple package with a more complicated one in the hope the more complicated one will screw us over less going forward. We're just as bound to the idiosyncrasies and bugs of fcron as dcron, but with the added complexity of fcron.
I'm not really a cron expert, but fcron is not more complicated than dcron, it's just more feature-rich, more flexible, has more ways to configure, can be configured more precisely in my estimation. But fcron is as easy or hard to configure as dcron. It's fact that the fcron package is bigger than dcron but it has some more configuration files with which e.g. access privileges can be granted and a comprehensive documentation in plain text, HTML and several manpages. But this documentation can be very helpful for people who are not that familiar with cron daemons in general and fcron in particular. There's probably one thing that could be changed in the fcron package to reduce the size. The complete documentation is in English as well as in French. Nothing against France, but the French documentation could probably be removed from the package. All in all fcron looks a bit more mature in my view. Heiko
On Fri, Nov 12, 2010 at 06:12:36AM +0100, Heiko Baums wrote:
There's probably one thing that could be changed in the fcron package to reduce the size. The complete documentation is in English as well as in French. Nothing against France, but the French documentation could probably be removed from the package. Indeed, I did some calculations and it turns out, fcron is very small as well, if you cut down all the unnecessary documents.
4.0K /etc/fcron/fcron.allow 4.0K /etc/fcron/fcron.conf 4.0K /etc/fcron/fcron.deny 4.0K /etc/fcron/pam.conf 4.0K /etc/pam.d/fcron 4.0K /etc/pam.d/fcrontab 4.0K /etc/rc.d/fcron 32K /usr/bin/fcrondyn 24K /usr/bin/fcronsighup 60K /usr/bin/fcrontab 88K /usr/sbin/fcron 4.0K /usr/sbin/run-cron 4.0K /usr/share/man/man1/fcrondyn.1.gz 4.0K /usr/share/man/man1/fcrontab.1.gz 4.0K /usr/share/man/man3/bitstring.3.gz 4.0K /usr/share/man/man5/fcron.conf.5.gz 12K /usr/share/man/man5/fcrontab.5.gz 4.0K /usr/share/man/man8/fcron.8.gz 4.0K /var/spool/fcron/systab.orig 272K Total It comes down to only 272 KiB, I think this is very acceptable. -- Li Ian-Xue http://b4283.ath.cx
Surely someone can run a git bisect on this issue. It is a reasonably new occurrence. Or are we just going to switch software every time a bug is found... Allan
On Friday, November 12, 2010, Allan McRae <allan@archlinux.org> wrote:
Surely someone can run a git bisect on this issue. It is a reasonably new occurrence.
Or are we just going to switch software every time a bug is found...
But I want my bikeshed to be red!
On Fri, 12 Nov 2010 20:19:18 +1000 Allan McRae <allan@archlinux.org> wrote:
Surely someone can run a git bisect on this issue. It is a reasonably new occurrence.
Or are we just going to switch software every time a bug is found...
I guess the issue is, that most people wanted fcron all along. Th last time this discussion came up, already many spoke out in favor of fcron. Then Jim put dcron on "life support" with an infusion from his own yacron software. This already means "our" dcron cannot be compared to other distributions' dcron anymore and the feature set is actually closer to fcron now than to the original dcron. (Gentoo still uses dcron 3.2 in stable for example.) I already used fcron on Gentoo years ago (Gentoo doesn't really have a default cron except if you count vixie-cron which is the only option for networkless installs) since I preferred the syntax and the way it separates root's crontab and the system crontab, but stayed with dcron on most of my arch boxes for convenience and lack of need for actually touching any crontab on them. FWIW I haven't seen the bug which started this discussion but that might be because i don't pay that much attention to most cron jobs. The ones I expect a daily mail from have correctly run once each day until now. -- Jinks
Allan McRae <allan@archlinux.org> wrote:
Surely someone can run a git bisect on this issue. It is a reasonably new occurrence.
Except that the @daily bug only trigger every 24 hours or so. A little too time consuming for git bisect, i would say. But, there is a way around this: overriding the libc time() and localtime() functions with LD_PRELOAD to trick crond into thinking time passes quicker than it actually do. libfaketime[1][2] can do this. So you can launch crond with something like this (as root): # faketime -f '+0 x30'./crond -s /tmp/systabs -c /tmp/usertabs -t /tmp/stamps -d which will make @hourly happen about every two minutess and @daily about every 48 minutes. note: using x60 and above will utterly confuse crond (Not a Bug), so don't do that. Combine with a crontab like this: @hourly ID=hourly echo "HOURLY $(date)" >> /tmp/dcron-test @daily ID=daily echo "DAILY $(date)" >> /tmp/dcron-test @weekly ID=weekly echo "WEEKLY $(date)" >> /tmp/dcron-test @monthly ID=monthly echo "MONTHLY $(date)" >> /tmp/dcron-test You can then monitor /tmp/dcron-test and see if jobs are scheduled correctly. Also the TZ environment variable can be useful (see 'info libc tz'). But, i was not able to reproduce the "@hourly run only once every two hours" problem with neither TZ=FOO-1BAR-2,N10,N350 , nor 'export TZ=:/usr/share/zoneinfo/Europe/Paris; faketime -f -60d ./crond ... -d'. So, it seems DST alone is not enough to trigger it. Presumably, it also depends upon the content of the timestamp files ? I never saw the @daily bug, personally. [1] http://www.code-wizards.com/projects/libfaketime/index.html [2] http://aur.archlinux.org/packages.php?ID=24381 -- Sent thru gmane, let's see if it works.
I wrote:
Except that the @daily bug only trigger every 24 hours or so. A little too time consuming for git bisect, i would say.
Or then, maybe not. Does the bug happen on a clean run (that is, when there is no timestamp)? in which case 'rm ${stampsdir}/*' before running crond and it should trigger instantly (or in the very first minutes of execution). Or does it only appear after several iterations? in which case the libfaketime trick can help. (also if it is a libc bug; libfaketime will hide it. but i don't think it's a libc bug anyway; it's unlikely that a libc bug in those areas would affect dcron *only*). -- Vincent Cappe
On (11/13/10 18:57), Vincent Cappe wrote: -~> Allan McRae <allan@archlinux.org> wrote: -~> > Surely someone can run a git bisect on this issue. It is a reasonably -~> > new occurrence. -~> -~> Except that the @daily bug only trigger every 24 hours or so. A little -~> too time consuming for git bisect, i would say. -~> -~> But, there is a way around this: overriding the libc time() and -~> localtime() functions with LD_PRELOAD to trick crond into thinking -~> time passes quicker than it actually do. libfaketime[1][2] can do -~> this. So you can launch crond with something like this (as root): -~> -~> # faketime -f '+0 x30'./crond -s /tmp/systabs -c /tmp/usertabs -t /tmp/stamps -d -~> -~> which will make @hourly happen about every two minutess and @daily about -~> every 48 minutes. note: using x60 and above will utterly confuse crond -~> (Not a Bug), so don't do that. -~> -~> Combine with a crontab like this: -~> @hourly ID=hourly echo "HOURLY $(date)" >> /tmp/dcron-test -~> @daily ID=daily echo "DAILY $(date)" >> /tmp/dcron-test -~> @weekly ID=weekly echo "WEEKLY $(date)" >> /tmp/dcron-test -~> @monthly ID=monthly echo "MONTHLY $(date)" >> /tmp/dcron-test -~> -~> You can then monitor /tmp/dcron-test and see if jobs are scheduled -~> correctly. -~> -~> Also the TZ environment variable can be useful (see 'info libc tz'). -~> But, i was not able to reproduce the "@hourly run only once every -~> two hours" problem with neither TZ=FOO-1BAR-2,N10,N350 , nor -~> 'export TZ=:/usr/share/zoneinfo/Europe/Paris; faketime -f -60d ./crond ... -d'. -~> -~> So, it seems DST alone is not enough to trigger it. Presumably, it -~> also depends upon the content of the timestamp files ? -~> -~> I never saw the @daily bug, personally. -~> -~> [1] http://www.code-wizards.com/projects/libfaketime/index.html -~> [2] http://aur.archlinux.org/packages.php?ID=24381 -~> -~> -- -~> Sent thru gmane, let's see if it works. And I don't recall seeing any of this with dcron 4.4-1. I have fcron installed everywhere, so... but as long as you seem to be playing with this, could you please try with 4.4-1? It should be available through SVN... -- lisaev@svibor
On 11/11/10 20:26, Alex Matviychuk wrote:
Thanks to this thread I decided to look at both dcron and fcron. First google result for dcron led me to this:
(As Loui noted, many of those points are changed by the passage of seven years. Distros probably use different crons now; and fcron has improved in the meantime; and dcron might have changed, I'm not sure.)
In response to the initial concern about a bug in dcron, don't we have anyone in our userbase that could take a look at the dcron code? As far as updates, I wouldn't expect a basic mature package to be updated more than once or twice a year. Update frequency alone says nothing about the quality of the code.
I dispute that something that doesn't always schedule jobs at the frequency the user requests (this user often being root) -- and that we as a community don't even understand when/why -- is secure. (It leaves me somewhat wondering about mature too, if no one's noticed (or fixed anyhow) this bug before. I wouldn't assume it's the only bug (although it might be).) -Isaac
At Freitag, 12. November 2010 02:26 Alex Matviychuk wrote:
This is from a Linux From Scratch readme here: http://www.linuxfromscratch.org/hints/downloads/files/dcron.txt
I would prefer this info: http://www.gentoo.org/doc/en/cron-guide.xml Here you can see that dcron is the first option in gentoo too and so the decision of installing it from the arch devs seems okay. If there is a bug than this could happens in every application and should be only a problem if there is no solution for it. And again i'm a satisfied fcron user but i enjoy that we have the choice in arch linux ... which is not normal because some distributions ships only one cron and only this one could discuss about replacing. :) See you, Attila
I guess, the discussion is about including fcron into /core and on installation media. From this perspective, having two daemons might be a deal breaker. Leonid. On (11/07/10 21:09), Heiko Baums wrote: --> Am Sun, 7 Nov 2010 13:57:50 -0500 --> schrieb Kaiting Chen <kaitocracy@gmail.com>: --> --> > I think fcron is kind of heavy for most users. I'd rather we switch to --> > cronie, which is the descendent of vixie-cron. It's developed by --> > RedHat, well maintained, supports PAM and SELinux and can be built --> > with anacron features. --> --> I disagree with Kaiting, because cronie doesn't have anacron features. --> --> If it's compiled with --enable-anacron there is no anacron feature --> compiled into cronie. Instead there is a separate anacron daemon --> compiled and that makes it unnecessarily complicated in using and --> configuring it. And people who need anacron features have to run two --> daemons and configure two daemons. --> --> With fcron you have all in one and need to run and configure only one --> daemon. And fcron is by far not bloated and complicated to configure. --> Instead there are several ways to configure fcron like crontab, scripts --> in /etc/cron.{daily,weekly,monthly} and in /etc/cron.d. And to use --> anacron features you only need to prefix a crontab entry with an @. --> --> So I think fcron is much more flexible, much easier to configure and to --> use than cronie, and has features for rather every use case. --> --> And, please, don't make such a regression again. --> --> Btw., cronie is in AUR since May and still has only 1 vote while fcron --> is proven to run very well since years. --> --> Heiko -- lisaev@svibor
On 11/07/10 13:57, Kaiting Chen wrote:
I'd like to go with fcron because it seems to work very well for most people, has a lot of features while having a small dependency tree.
I think fcron is kind of heavy for most users.
looking at various recent x86_64 from [core], group 'base', in kilobytes from pacman -Si Installed Size, kernel26 - 114716 coreutils - 13076 binutils - 13272 util-linux-ng - 6992 bash - 3176 texinfo - 2392 udev - 1944 grub - 1900 reiserfsprogs - 1032 jfsutils - 1016 mdadm - 996 sed - 804 attr - 380 fcron - 1240 dcron - 152 While dcron is small, fcron is also small IMHO. I don't use texinfo, grub (that's the GRUB Legacy package), reiserfsprogs, jfstools, mdadm, etc. They're still part of [core]/base. It's harder to guess at the typical RAM usage of the different crons, though it's worth noting that only about 200 kB of fcron is the executables (the daemon executable itself is 86 kB), and the rest is documentation files (yay harmless documentation!). Someone who needs to shrink their system more will probably have to choose packages manually, configure their own kernel, etc. I think this amount of "heaviness" is an okay price to pay for a Unix system with a high quality cron daemon. -Isaac
* Florian Pritz <bluewind@server-speed.net> [2010-11-07 18:39] :
It doesn't seem like dcron is maintained very well [1], so I think we should consider switching. FS#18681 [2] is quite a critical bug in a crond when everyone expects jobs to run only once.
I'd like to go with fcron because it seems to work very well for most people, has a lot of features while having a small dependency tree.
Comments welcome.
[1] http://repo.or.cz/w/dcron.git [2] https://bugs.archlinux.org/task/18681
-- Florian Pritz -- {flo,bluewind}@server-speed.net
It does not seem that fcron deals with jobs that exit with value 11 (EAGAIN; resource temporarily unavailable). I have found no reference to EAGAIN in fcron's documentation. It simplifies my backup jobs, but if I really have to live without it, I guess I could implement that feature myself in my script. Does anyone like that feature? Did I miss something in fcron documentation? FYI : If a script exits 11, dcron will run it again 10 minutes later (by default). Alex -- Alexandre de Verteuil <claudelepoisson@gmail.com> public (cryptographic) key ID : 0xDD237C00
Florian Pritz <bluewind@server-speed.net> writes:
It doesn't seem like dcron is maintained very well [1], so I think we should consider switching. FS#18681 [2] is quite a critical bug in a crond when everyone expects jobs to run only once.
I'm never too thrilled about such changes, especially when they require my manual intervention. Either way, it won't kill me. The multiple-run issue is critical. I've also noticed skipped runs. For example, on one system, cron.hourly was running once every other hour. It did that for several weeks. Has anyone else had a look at the dcron code? I've been looking at it, to no avail. -- Chris
participants (23)
-
Alex Matviychuk
-
Alexander Duscheleit
-
Alexandre de Verteuil
-
Allan McRae
-
Attila
-
Christopher Brannon
-
Dan McGee
-
Dieter Plaetinck
-
Florian Pritz
-
Heiko Baums
-
Ian-Xue Li
-
Isaac Dupree
-
Kaiting Chen
-
Leonid Isaev
-
Leonid Isaev
-
Loui Chang
-
Markus Trippelsdorf
-
Ng Oon-Ee
-
Pierre Schmitz
-
Simon Stoakley
-
Sven-Hendrik Haase
-
Thorsten Töpper
-
Vincent Cappe