java.lang.IllegalStateException: cannot create a build with number 8558 since that (or higher) is already in use among [8099, 8312, 8317, 8318, 8319, 8320, 8321, 8322, 8323, 8326, 8328, 8329, 8330, 8331, 8333, 8335, 8336, 8338, 8340, 8341, 8348, 8351, 8355, 8358, 8360, 8361, 8362, 8363, 8370, 8371, 8380, 8381, 8386, 8387, 8394, 8397, 8398, 8399, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8407, 8408, 8409, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8426, 8428, 8435, 8436, 8440, 8441, 8442, 8484, 8487, 8488, 8489, 8490, 8491, 8492, 8493, 8495, 8497, 8498, 8499, 8500, 8501, 8508, 8512, 8513, 8514, 8515, 8522, 8523, 8524, 8526, 8527, 8528, 8529, 8530, 8531, 8535, 8536, 8537, 8545, 8546, 8549, 8550, 8552, 8554, 8555, 8556, 8557, 8560, 8563]

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I have a multi-config job (4 configurations) with "Execute concurrent builds if necessary" enabled. The job is triggered by new patch sets being pushed to gerrit (using the Gerrit trigger plugin). This seems to work fine when only pushing a single new patch set to gerrit at a time. When two new patch sets are pushed at the same time (git add, git commit, git add, git commit, git push) all 4 sub-builds will fail for one of the patch sets with errors like this (and bring down the Jenkins thread they are running on): {noformat} java.lang.IllegalStateException: cannot create a build with number 252 since that (or higher) is already in use among [151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 253] at jenkins.model.lazy.AbstractLazyLoadRunMap.proposeNewNumber(AbstractLazyLoadRunMap.java:361) at hudson.model.RunMap.put(RunMap.java:189) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:284) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:74) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1200) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144) at hudson.model.Executor.run(Executor.java:213) {noformat} In this case build 252 was the build number for the bad patch set, 253 for the good patch set. My guess as to what happened is that the parent builds started in one order (252, then 253) but the sub-builds started in the opposite order (253, then 252). The Jenkins log is missing messages about the 252 sub-builds though so I can't confirm this (presumably the sub-build started messages are missing because the threads died before writing the messages). I don't know if this is just a race condition as suggested in the title or if it is a problem with how the gerrit trigger plugin launches jobs when more than one new patch set is introduced by a single push to gerrit.
    via by David Emett,
  • I have a multi-config job (4 configurations) with "Execute concurrent builds if necessary" enabled. The job is triggered by new patch sets being pushed to gerrit (using the Gerrit trigger plugin). This seems to work fine when only pushing a single new patch set to gerrit at a time. When two new patch sets are pushed at the same time (git add, git commit, git add, git commit, git push) all 4 sub-builds will fail for one of the patch sets with errors like this (and bring down the Jenkins thread they are running on): {noformat} java.lang.IllegalStateException: cannot create a build with number 252 since that (or higher) is already in use among [151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 253] at jenkins.model.lazy.AbstractLazyLoadRunMap.proposeNewNumber(AbstractLazyLoadRunMap.java:361) at hudson.model.RunMap.put(RunMap.java:189) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:284) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:74) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1200) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144) at hudson.model.Executor.run(Executor.java:213) {noformat} In this case build 252 was the build number for the bad patch set, 253 for the good patch set. My guess as to what happened is that the parent builds started in one order (252, then 253) but the sub-builds started in the opposite order (253, then 252). The Jenkins log is missing messages about the 252 sub-builds though so I can't confirm this (presumably the sub-build started messages are missing because the threads died before writing the messages). I don't know if this is just a race condition as suggested in the title or if it is a problem with how the gerrit trigger plugin launches jobs when more than one new patch set is introduced by a single push to gerrit.
    via by David Emett,
    • java.lang.IllegalStateException: cannot create a build with number 8558 since that (or higher) is already in use among [8099, 8312, 8317, 8318, 8319, 8320, 8321, 8322, 8323, 8326, 8328, 8329, 8330, 8331, 8333, 8335, 8336, 8338, 8340, 8341, 8348, 8351, 8355, 8358, 8360, 8361, 8362, 8363, 8370, 8371, 8380, 8381, 8386, 8387, 8394, 8397, 8398, 8399, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8407, 8408, 8409, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8426, 8428, 8435, 8436, 8440, 8441, 8442, 8484, 8487, 8488, 8489, 8490, 8491, 8492, 8493, 8495, 8497, 8498, 8499, 8500, 8501, 8508, 8512, 8513, 8514, 8515, 8522, 8523, 8524, 8526, 8527, 8528, 8529, 8530, 8531, 8535, 8536, 8537, 8545, 8546, 8549, 8550, 8552, 8554, 8555, 8556, 8557, 8560, 8563] at jenkins.model.lazy.AbstractLazyLoadRunMap.proposeNewNumber(AbstractLazyLoadRunMap.java:361) at hudson.model.RunMap.put(RunMap.java:189) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:284) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:74) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1205) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144) at hudson.model.Executor.run(Executor.java:213)

    Users with the same issue

    Unknown visitor1 times, last one,