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

Random HTTP 404 when viewing build details

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • JDK 1.7.0_25-b17 on Windows 2008 R2

      I noticed API calls (such as /job/doStuff/17/api/xml) failing "randomly" with HTTP 404. The thing is, you then open a browser to /job/doStuff and API calls would start working again. The same with job details, such as /job/doStuff/17/console. It would only happen to some jobs and not others, but not always the same jobs.

      Attaching a debugger to the running instance where this happened, I eventually was able to trace the defect to the search() method of the AbstractLazyLoadRunMap class, where it was able to obtain a "ceiling" entry that had a BuildReference with a null referent, which then hit all the right conditions for the method to return null even though the requested build number indeed existed. A SoftReference helps explain why this would occur "randomly" and then suddenly start working again after visiting the job's page, which would [re-]load all the builds.

      From what I can tell, this corner case has been missing since commit cf85b72

            oli_at_jsi Olivier Dagenais
            oli_at_jsi Olivier Dagenais
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: