-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Running on Linux with these versions:
Jenkins 2.462.3
OpenJDK 21
Role Strategy Plugin 743.v142ea_b_d5f1d3
Caffeine API Plugin (caffeine-api) 3.1.8-133.v17b_1ff2e0599
commons-lang3 v3.x Jenkins API Plugin (commons-lang3-api) 3.17.0-84.vb_b_938040b_078
Ionicons API (ionicons-api) 74.v93d5eb_813d5f
Configuration as Code Plugin (configuration-as-code) 1873.vea_5814ca_9c93
Pipeline: Step API (workflow-step-api) 678.v3ee58b_469476
Folders Plugin (cloudbees-folder) 6.955.v81e2a_35c08d3
LDAP Plugin (ldap) 725.v3cb_b_711b_1a_ef
Mailer Plugin (mailer) 488.v0c9639c1a_eb_3Running on Linux with these versions: Jenkins 2.462.3 OpenJDK 21 Role Strategy Plugin 743.v142ea_b_d5f1d3 Caffeine API Plugin (caffeine-api) 3.1.8-133.v17b_1ff2e0599 commons-lang3 v3.x Jenkins API Plugin (commons-lang3-api) 3.17.0-84.vb_b_938040b_078 Ionicons API (ionicons-api) 74.v93d5eb_813d5f Configuration as Code Plugin (configuration-as-code) 1873.vea_5814ca_9c93 Pipeline: Step API (workflow-step-api) 678.v3ee58b_469476 Folders Plugin (cloudbees-folder) 6.955.v81e2a_35c08d3 LDAP Plugin (ldap) 725.v3cb_b_711b_1a_ef Mailer Plugin (mailer) 488.v0c9639c1a_eb_3
-
-
799.v5b_e7b_ecc231e
Example endpoints:
- /job/projects/job/p8/runs
- /job/projects/job/p146/wfapi/runs
- /job/a/multi-pipeline-graph/runs
Observed:
- Jetty (winstone)-93207409: 14 threads blocked
- Jetty (winstone)-93216166: 12 threads blocked
- Jetty (winstone)-93207413: 54 threads blocked
Each thread is stuck on:
java.lang.Thread.State: BLOCKED (on object monitor)
at com.michelin.cio.hudson.plugins.rolestrategy.Role.hasAnyPermission(Role.java:269)
- locked <0x00000006439773b8> (a java.util.HashSet)
Method:
public Boolean hasAnyPermission(Set<Permission> permissions) { synchronized (this.permissions) { return CollectionUtils.containsAny(this.permissions, permissions); } }
Are there contention problems when multiple threads are accessing job run data concurrently? Consider using thread-safe data structures such as ConcurrentHashMap.newKeySet() or CopyOnWriteArrayList instead of HashSet, or refactor the locking strategy to reduce contention.