-
Bug
-
Resolution: Duplicate
-
Major
-
None
We upgraded Port allocator (and lots of other things), and found the strange and unexpected behaviour that our builds seemed not to be running correctly on slaves.
After much digging, the finger points to the upgrade of port allocator.
The following groovy script shows why:
def q = Jenkins.getInstance().getQueue();
q.getClass().getDeclaredFields().each()
def fld = ResourceController.class.getDeclaredField("inUse");
fld.setAccessible(true);
def result = fld.get(q);
def fld2 = ResourceList.class.getDeclaredField("all");
fld2.setAccessible(true);
result.each() {
def result2 = fld2.get(it);
result2.each() { res -> println "... ${res.class}"; }
}
Gives
...
... class hudson.model.Resource
... class hudson.model.Resource
Result:
The first build through is blocking every other build, which just sits there for multiple hours until complete. Since they are on entirely different slaves (computers), this is particularly wrong.
We had to downgrade to 1.5 to fix this.