possible bug in crond
Denys Vlasenko
vda.linux at googlemail.com
Sat Jul 10 18:44:35 UTC 2010
On Thu, Jul 8, 2010 at 9:38 AM, <beebee at piments.com> wrote:
> On 07/08/10 02:32, Denys Vlasenko wrote:
>>
>> On Wednesday 07 July 2010 09:02, beebee at piments.com wrote:
>>>
>>> On 07/07/10 01:29, Denys Vlasenko wrote:
>>>>>>
>>>>>> Indeed console output now shows I am getting both the "env DELAY=16 "
>>>>>> crontab and the original without a delay which is now commented out
>>>>>> with
>>>>>> a #.
>>>>
>>>> This could be a bug. Please describe in more detail.
>>>>
>>>>>> It seems it has read in the new line but not dropped the old one that
>>>>>> is
>>>>>> not longer in crontabs.
>>>>>>
>>>>>> Is this expected behaviour?
>>>>
>>>> No.
>>>>
>>>
>>> This happened before I realised how long it took crond to reread
>>> crontabs. At one point I had console output Which had two versions being
>>> triggered.
>>
>> Can you be more specific? What was in old cromtab? In new crontab?
>> How did you see both entries running - ps? If yes, what
>> exactly it shows?
>>
>> IOW, can I have a _proper_ bug report please?
>>
>
> I'll re-add the line you clipped off my last post.
>
>>> I'll try to reproduce.
>
> The implication of that was that I recognise I don't have enough precise
> information to give you and I need to get a reproducible bug. That is also
> why the title began with "possible".
>
> I saw crond printing the commands being triggered on console showing both
> old an new lines from that same crontab file. Maybe I made a change just
> about the time it did it's hourly update.
>
> Leave this as NEEDS MORE INFO for now.
Yes, the bug is definitely there. I added the comment about it in crond.c:
/*
* delete_cronfile() - delete user database
*
* Note: multiple entries for same user may exist if we were unable to
* completely delete a database due to running processes.
*/
//FIXME: we will start a new job even if the old job is running
//if crontab was reloaded: crond thinks that "new" job is different from "old"
//even if they are in fact completely the same. Example
//Crontab was:
// 0-59 * * * job1
// 0-59 * * * long_running_job2
//User edits crontab to:
// 0-59 * * * job1_updated
// 0-59 * * * long_running_job2
//Bug: crond can now start another long_running_job2 even if old one
//is still running.
--
vda
More information about the busybox
mailing list