I have a problem in production with high concurrency causing threads blocks in a Spring application deployed on a Weblogic 12c server.
The trace of the locked threads are as follows:
"[ACTIVE] ExecuteThread: '194' for queue: 'weblogic.kernel.Default (self-tuning)'" Id=710666 BLOCKED on java.util.Collections$SynchronizedMap@797668ac owned by "[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'" Id=822079
at java.util.Collections$SynchronizedMap.get(Collections.java:2586)
at org.apache.commons.beanutils.MethodUtils.getCachedMethod(MethodUtils.java:1275)
at org.apache.commons.beanutils.MethodUtils.getMatchingAccessibleMethod(MethodUtils.java:952)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:274)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:226)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.param.AbstractParamObjectProcessor.getValueFromObject(AbstractParamObjectProcessor.java:40)
The trace that is running is:
"[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'" Id=822079 RUNNABLE
at java.util.Collections$SynchronizedMap.get(Collections.java:2586)
at org.apache.commons.beanutils.MethodUtils.getCachedMethod(MethodUtils.java:1275)
at org.apache.commons.beanutils.MethodUtils.getMatchingAccessibleMethod(MethodUtils.java:952)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:274)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:226)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:177)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.result.AbstractResultObjectProcessor.setValueInObject(AbstractResultObjectProcessor.java:46)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.result.ResultObjectProcessor.setValueInMethodReturnObject(ResultObjectProcessor.java:149)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.result.ResultObjectProcessor.processPropertiesOfResultObject(ResultObjectProcessor.java:90)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.result.ResultObjectProcessor.process(ResultObjectProcessor.java:56)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.result.ResultObjectProcessor.setValueInMethodReturnObject(ResultObjectProcessor.java:148)
at com.emaginalabs.dgtp.gaia.connector.metadata.object.result.ResultObjectProcessor.processPropertiesOfResultObject(ResultObjectProcessor.java:90)
The version of beanutils being used is version 1.8.3. We have checked but there are no similar bugs reported.
The code where the beanutils method is being invoked is:
try {
if (value != null) {
List<PropertyMetadata> propertiesObject = this.objectManager.getValue(bean.getClass()).getPropertiesObject();
PropertyMetadata propertyMetadata = MetadataConnectorUtils.findPropertyMetadataByFieldName(propertiesObject, property);
MethodUtils.invokeMethod(bean, propertyMetadata.getSetMethod(), value);
}
} catch (Exception var6) {
throw new MetadataConnectorException(MetadataError.SET_ERORR_IN_OBJECT_RESULT, var6);
}