Skip to content

[JENKINS-29470] NPE in AbstractProject.checkout #21275

Closed

Description

@jenkins-infra-bot

When disconnecting slave during the build:

       FilePath workspace = build.getWorkspace();
try {
    workspace.mkdirs(); # Line 1250
} catch (IOException e) {
    // Can't create workspace dir - Is slave disk full ?
    new DiskSpaceMonitor().markNodeOfflineIfDiskspaceIsTooLow(build.getBuiltOn().toComputer());
    throw e;
}

01:59:53 FATAL: null
01:59:53 java.lang.NullPointerException
01:59:53 	at hudson.model.AbstractProject.checkout(AbstractProject.java:1250)
01:59:53 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
01:59:53 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
01:59:53 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
01:59:53 	at hudson.model.Run.execute(Run.java:1745)
01:59:53 	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
01:59:53 	at hudson.model.ResourceController.execute(ResourceController.java:89)
01:59:53 	at hudson.model.Executor.run(Executor.java:240)


Originally reported by olivergondza, imported from: NPE in AbstractProject.checkout
  • status: Resolved
  • priority: Minor
  • component(s): core
  • label(s): 2.107.2-fixed, newbie-friendly
  • resolution: Fixed
  • resolved: 2018-03-05T08:19:40+00:00
  • votes: 0
  • watchers: 3
  • imported: 2025-11-24
Raw content of original issue

When disconnecting slave during the build:

       FilePath workspace = build.getWorkspace();
        try {
            workspace.mkdirs(); # Line 1250
        } catch (IOException e) {
            // Can't create workspace dir - Is slave disk full ?
            new DiskSpaceMonitor().markNodeOfflineIfDiskspaceIsTooLow(build.getBuiltOn().toComputer());
            throw e;
        }
01:59:53 FATAL: null
01:59:53 java.lang.NullPointerException
01:59:53 	at hudson.model.AbstractProject.checkout(AbstractProject.java:1250)
01:59:53 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
01:59:53 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
01:59:53 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
01:59:53 	at hudson.model.Run.execute(Run.java:1745)
01:59:53 	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
01:59:53 	at hudson.model.ResourceController.execute(ResourceController.java:89)
01:59:53 	at hudson.model.Executor.run(Executor.java:240)

Activity

  1. jenkins-infra-bot commented on Jul 17, 2015

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Mar 2, 2018

    @jenkins-infra-bot
    Author
    oleg_nenashev:

    Incomplete (almost ready) fix is here: #3094.
    Everybody is welcome to finalize it

  3. jenkins-infra-bot commented on Mar 4, 2018

    @jenkins-infra-bot
    Author
  4. jenkins-infra-bot commented on Mar 4, 2018

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Piush
    Path:
    core/src/main/java/hudson/model/AbstractProject.java
    http://jenkins-ci.org/commit/jenkins/b0c5a86addf7eb0dbf84a5469380576e155eb151
    Log:
    JENKINS-29470 - Prevent NPE in AbstractProject.checkout when agent disconnects during the build (#3094)

    JENKINS-29470 - Prevent NPE in AbstractProject.checkout when agent disconnects during the build

  5. jenkins-infra-bot commented on Mar 5, 2018

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      The fix has been integrated towards 2.110

    The fix has been integrated towards 2.110

  6. jenkins-infra-bot commented on Apr 11, 2018

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Piush
    Path:
    core/src/main/java/hudson/model/AbstractProject.java
    http://jenkins-ci.org/commit/jenkins/9fb75bb4c6a7a43e472abae919fd32eef1983b92
    Log:
    JENKINS-29470 - Prevent NPE in AbstractProject.checkout when agent disconnects during the build (#3094)

    JENKINS-29470 - Prevent NPE in AbstractProject.checkout when agent disconnects during the build

    (cherry picked from commit b0c5a86)

  7. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions