[jboss-jira] [JBoss JIRA] (DROOLS-890) Thread deadlock issue in class ProjectClassLoader.java
Thomas Leung (JIRA)
issues at jboss.org
Thu Sep 3 22:51:00 EDT 2015
[ https://issues.jboss.org/browse/DROOLS-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105422#comment-13105422 ]
Thomas Leung commented on DROOLS-890:
-------------------------------------
We did build from Drools source on 6.2.0.Final with the change following your provided link https://github.com/droolsjbpm/drools/commit/183518527.
Basically it mainly synchronize the method public synchronized Class<?> defineClass(String name, String resourceName, byte[] bytecode).
However, the same deadlock issue still happened while we run a load test again.
This deadlock happened always when we run load test during the past couple of weeks. We noticed that everytime it locked at the below line in ProjectClassLoader.java:
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
try {
return loadType(name, resolve);
} catch (ClassNotFoundException cnfe) {
synchronized(projectClassLoader) {
try {
return projectClassLoader.internalLoadClass(name, resolve); <== wait for lock projectClassLoader object
} catch (ClassNotFoundException cnfe2) {
return projectClassLoader.tryDefineType(name, cnfe);
}
}
}
}
That means it throws ClassNotFoundException in loadType(name, resolve). Is it an expected exception in normal usage or it happened abnormally?
> Thread deadlock issue in class ProjectClassLoader.java
> -------------------------------------------------------
>
> Key: DROOLS-890
> URL: https://issues.jboss.org/browse/DROOLS-890
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.1.0.Final
> Reporter: Vivek Hingorani
> Assignee: Mario Fusco
> Fix For: 6.3.0.Final
>
>
> In our project , we are using drools6.1.0.Final jars and the rules are deployed in a jar. Another application when trying to use the rules jar is getting thread deadlock problem. Stack trace is
> at org.drools.core.common.ProjectClassLoader$InternalTypesClassLoader.loadClass(ProjectClassLoader,java284)
> Two threads are in deadlock condition on this thread. I restarted the application and the error is gone but we need to fix this issue so that it is not reproduced later.The class is in drools-core jar
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list