We found a race-condition in getNextSchedule(): the case appears if a CronJob's `rule` is wrongly set.
In our case the CronJob rule was `1 * * * * ` (please notice the extra space after the last *), and in turn `getLastSchedule()` and`getIntervals()` returned FALSE.
This caused the `$interval` to stick to INFINITE and stuck to infinite loop.
There is no test covering such event.
Sorry not being able to provide a patch, up to now a "trim()" would suffice for our case, but of course it does not cover all the other cases.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | ultimate_cron-infinite-loop-2685043-3.patch | 1.13 KB | das-peter |
Comments
Comment #2
gielfeldt commentedComment #3
das-peter commentedInfinite loops are not cool.
Just ran into this.
Created a patch which checks if the rule could be parsed and if not skips further handling.
Comment #5
arnested commentedThank you for the patch. I have committed it to the 7.x-2.x branch and will do a new release including it later tonight.
Comment #6
arnested commentedReleased in 7.x-2.8.
Comment #7
das-peter commentedSuperb - thank you :)