Skip to content

[JENKINS-36594] CauseOfInterruption.UserInterruption#print() may cause creation of previously deleted users #17323

Closed

Description

@jenkins-infra-bot

Just a minor bug, which may potentially happen due to the race condition if a task is being executed with SYSTEM authentication.

  • UserInterruption#getUser() uses User.get(String), which creates users on demand.
  • When we create CauseOfInterruption.UserInterruption, we expect it exists
  • BUT: the user may be deleted from parallel thread by the time we call UserInterruption#print, which invokes getUser()
  • In such case the recently deleted user will be recreated

Originally reported by oleg_nenashev, imported from: CauseOfInterruption.UserInterruption#print() may cause creation of previously deleted users
  • status: Resolved
  • priority: Minor
  • component(s): core
  • label(s): 2.19.4-fixed
  • resolution: Fixed
  • resolved: 2016-07-21T08:54:14+00:00
  • votes: 0
  • watchers: 1
  • imported: 2025-11-24
Raw content of original issue

Just a minor bug, which may potentially happen due to the race condition if a task is being executed with SYSTEM authentication.

  • UserInterruption#getUser() uses User.get(String), which creates users on demand.
  • When we create CauseOfInterruption.UserInterruption, we expect it exists
  • BUT: the user may be deleted from parallel thread by the time we call UserInterruption#print, which invokes getUser()
  • In such case the recently deleted user will be recreated

Activity

  1. jenkins-infra-bot commented on Jul 12, 2016

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Jul 21, 2016

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

      Fixed in 2.14 (2016/07/17)

    Fixed in 2.14 (2016/07/17)

  3. jenkins-infra-bot commented on Nov 13, 2016

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

      Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/jenkins/model/CauseOfInterruption.java core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.groovy core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_ja.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_pl.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_sr.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_zh_TW.properties http://jenkins-ci.org/commit/jenkins/91ad59214234e7724d586f64f8fb6db35104857b Log: [FIXED JENKINS-38721, JENKINS-37282] - NPE in "CauseOfInterruption.UserInterruption" when user is missing (#2630)

      • [FIXED JENKINS-38721] - Prevent NPE during rendering of "CauseOfInterruption.UserInterruption" when user is missing

      It is a regression introduced in JENKINS-36594

    Code changed in jenkins
    User: Oleg Nenashev
    Path:
    core/src/main/java/jenkins/model/CauseOfInterruption.java
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.groovy
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_ja.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_pl.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_sr.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_zh_TW.properties
    http://jenkins-ci.org/commit/jenkins/91ad59214234e7724d586f64f8fb6db35104857b
    Log:
    [FIXED JENKINS-38721, JENKINS-37282] - NPE in "CauseOfInterruption.UserInterruption" when user is missing (#2630)

    • [FIXED JENKINS-38721] - Prevent NPE during rendering of "CauseOfInterruption.UserInterruption" when user is missing

    It is a regression introduced in JENKINS-36594

  4. jenkins-infra-bot commented on Nov 18, 2016

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

      Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/jenkins/model/CauseOfInterruption.java core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.groovy core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_ja.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_pl.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_sr.properties core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_zh_TW.properties http://jenkins-ci.org/commit/jenkins/0399037f842d1c9c4fbbc970421fafa3ecdac7eb Log: [FIXED JENKINS-38721, JENKINS-37282] - NPE in "CauseOfInterruption.UserInterruption" when user is missing (#2630)

      • [FIXED JENKINS-38721] - Prevent NPE during rendering of "CauseOfInterruption.UserInterruption" when user is missing

      It is a regression introduced in JENKINS-36594

      (cherry picked from commit 91ad59214234e7724d586f64f8fb6db35104857b)

    Code changed in jenkins
    User: Oleg Nenashev
    Path:
    core/src/main/java/jenkins/model/CauseOfInterruption.java
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.groovy
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_ja.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_pl.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_sr.properties
    core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary_zh_TW.properties
    http://jenkins-ci.org/commit/jenkins/0399037f842d1c9c4fbbc970421fafa3ecdac7eb
    Log:
    [FIXED JENKINS-38721, JENKINS-37282] - NPE in "CauseOfInterruption.UserInterruption" when user is missing (#2630)

    • [FIXED JENKINS-38721] - Prevent NPE during rendering of "CauseOfInterruption.UserInterruption" when user is missing

    It is a regression introduced in JENKINS-36594

    (cherry picked from commit 91ad592)

  5. jenkins-infra-bot commented on Dec 12, 2016

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Jesse Glick
    Path:
    src/test/java/org/jenkinsci/plugins/workflow/steps/CatchErrorStepTest.java
    http://jenkins-ci.org/commit/workflow-basic-steps-plugin/a1073f63461efa41b97d038191610c9dcbd60327
    Log:
    Adjust test to work against -Djenkins.version=2.19.4 after JENKINS-36594 & JENKINS-38721.

  6. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original relates_to from Jira: JENKINS-38721]

  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