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

Workaround java level Deadlock when initializing annotation #2862

Closed
emeroad opened this issue Apr 26, 2017 · 5 comments
Closed

Workaround java level Deadlock when initializing annotation #2862

emeroad opened this issue Apr 26, 2017 · 5 comments
Labels
Milestone

Comments

@emeroad
Copy link
Member

emeroad commented Apr 26, 2017

Description

Class.getAnnotation() of JDK 6, 7 can cause java level deallock

Related issue:

Environment

Affects Version/s: 1.0.x, 1.1.x, 1.5.x, 1.6.1-

Additional Info

[Thread Dump] 
Found one Java-level deadlock:
=============================
"TP-Processor4096":
waiting to lock monitor 0x00007fd0e80094b0 (object 0x0000000761528120, a java.lang.Class),
which is held by "TP-Processor15"
"TP-Processor15":
waiting to lock monitor 0x00007fd0e8009a98 (object 0x000000079e0a1cb0, a org.apache.catalina.loader.WebappClassLoader),
which is held by "TP-Processor3"
"TP-Processor3":
waiting to lock monitor 0x00007fd0e80094b0 (object 0x0000000761528120, a java.lang.Class),
which is held by "TP-Processor15"

Java stack information for the threads listed above:
===================================================

"TP-Processor4096":
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:63)
- waiting to lock <0x0000000761528120> (a java.lang.Class for sun.reflect.annotation.AnnotationType)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:202)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.reflect.Method.declaredAnnotations(Method.java:693)
- locked <0x000000079e6c5678> (a java.lang.reflect.Method)
at java.lang.reflect.Method.getAnnotation(Method.java:679)
at com.nhn.lucy.web.interceptor.PropertyInterceptor.intercept(PropertyInterceptor.java:39)
...

"TP-Processor15":
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
at java.lang.Class.getDeclaredMethods(Class.java:1793)
at sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:86)
at sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:82)
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:66)
- locked <0x0000000761528120> (a java.lang.Class for sun.reflect.annotation.AnnotationType)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:202)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3079)
- locked <0x0000000766800f00> (a java.lang.Class for org.codehaus.jackson.map.introspect.VisibilityChecker$Std)
at java.lang.Class.getAnnotation(Class.java:3038)
at org.codehaus.jackson.map.introspect.VisibilityChecker$Std.<clinit>(VisibilityChecker.java:178)
at org.codehaus.jackson.map.ObjectMapper.<clinit>(ObjectMapper.java:196)
...

"TP-Processor3":
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:63)
- waiting to lock <0x0000000761528120> (a java.lang.Class for sun.reflect.annotation.AnnotationType)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:202)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3079)
- locked <0x000000076680f8e0> (a java.lang.Class for com.navercorp.pinpoint.plugin.arcus.interceptor.FrontCacheGetFutureConstructInterceptor)
at java.lang.Class.getAnnotation(Class.java:3038)
at com.navercorp.pinpoint.profiler.instrument.JavassistClass.addInterceptor0(JavassistClass.java:478)
at com.navercorp.pinpoint.profiler.instrument.JavassistClass.addInterceptor(JavassistClass.java:394)
at com.navercorp.pinpoint.plugin.arcus.ArcusPlugin$4.doInTransform(ArcusPlugin.java:145)
at com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformerGuardDelegate.transform(MatchableClassFileTransformerGuardDelegate.java:70)
at com.navercorp.pinpoint.profiler.ClassFileTransformerDispatcher.transform0(ClassFileTransformerDispatcher.java:119)
at com.navercorp.pinpoint.profiler.ClassFileTransformerDispatcher.transform(ClassFileTransformerDispatcher.java:100)
at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
- locked <0x000000079e0a1cb0> (a org.apache.catalina.loader.WebappClassLoader)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
- locked <0x000000079e0a1cb0> (a org.apache.catalina.loader.WebappClassLoader)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at net.spy.memcached.plugin.FrontCacheMemcachedClient.asyncGet(FrontCacheMemcachedClient.java:50)
at net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:817)
at net.spy.memcached.ArcusClientPool.asyncGet(ArcusClientPool.java:141)
at com.navercorp.arcus.spring.cache.ArcusCache.get(ArcusCache.java:108)
at org.springframework.cache.interceptor.CacheAspectSupport.inspectCacheables(CacheAspectSupport.java:294)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:199)
at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
...
@emeroad emeroad added the bug label Apr 26, 2017
@emeroad emeroad added this to the 1.6.2 milestone Apr 26, 2017
@emeroad emeroad closed this as completed Apr 26, 2017
@emeroad emeroad reopened this Apr 26, 2017
emeroad added a commit to emeroad/pinpoint that referenced this issue Apr 26, 2017
emeroad added a commit that referenced this issue Apr 26, 2017
emeroad added a commit that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
koo-taejin added a commit to koo-taejin/pinpoint that referenced this issue Apr 26, 2017
koo-taejin added a commit that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 26, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 27, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 27, 2017
koo-taejin pushed a commit that referenced this issue Apr 27, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 27, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 27, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 27, 2017
minwoo-jung added a commit to minwoo-jung/pinpoint that referenced this issue Apr 27, 2017
koo-taejin added a commit to koo-taejin/pinpoint that referenced this issue Apr 27, 2017
jaehong-kim pushed a commit that referenced this issue Apr 27, 2017
emeroad added a commit to emeroad/pinpoint that referenced this issue May 11, 2017
emeroad added a commit to emeroad/pinpoint that referenced this issue May 11, 2017
emeroad added a commit to emeroad/pinpoint that referenced this issue May 11, 2017
emeroad added a commit that referenced this issue May 11, 2017
emeroad added a commit to emeroad/pinpoint that referenced this issue May 11, 2017
emeroad added a commit to emeroad/pinpoint that referenced this issue May 11, 2017
emeroad added a commit that referenced this issue May 11, 2017
 - This fix has compatibility issues
emeroad added a commit that referenced this issue May 12, 2017
emeroad pushed a commit that referenced this issue May 15, 2017
emeroad pushed a commit that referenced this issue May 15, 2017
@emeroad emeroad closed this as completed Jun 8, 2017
jiaqifeng pushed a commit to jiaqifeng/pinpoint that referenced this issue Nov 17, 2017
jiaqifeng pushed a commit to jiaqifeng/pinpoint that referenced this issue Jan 15, 2018
jiaqifeng pushed a commit to jiaqifeng/pinpoint that referenced this issue Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants