-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: 9.2.17
-
Component/s: Credentials
-
None
-
1
-
Severity 3 - Minor
Issue Summary
When user tries to delete a shared credential (Overview --> Shared credentials --> Delete shared credential), especially where there are huge number of plan repositories, Bamboo is taking lot of time to show the confirmation popup.
This is reproducible on Data Center: Yes
Steps to Reproduce
- Create 30k build plans, and each plan has a plan repository.
- Create a shared credential (not necessarily that it has to be used)
- Try deleting the shared credential
- The confirmation pop-up will take few minutes to load
Expected Results
Confirmation popup should be shown in real time / in few seconds
Actual Results
Taking couple of minutes to show the confirmation popup. The below stuck threads can be seen in the <bamboo-install-dir>/logs/catalina.log.
As per the thread dump more amount of time is taken in the menthod getPlanRepositoryDefinitions in the class
CredentialsUsageDetectorImpl
16-Sep-2024 13:54:31.045 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8085-exec-42] (id=[407]) has been active for [62,130] milliseconds (since [9/16/24 1:53 PM]) to serve the same request for [https://<bamboo-base-url>/admin/credentials/admin/confirmDeleteSharedCredentials.action?projectKey=&credentialsId=545535874&returnUrl=%2Fadmin%2Fcredentials%2FconfigureSharedCredentials.action&bamboo.successReturnMode=json&decorator=nothing&confirm=true&_=1726448238257] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck. java.lang.Throwable at org.hibernate.engine.internal.EntityEntryContext.downgradeLocks(EntityEntryContext.java:373) at org.hibernate.engine.internal.StatefulPersistenceContext.afterTransactionCompletion(StatefulPersistenceContext.java:303) at org.hibernate.internal.SessionImpl.afterTransactionCompletion(SessionImpl.java:2448) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.afterTransactionCompletion(JdbcCoordinatorImpl.java:456) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.afterCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:203) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$400(JdbcResourceLocalTransactionCoordinatorImpl.java:40) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:283) at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) at org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:645) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:744) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:712) at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:234) at com.sun.proxy.$Proxy142.commit(Unknown Source) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) at com.sun.proxy.$Proxy246.getPlanRepositoryDefinitions(Unknown Source) at com.atlassian.bamboo.credentials.CredentialsUsageDetectorImpl.lambda$getCredentialsRepositories$8(CredentialsUsageDetectorImpl.java:217) at com.atlassian.bamboo.credentials.CredentialsUsageDetectorImpl$$Lambda$5268/1458535450.accept(Unknown Source) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
Workaround
No work around at the moment. Will update in case if we find any work around.
- is action for
-
BDEV-19117 Loading...