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

File parameter throw null pointer exception

XMLWordPrintable

      We are using Jenkins REST APIs to submit jobs (create: server/createItem, launch: server/job/<job>/buildWithParameters). Each job runs with a file parameter: abc.yaml, the content of the file submitted with the REST API.

      We been experienced lots of job crashes at the very beginning of the run with he following null pointer exceptions:

       

      6:28:05 Started by user admin

      16:28:05 Building in workspace /.../workspace

      16:28:05 FATAL: null

      16:28:05 java.lang.NullPointerException

      16:28:05 at hudson.model.FileParameterValue$2.setUp(FileParameterValue.java:159)

      16:28:05 at hudson.model.Build$BuildExecution.doRun(Build.java:157)

      16:28:05 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)

      16:28:05 at hudson.model.Run.execute(Run.java:1810)

      16:28:05 at hudson.model.Build.run(Build.java:114)

      16:28:05 at hudson.model.ResourceController.execute(ResourceController.java:97)

      16:28:05 at hudson.model.Executor.run(Executor.java:429)

       

      The crashes happened randomly among the runs (typically 3/4 out of 10), and each run is identical without any changes in terms of configurations or parameters. The issue is easily producible when we run under the concurrency/parallel build scenarios, which only have 2 Jenkins executors but launch more than 10 runs at the same time (well, the excess jobs queued as expected, etc). By increasing the number of the executors, reduced the chances of the crash. I attached 2 screen shots of the 2 runs from a same project, one succeed and one failed.

            Unassigned Unassigned
            keliu ke liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: