java.lang.IllegalStateException: /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1

Jenkins JIRA | Matthew DeTullio | 11 months ago
  1. 0

    [JIRA] [branch-api-plugin] (JENKINS-32179) Branch indexing always attempts to create a new project for conflicting branch names from multiple sources

    Google Groups | 11 months ago | mjdet...@gmail.com (JIRA)
    java.lang.IllegalStateException: /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1
  2. 0

    cc [~jglick] If you have multiple {{SCMSource}} s on a multibranch project, for example two Git repos that both have a "master" branch (or any branch name for that matter), and one source does not exclude the conflict, then the {{MultiBranchProject}} attempts to create the branch again for each source. Because the project for that branch already exists and has built, you end up with a bunch of dead executors because builds for these new projects get triggered. {noformat} Started Setting origin to /foo/bar/project1.git Fetching origin... Pruning stale remotes... Getting remote branches... Checking branch stable Checking branch feat/tracking-data Checking branch master Scheduling build for branch: master Checking branch development Scheduling build for branch: development Checking branch feat/test Done. Setting origin to /foo/bar/project2.git Fetching origin... Pruning stale remotes... Getting remote branches... Checking branch master Scheduling build for branch: master Checking branch development Scheduling build for branch: development Done. Finished: SUCCESS {noformat} {noformat} Thread has died java.lang.IllegalStateException: /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1 at hudson.model.RunMap.put(RunMap.java:188) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:176) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1019) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1210) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:145) at hudson.model.Executor$1.call(Executor.java:364) at hudson.model.Executor$1.call(Executor.java:346) at hudson.model.Queue._withLock(Queue.java:1405) at hudson.model.Queue.withLock(Queue.java:1270) at hudson.model.Executor.run(Executor.java:346) {noformat} The obvious solution is to make sure your includes/excludes are properly defined. However, if users do not have a clearly defined naming convention and wish to pull from multiple {{SCMSource}} s, then there is nothing to prevent them from entering an erroneous state where multiple projects for a branch exist in memory trying to share the same config location on the filesystem. This in itself is a problem that is easily encountered, even if the use case of having two jobs for a branch with the same name is not supported.

    Jenkins JIRA | 11 months ago | Matthew DeTullio
    java.lang.IllegalStateException: /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1
  3. 0

    cc [~jglick] If you have multiple {{SCMSource}} s on a multibranch project, for example two Git repos that both have a "master" branch (or any branch name for that matter), and one source does not exclude the conflict, then the {{MultiBranchProject}} attempts to create the branch again for each source. Because the project for that branch already exists and has built, you end up with a bunch of dead executors because builds for these new projects get triggered. {noformat} Started Setting origin to /foo/bar/project1.git Fetching origin... Pruning stale remotes... Getting remote branches... Checking branch stable Checking branch feat/tracking-data Checking branch master Scheduling build for branch: master Checking branch development Scheduling build for branch: development Checking branch feat/test Done. Setting origin to /foo/bar/project2.git Fetching origin... Pruning stale remotes... Getting remote branches... Checking branch master Scheduling build for branch: master Checking branch development Scheduling build for branch: development Done. Finished: SUCCESS {noformat} {noformat} Thread has died java.lang.IllegalStateException: /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1 at hudson.model.RunMap.put(RunMap.java:188) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:176) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1019) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1210) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:145) at hudson.model.Executor$1.call(Executor.java:364) at hudson.model.Executor$1.call(Executor.java:346) at hudson.model.Queue._withLock(Queue.java:1405) at hudson.model.Queue.withLock(Queue.java:1270) at hudson.model.Executor.run(Executor.java:346) {noformat} The obvious solution is to make sure your includes/excludes are properly defined. However, if users do not have a clearly defined naming convention and wish to pull from multiple {{SCMSource}} s, then there is nothing to prevent them from entering an erroneous state where multiple projects for a branch exist in memory trying to share the same config location on the filesystem. This in itself is a problem that is easily encountered, even if the use case of having two jobs for a branch with the same name is not supported.

    Jenkins JIRA | 11 months ago | Matthew DeTullio
    java.lang.IllegalStateException: /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jenkins ver. 1.642 This is occuring on freestyle builds that are triggered by a cron expression and an upstream job (promotions plugin). When those triggers both happen close to each other it seams to "kill" the executor due to the IllegalStateExceptionThese are newer builds (#533, #532) but still its trying to run the [JobName]\builds\405 ,which already exists. Normally, it should trigger #533, #532 newer jobs IDs. We are constantly able to reproduce the issue every time a child job is triggered by the parent job using "Trigger call/builds on another projects" feature. Exception: java.lang.IllegalStateException: C:\Program Files (x86)\Jenkins\jobs\[JobName]\builds\405 already existed; will not overwrite with [JobName] #405 at hudson.model.RunMap.put(RunMap.java:188) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:176) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1019) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1210) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:145) at hudson.model.Executor$1.call(Executor.java:364) at hudson.model.Executor$1.call(Executor.java:346) at hudson.model.Queue._withLock(Queue.java:1405) at hudson.model.Queue.withLock(Queue.java:1270) at hudson.model.Executor.run(Executor.java:346) Jenkins in 1.607 (2015/03/30) - Has changes which removes race condition rendering the list of executors (issue 27564) might be causing this race condition issue. Similar threads: https://issues.jenkins-ci.org/browse/JENKINS-29268 [Configuration race condition] https://issues.jenkins-ci.org/browse/JENKINS-26582 [also has this issue for ver 1.621] Any idea for resolving this issue, we are constantly getting the executer failures states.

    Jenkins JIRA | 12 months ago | Riddhi Sharma
    java.lang.IllegalStateException: C:\Program Files (x86)\Jenkins\jobs\[JobName]\builds\405 already existed; will not overwrite with [JobName] #405
  6. 0

    [JIRA] [core] (JENKINS-34103) jenkins reindex purges build queue

    Google Groups | 8 months ago | ja...@sandlininc.com (JIRA)
    java.lang.IllegalStateException: /<span class="code-keyword" style="color: #000091">var</span>/lib/jenkins/jobs/xxxxxx/builds/112 already existed; will not overwrite with xxxxxxxxx #112

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      /Users/mjdetullio/jenkins/jobs/freestyle-multi/branches/master/builds/1 already existed; will not overwrite with freestyle-multi/master #1

      at hudson.model.RunMap.put()
    2. Hudson
      RunMap.put
      1. hudson.model.RunMap.put(RunMap.java:188)
      1 frame
    3. jenkins.model.lazy
      LazyBuildMixIn.newBuild
      1. jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:176)
      1 frame
    4. Hudson
      Executor.run
      1. hudson.model.AbstractProject.newBuild(AbstractProject.java:1019)
      2. hudson.model.AbstractProject.createExecutable(AbstractProject.java:1210)
      3. hudson.model.AbstractProject.createExecutable(AbstractProject.java:145)
      4. hudson.model.Executor$1.call(Executor.java:364)
      5. hudson.model.Executor$1.call(Executor.java:346)
      6. hudson.model.Queue._withLock(Queue.java:1405)
      7. hudson.model.Queue.withLock(Queue.java:1270)
      8. hudson.model.Executor.run(Executor.java:346)
      8 frames