You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
none
RocketMQ version
4.9.x and 5.x
JDK Version
every
Describe the Bug
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:911)
at java.util.ArrayList$Itr.next(ArrayList.java:861)
at org.apache.rocketmq.acl.plain.PlainPermissionManager.validate(PlainPermissionManager.java:712)
at org.apache.rocketmq.acl.plain.PlainAccessValidator.validate(PlainAccessValidator.java:129)
at org.apache.rocketmq.broker.BrokerController$10.doBeforeRequest(BrokerController.java:636)
at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.doBeforeRpcHooks(NettyRemotingAbstract.java:171)
at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract$1.run(NettyRemotingAbstract.java:201)
at org.apache.rocketmq.remoting.netty.RequestTask.run(RequestTask.java:80)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
because acl monitor the change of acl file
this.globalWhiteRemoteAddressStrategy.addAll(globalWhiteRemoteAddressStrategy);
if (this.globalWhiteRemoteAddressStrategyMap.get(aclFilePath) != null) {
List<RemoteAddressStrategy> remoteAddressStrategyList = this.globalWhiteRemoteAddressStrategyMap.get(aclFilePath);
for (int i = 0; i < remoteAddressStrategyList.size(); i++) {
this.globalWhiteRemoteAddressStrategy.remove(remoteAddressStrategyList.get(i));
}
this.globalWhiteRemoteAddressStrategyMap.put(aclFilePath, globalWhiteRemoteAddressStrategy);
}
it will change globalWhiteRemoteAddressStrategy ,but
public void validate(PlainAccessResource plainAccessResource) {
// Check the global white remote addr
for (RemoteAddressStrategy remoteAddressStrategy : globalWhiteRemoteAddressStrategy) {
if (remoteAddressStrategy.match(plainAccessResource)) {
return;
}
}
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
none
RocketMQ version
4.9.x and 5.x
JDK Version
every
Describe the Bug
because acl monitor the change of acl file
it will change globalWhiteRemoteAddressStrategy ,but
so one thread read ,another write
Steps to Reproduce
review
What Did You Expect to See?
normal
What Did You See Instead?
ConcurrentModificationException
Additional Context
review