You or some of your users notice that one of your folders is missing. Reviewing your logs you see a log entry compatible with the one shown below:
WARNING: Ignoring /app/nfs/jenkins/home/jobs/XXX Push to xxxxx as folder naming rules collide with /app/nfs/jenkins/home/jobs/XXX Push to xxxxx SEVERE: Failed Loading item <Name of the item> java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124
XXXX-XX-XX [id=98] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading item <Item_name> java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:649) at java.lang.StringBuilder.append(StringBuilder.java:202) at jenkins.branch.NameEncoder.decode(NameEncoder.java:214)
WARNING c.c.h.p.folder.AbstractFolder#loadChildren: Ignoring <itemFullName> as folder naming rules collide with <otherItemFullName>
The key here is that these item names will contain a succession of the same letter, e.g.:
The problem is coming from a known issue on the Branch API Plugin, the issue is JENKINS-59756. And as explained in the issue itself is related to the fact that some of the branch names are using reserved characters.
With multibranch pipelines that have branch names including these reserved URL characters, such as the / in feature/branch-name, this method gets called as part of the creation of a file called name-utf8.txt, which defines the computed folders for the branch jobs containing these special characters. The bug causes this file to essentially double in size.
Potentially, this problem can cause a big impact on your instance.
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed Master
- CloudBees CI (CloudBees Core) on traditional platforms - Client Master
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Platform - Client Master
- Branch API Plugin < 2.5.5
Upgrade Branch API Plugin up to at least 2.5.5 version. These versions will contain the fix for the issue.
Remove all the
name-utf8.txt in the $JENKINS_HOME and restart Jenkins (or only target the bigger ones). But this will give you a temporary workaround while you plan to upgrade the plugin.
- CloudBees CI (CloudBees Core) on traditional platforms - Client Master 22.214.171.124
- Branch API Plugin 2.5.4
- JENKINS-59756 NameEncoder.decode can introduce duplicate characters per build to