You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "bert82503 (via GitHub)" <gi...@apache.org> on 2024/08/26 04:19:34 UTC

[I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

bert82503 opened a new issue, #14578:
URL: https://github.com/apache/dubbo/issues/14578

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   - Dubbo Java 3.2.10
   - jdk1.8.0_333
   
   ### Steps to reproduce this issue
   
   ## 问题认识
   应用启动后不久,出现了这个异常。
   Shortly after the application was launched, this exception occurred.
   
   the full exception stack:
   ```log
   java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom
     at java.util.concurrent.ConcurrentHashMap.addCount(ConcurrentHashMap.java:2263)
     at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1070)
     at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
     at org.apache.dubbo.remoting.exchange.support.DefaultFuture.<init>(DefaultFuture.java:99)
     at org.apache.dubbo.remoting.exchange.support.DefaultFuture.newFuture(DefaultFuture.java:128)
     at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:153)
     at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:109)
     at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:95)
     at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:134)
     at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:248)
     at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:191)
     at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:71)
     at org.apache.dubbo.rpc.filter.RpcExceptionFilter.invoke(RpcExceptionFilter.java:40)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:197)
     at org.apache.dubbo.rpc.protocol.ReferenceCountInvokerWrapper.invoke(ReferenceCountInvokerWrapper.java:106)
     at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invokeWithContext(AbstractClusterInvoker.java:412)
     at org.apache.dubbo.rpc.cluster.support.FailfastClusterInvoker.doInvoke(FailfastClusterInvoker.java:48)
     at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:366)
     at org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter.invoke(RouterSnapshotFilter.java:46)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.monitor.support.MonitorFilter.$sw$original$invoke$1vamrv0(MonitorFilter.java:108)
     at org.apache.dubbo.monitor.support.MonitorFilter.$sw$original$invoke$1vamrv0$accessor$$sw$p4vq621(MonitorFilter.java)
     at org.apache.dubbo.monitor.support.MonitorFilter$$sw$auxiliary$8n9i9c3.call(Unknown Source)
     at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86)
     at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter.invoke(MetricsClusterFilter.java:57)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:52)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.rpc.cluster.filter.support.ObservationSenderFilter.invoke(ObservationSenderFilter.java:62)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.spring.security.filter.ContextHolderParametersSelectedTransferFilter.invoke(ContextHolderParametersSelectedTransferFilter.java:40)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.metrics.filter.MetricsFilter.invoke(MetricsFilter.java:86)
     at org.apache.dubbo.rpc.cluster.filter.support.MetricsConsumerFilter.invoke(MetricsConsumerFilter.java:38)
     at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
     at org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter.invoke(ConsumerClassLoaderFilter.java:40)
   ```
   
   ### What you expected to happen
   
   - Why throw this exception? 
   - What is the cause of this exception?
   - How to fix it? Not throw this exception.
   
   ### Anything else
   
   ## 问题分析
   - 异常调用栈,结合源代码,看着是dubbo框架引起。
   - 当时具体发生了什么,还不知情。
   - The abnormal call stack, combined with the source code, appears to be caused by the Dubbo framework.
   - I don't know exactly what happened at that time.
   
   ![dc64eb69-3c59-49cc-b262-28ef9e5c6f47](https://github.com/user-attachments/assets/137d40f4-174b-4af8-9a36-743e928467aa)
   
   ```log
     at org.apache.dubbo.remoting.exchange.support.DefaultFuture.<init>(DefaultFuture.java:99)
   ```
   ![4a794b97-2ccc-4d34-ad3c-8c7d67b513ed](https://github.com/user-attachments/assets/f85ac1cc-cb6b-427a-aa84-c28fd208a6ab)
   
   ![9868aae8-ef4d-43ca-80ad-0f89eb5fb6ee](https://github.com/user-attachments/assets/08ed3ffa-ec19-4b90-ab46-926a31fdff17)
   
   - 请求重试引起的RPC异步调用?
   - RPC asynchronous call caused by request retry?
   
   ```log
     at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:134)
   ```
   ```
   boolean isOneway = RpcUtils.isOneway(getUrl(), invocation);
   
   request.setTwoWay(true);
   ```
   ![48a84f4a-809d-449c-8e3e-ccedf76ceee0](https://github.com/user-attachments/assets/f29255f9-8910-4351-a730-983b7515e3c6)
   
   ```log
     at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:248)
   ```
   ![3c0db96b-9511-4263-933f-36e197aa298c](https://github.com/user-attachments/assets/80fca409-7754-4c8e-910b-5b46cc2a9270)
   
   ```log
     at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:191)
   ```
   ![52ea6f11-80ee-4b28-891b-9f5f730a0faf](https://github.com/user-attachments/assets/5fba4247-0de0-4d99-a71a-dfb09eb24eb2)
   
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "rf-guo (via GitHub)" <gi...@apache.org>.
rf-guo commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2357424685

   > > Does java.util.concurrent.* ever been transformed by skywalking-apm-agent?
   > > see [apache/skywalking#10207 (comment)](https://github.com/apache/skywalking/discussions/10207#discussioncomment-4502388) `The simple answer is you can't. java/util/concurrent/ThreadPoolExecutor should not be instrumented.`
   > 
   > Does java.util.concurrent.* ever been transformed by skywalking-apm-agent? Yes, we use `apm-jdk-threadpool-plugin-9.1.0.jar`
   > 
   > Okay, we can try. Thx!
   
   Hi, our encounter same issue, are you  has resolved?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2317797482

   > Have you configured any javaagent?
   
   skywalking.apm.agent
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2328502443

   > Does java.util.concurrent.* ever been transformed by skywalking-apm-agent?
   > 
   > see [apache/skywalking#10207 (comment)](https://github.com/apache/skywalking/discussions/10207#discussioncomment-4502388) `The simple answer is you can't. java/util/concurrent/ThreadPoolExecutor should not be instrumented.`
   
   Okay, we can try. Thx!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2345352414

   Other application encounter this issue, which occurs when the app has just finished start run ready for K8s Liveness Probe (存活探针). And the app doesn't recover until it restarts. @Chenjp @AlbumenJ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "Chenjp (via GitHub)" <gi...@apache.org>.
Chenjp commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2323611153

   Does java.util.concurrent.* ever been transformed by skywalking-apm-agent?
   
   see https://github.com/apache/skywalking/discussions/10207#discussioncomment-4502388
   ```The simple answer is you can't. java/util/concurrent/ThreadPoolExecutor should not be instrumented.```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2363703911

   > Hi, our encounter same issue, are you has resolved?
   
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 closed issue #14578: [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom"
URL: https://github.com/apache/dubbo/issues/14578


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2309604910

   Have you configured any javaagent?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 commented on issue #14578:
URL: https://github.com/apache/dubbo/issues/14578#issuecomment-2370927431

   > Hi, our encounter same issue, are you has resolved?
   
   @rf-guo  SkyWalking has resolved this issue, please see  apache/skywalking#12572


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom" [dubbo]

Posted by "bert82503 (via GitHub)" <gi...@apache.org>.
bert82503 closed issue #14578: [Bug] DefaultFuture throw "java.lang.ClassCircularityError: java/util/concurrent/ThreadLocalRandom"
URL: https://github.com/apache/dubbo/issues/14578


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org