You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "XiaoHDZXF (via GitHub)" <gi...@apache.org> on 2025/11/27 13:00:10 UTC

[I] [Bug] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

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

   ### 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
   
   Spring Boot 3.4.8, Duoob java 3.3.5 , OpenJDK 17 
   
   ### Steps to reproduce this issue
   
   An intermittent/sporadic issue occurs during startup when integrating Dubbo with Spring Boot project. The problem happens occasionally and is not consistently reproducible.
   
   The error log is shown below:
   
   org.apache.dubbo.config.deploy.DefaultModuleDeployer:139 - traceId:[]  [DUBBO] Failed to async export service config: Dubbo Module[1.0.1] , catch error : Index 1 out of bounds for length 0, dubbo version: 3.3.5, current host: 10.20.24.86, error code: 5-9. This may be caused by , go to https://dubbo.apache.org/faq/5/9 to find instructions. 
   java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0
   	at java.base/java.util.ArrayList.add(ArrayList.java:455)
   	at java.base/java.util.ArrayList.add(ArrayList.java:467)
   	at org.apache.dubbo.registry.integration.RegistryDirectory$ConsumerConfigurationListener.addNotifyListener(RegistryDirectory.java:837)
   	at org.apache.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:159)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:666)
   	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getInvoker(InterfaceCompatibleRegistryProtocol.java:58)
   	at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshInterfaceInvoker(MigrationInvoker.java:482)
   	at org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToApplicationFirstInvoker(MigrationInvoker.java:255)
   	at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.refreshInvoker(MigrationRuleHandler.java:90)
   	at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:71)
   	at org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:285)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:629)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:593)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:574)
   	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:83)
   	at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.refer(ProtocolSecurityWrapper.java:112)
   	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:85)
   	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:72)
   	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:55)
   	at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.refer(InvokerCountWrapper.java:48)
   	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
   	at org.apache.dubbo.config.ReferenceConfig.createInvoker(ReferenceConfig.java:672)
   	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:502)
   	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:383)
   	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:244)
   	at org.apache.dubbo.config.utils.SimpleReferenceCache.get(SimpleReferenceCache.java:140)
   	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.lambda$referServices$5(DefaultModuleDeployer.java:552)
   	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   
   
   ### What you expected to happen
   
   The application should start successfully with all Dubbo services registered properly
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] 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] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

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

   I noticed that in the current 3.3 branch, the listeners list in RegistryDirectory.java is already using CopyOnWriteArrayList. However, I checked the source code for version 3.3.5 and it still seems to be using ArrayList.
   
   <img width="998" height="533" alt="Image" src="https://github.com/user-attachments/assets/8530246c-e230-44ee-b2c4-50d6acca0174" />
   
   <img width="924" height="426" alt="Image" src="https://github.com/user-attachments/assets/465ea6b5-057f-4820-b206-dfd3c9cb3f88" />


-- 
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] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

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

   > I noticed that in the current 3.3 branch, the listeners list in RegistryDirectory.java is already using CopyOnWriteArrayList. However, I checked the source code for version 3.3.5 and it still seems to be using ArrayList.
   
   The 3.3.6 release code still uses ArrayList rather than the fixed CopyOnWriteArrayList, so the issue still persists.


-- 
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] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

Posted by "RainYuY (via GitHub)" <gi...@apache.org>.
RainYuY closed issue #15807: [Bug] Dubbo application occasionally encounters concurrency errors after startup completion
URL: https://github.com/apache/dubbo/issues/15807


-- 
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] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

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

   This has been fixed recently. Please check out and use the latest code.
   


-- 
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] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

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

   > > I noticed that in the current 3.3 branch, the listeners list in RegistryDirectory.java is already using CopyOnWriteArrayList. However, I checked the source code for version 3.3.5 and it still seems to be using ArrayList.
   > 
   > The 3.3.6 release code still uses ArrayList rather than the fixed CopyOnWriteArrayList, so the issue still persists.
   
   This fix is currently in the development branch, so we may release it in a future version. If you need to use it urgently, you can build and deploy a package from this repository for your own use.


-- 
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] Dubbo application occasionally encounters concurrency errors after startup completion [dubbo]

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

   > This has been fixed recently. Please check out and use the latest code.
   
   Current runtime environment: Spring Boot 3.4.8, Dubbo Java 3.3.5, OpenJDK 17.
   We’ve already upgraded Dubbo to 3.3.6, but the issue still occurs. After checking the source code in the 3.3.6 JAR from Jira, it still uses ArrayList and hasn’t changed.
   
   <img width="1477" height="1035" alt="Image" src="https://github.com/user-attachments/assets/5a5d1e83-9b8c-4942-84cb-20afc175e695" />
   
   


-- 
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