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

Starting 2 different Btrace processes in 1 server ran into infinite loop? #396

Closed
todLiu opened this issue Oct 17, 2019 · 2 comments
Closed

Comments

@todLiu
Copy link

todLiu commented Oct 17, 2019

BTrace stumbled here in a infinite loop? maybe due to the unsafe collection "weakhashmap", please have a look and fix it, thanks in advance!

at java.util.WeakHashMap.get(WeakHashMap.java:403)
at com.sun.btrace.runtime.ClassCache.getInfos(ClassCache.java:80)
at com.sun.btrace.runtime.ClassCache.get(ClassCache.java:66)
at com.sun.btrace.runtime.ClassCache.get(ClassCache.java:62)
at com.sun.btrace.runtime.ClassFilter.isSubTypeOf(ClassFilter.java:223)
at com.sun.btrace.runtime.BTraceProbeSupport.getApplicableHandlers(BTraceProbeSupport.java:128)
at com.sun.btrace.runtime.BTraceProbePersisted.getApplicableHandlers(BTraceProbePersisted.java:372)
at com.sun.btrace.runtime.Instrumentor.create(Instrumentor.java:83)
at com.sun.btrace.runtime.BTraceClassWriter.addInstrumentor(BTraceClassWriter.java:68)
at com.sun.btrace.runtime.BTraceTransformer.transform(BTraceTransformer.java:196)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)

@todLiu todLiu changed the title Starting 2 different trace processes in 1 server ran into infinite loop? Starting 2 different Btrace processes in 1 server ran into infinite loop? Oct 17, 2019
@jbachorik
Copy link
Collaborator

Can you describe the steps leading to this such that they are easy to follow precisely? It is necessary for reproduction and debugging. Thanks!

@todLiu
Copy link
Author

todLiu commented Nov 27, 2019

image
Please check the trace captured attached, Application launched multi-thread to process its business,meanwhile btrace jumps in and do reflection ,Sometimes the application runs into infinite loop . I really suspect the root cause is "WeakHashMap", we have packaged another jar to check if this issue will happen again.

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

No branches or pull requests

2 participants