Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlock in version 2.7 #50

Open
boyshell opened this issue Jul 1, 2016 · 1 comment
Open

Deadlock in version 2.7 #50

boyshell opened this issue Jul 1, 2016 · 1 comment

Comments

@boyshell
Copy link

boyshell commented Jul 1, 2016

thread busy-map-server-莲花洞-6-0:
java.lang.Thread.State: BLOCKED
at java.lang.ClassLoader.checkCerts(ClassLoader.java:884)
- waiting to lock <13bdd6ad> (a org.xeustechnologies.jcl.JarClassLoader) owned by "login-executor-0" t@301
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:665)
at java.lang.ClassLoader.defineClass(ClassLoader.java:758)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at org.xeustechnologies.jcl.JarClassLoader.access$000(JarClassLoader.java:42)
at org.xeustechnologies.jcl.JarClassLoader$LocalLoader.loadClass(JarClassLoader.java:246)
at org.xeustechnologies.jcl.AbstractClassLoader.loadClass(AbstractClassLoader.java:120)
- locked <789824e1> (a java.util.Collections$SynchronizedRandomAccessList)
at org.xeustechnologies.jcl.AbstractClassLoader.loadClass(AbstractClassLoader.java:94)
at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:376)
at org.reflections.ReflectionUtils.forNames(ReflectionUtils.java:397)
at org.reflections.Reflections.getSubTypesOf(Reflections.java:367)

Locked ownable synchronizers:
- locked <12e5f7cb> (a java.util.concurrent.ThreadPoolExecutor$Worker)

thread login-executor-0:
java.lang.Thread.State: BLOCKED
at org.xeustechnologies.jcl.AbstractClassLoader.loadClass(AbstractClassLoader.java:117)
- waiting to lock <789824e1> (a java.util.Collections$SynchronizedRandomAccessList) owned by "busy-map-server-莲花洞-6-0" t@205
at org.xeustechnologies.jcl.AbstractClassLoader.loadClass(AbstractClassLoader.java:94)

JNI locked monitors:
- locked <13bdd6ad> (a org.xeustechnologies.jcl.JarClassLoader)

Locked ownable synchronizers:
- locked <33c6c4f> (a java.util.concurrent.ThreadPoolExecutor$Worker)

any suggestion?

@fxgendrin
Copy link

fxgendrin commented Jul 18, 2017

Get the same with a deadlock with 2 threads: one has the lock on instance of the classloader and wants lock on AbstractClassLoader.loaders, the other the inverse.

Need a new release with following modification in AbstractClassLoader (as suggested in comment, but need to be compatible only with java 1.6, alternative is to duplicate ConcurrentSkipListSet into the project)
protected final Set<ProxyClassLoader> loaders = new ConcurrentSkipListSet<ProxyClassLoader>();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants