Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12357

Infinite loop or invalid next execution with crontab DoW=7

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.446
      Next Executions plugin 1.0.2
    • Similar Issues:

      Description

      Similar to JENKINS-12356, setting DoW=7 may stuck in an infinite loop or may output an invalid next execution time.

      A workaround is to use DoW=0. It is true that the help says "The day of the week (0-7) where 0 and 7 are Sunday", but 0 is safer.

        Attachments

          Issue Links

            Activity

            Hide
            ohtake_tomohiro OHTAKE Tomohiro added a comment -

            I have raised pull-344.
            See test code for what situation makes Jenkins stuck in an infinite loop or makes him guess wrong.

            Show
            ohtake_tomohiro OHTAKE Tomohiro added a comment - I have raised pull-344 . See test code for what situation makes Jenkins stuck in an infinite loop or makes him guess wrong.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Seiji Sogabe
            Path:
            changelog.html
            http://jenkins-ci.org/commit/jenkins/8b8c62a891088adabab20f872342413a600371da
            Log:
            updated changelog for JENKINS-12357

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html http://jenkins-ci.org/commit/jenkins/8b8c62a891088adabab20f872342413a600371da Log: updated changelog for JENKINS-12357
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #1512
            [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday) (Revision 20249e4adc4abaf3c81cd864331508cf68b8777b)

            Result = SUCCESS
            ohtake.tomohiro : 20249e4adc4abaf3c81cd864331508cf68b8777b
            Files :

            • core/src/main/java/hudson/scheduler/CronTab.java
            • core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java
            • core/src/test/java/hudson/scheduler/CronTabTest.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1512 [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday) (Revision 20249e4adc4abaf3c81cd864331508cf68b8777b) Result = SUCCESS ohtake.tomohiro : 20249e4adc4abaf3c81cd864331508cf68b8777b Files : core/src/main/java/hudson/scheduler/CronTab.java core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java core/src/test/java/hudson/scheduler/CronTabTest.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: OHTAKE Tomohiro
            Path:
            core/src/main/java/hudson/scheduler/CronTab.java
            core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java
            core/src/test/java/hudson/scheduler/CronTabTest.java
            http://jenkins-ci.org/commit/jenkins/20249e4adc4abaf3c81cd864331508cf68b8777b
            Log:
            [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday)

            To use @Test(timeout), inheritance from TestCase should be removed

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: OHTAKE Tomohiro Path: core/src/main/java/hudson/scheduler/CronTab.java core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java core/src/test/java/hudson/scheduler/CronTabTest.java http://jenkins-ci.org/commit/jenkins/20249e4adc4abaf3c81cd864331508cf68b8777b Log: [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday) To use @Test(timeout), inheritance from TestCase should be removed

              People

              • Assignee:
                ohtake_tomohiro OHTAKE Tomohiro
                Reporter:
                ohtake_tomohiro OHTAKE Tomohiro
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: