Bug 14356

Summary: cronstamp jobs are not performed with bumped version of dcron
Product: buildroot Reporter: Dominique Tronche <dominique.tronche>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: major CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2021.02.7   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: Timestamps of cronstamps files are not updated

Description Dominique Tronche 2021-11-17 09:50:10 UTC
Since we have integrated the commit 8a0d4e6a which bumps dcron to a non released version, we have noticed that the cronstamp jobs are not executed. 
The timestamp of the files in /var/spool/cron/cronstamps/ directory are not updated. 
If we revert the commit and get back to version 4.5 of dcron, the jobs are working nominally.
Comment 1 Dominique Tronche 2021-11-17 09:52:33 UTC
I forgot to say that the dcron process is running and no error message is displayed when run in debug mode
Comment 2 Peter Seiderer 2021-11-17 20:20:38 UTC
(In reply to Dominique Tronche from comment #1)

Tested on RPi Zero 2W (buildroot master, configs/raspberrypizero2w_defconfig),
both dcron-4.5 and dcron-1ba33c3325df48de46263276a43ed76cf9d81518 create the files in /var/spool/cron/cronstamps and simple dcron jobs work (echo `date` >> /home/test/out.log)...

Just added (but works without too):

	mkdir -p /var/spool/cron/crontabs
	mkdir -p /var/spool/cron/cronstamps

to /etc/init.d/S90dcron startup file...

Anything special with your crontab files? Can your provide an example?
Comment 3 Dominique Tronche 2021-11-18 12:32:43 UTC
Created attachment 9151 [details]
Timestamps of cronstamps files are not updated
Comment 4 Dominique Tronche 2021-11-18 12:34:12 UTC
We only have a logrotate script in /etc/cron.daily. Has you can see in the snapshot the timestamp of the cronstamps file are not updated. root.sys-hourly should be updated every hour
Comment 5 Peter Seiderer 2021-12-01 21:17:42 UTC
(In reply to Dominique Tronche from comment #4)

Any updates on this one? I can confirm the changed behavior/failure for the default /etc/cron.d/system @hourly entry (did not run the test longer),
can confirm that the offending commit seems to be [1] (upstream issue already
exists [2], dating back to May 2018)...

[1] https://github.com/dubiousjim/dcron/commit/f048a83da348c1d62204fcbdf407b7abf33e3db0

[2] https://github.com/dubiousjim/dcron/issues/15
Comment 6 Dominique Tronche 2023-05-05 14:15:34 UTC
The issue has been corrected with commit 1557312f from Mario Haustein
Comment 7 Yann E. MORIN 2023-05-06 15:21:05 UTC
Dominique, All,

Thanks for the report and the feedback. As you noticed, this is now supposed
to be fixed with commit 1557312f, so I'm closing this bug report. Thanks!

Regards,
Yann E. MORIN.