You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/17 03:33:10 UTC
[GitHub] [shardingsphere] wsm12138 opened a new issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
wsm12138 opened a new issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514
## Bug Report
Hi community,
### Which version of ShardingSphere did you use?
master
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
### Actual behavior
```
[ERROR] 2021-09-16 19:29:24.000 [ShardingSphere-Command-9] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.util.ConcurrentModificationException: null
at java.util.HashMap.forEach(HashMap.java:1292)
at org.apache.shardingsphere.singletable.rule.SingleTableRule.getAllDataNodes(SingleTableRule.java:122)
at org.apache.shardingsphere.infra.datanode.DataNodes.isDataNodeContainedRuleContainsTable(DataNodes.java:69)
at org.apache.shardingsphere.infra.datanode.DataNodes.lambda$getDataNodes$0(DataNodes.java:51)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.LinkedList$LLSpliterator.tryAdvance(LinkedList.java:1249)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
at org.apache.shardingsphere.infra.datanode.DataNodes.getDataNodes(DataNodes.java:51)
at org.apache.shardingsphere.infra.metadata.schema.builder.util.TableMetaDataUtil.getTableMetaDataLoadMaterial(TableMetaDataUtil.java:55)
at org.apache.shardingsphere.singletable.metadata.SingleTableMetaDataBuilder.load(SingleTableMetaDataBuilder.java:51)
at org.apache.shardingsphere.singletable.metadata.SingleTableMetaDataBuilder.load(SingleTableMetaDataBuilder.java:42)
at org.apache.shardingsphere.infra.metadata.schema.builder.TableMetaDataBuilder.load(TableMetaDataBuilder.java:79)
at org.apache.shardingsphere.infra.metadata.schema.builder.TableMetaDataBuilder.build(TableMetaDataBuilder.java:58)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:47)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:36)
at org.apache.shardingsphere.infra.context.refresher.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:77)
at org.apache.shardingsphere.infra.context.refresher.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:64)
at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.refreshMetadata(ProxyLockEngine.java:110)
at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.doExecute(ProxyLockEngine.java:104)
at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.execute(ProxyLockEngine.java:81)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:126)
at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:99)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72)
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:748)
Thanks for using Atomikos! Evaluate http://www.atomikos.com/Main/ExtremeTransactions for advanced features and professional support
or register at http://www.atomikos.com/Main/RegisterYourDownload to disable this message and receive FREE tips & advice
[INFO ] 2021-09-16 19:35:38.765 [main] o.a.s.p.i.BootstrapInitializer - Database name is `MySQL`, version is `8.0.25`
[INFO ] 2021-09-16 19:35:38.988 [main] o.a.s.p.frontend.ShardingSphereProxy - ShardingSphere-Proxy start success
```
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
server.yaml
```
rules:
- !AUTHORITY
users:
- root@%:root
- sharding@:sharding
provider:
type: ALL_PRIVILEGES_PERMITTED
#scaling:
# blockQueueSize: 10000
# workerThread: 40
props:
max-connections-size-per-query: 1
executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
# LOCAL: Proxy will run with LOCAL transaction.
# XA: Proxy will run with XA transaction.
# BASE: Proxy will run with B.A.S.E transaction.
proxy-transaction-type: LOCAL
xa-transaction-manager-type: Atomikos
proxy-opentracing-enabled: false
proxy-hint-enabled: false
sql-show: false
check-table-metadata-enabled: false
lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
# Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
# The default value is -1, which means set the minimum value for different JDBC drivers.
proxy-backend-query-fetch-size: -1
```
config-readwrite-splitting.yaml
```
schemaName: sbtest
dataSources:
write_ds:
url: jdbc:mysql://ip:port/sbtest?serverTimezone=UTC&useSSL=false
username: root
password: password
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 2000
minPoolSize: 1
read_ds_0:
url: jdbc:mysql://ip:port/sbtest?serverTimezone=UTC&useSSL=false
username: root
password: password
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 2000
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
pr_ds:
writeDataSourceName: write_ds
readDataSourceNames:
- read_ds_0
```
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN closed issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wsm12138 commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-971207300
Is this the same type of error reporting ?
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-921431255
Hi @wsm12138, thank you for your feedback. Is this a reproducible problem? I tried the master branch and there was no exception.
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wsm12138 commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-971206922
[ERROR] 2021-11-17 13:32:33.382 [epollEventLoopGroup-3-47] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.util.ConcurrentModificationException: null
at java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2908)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at org.apache.shardingsphere.singletable.rule.SingleTableRule.getAllDataNodes(SingleTableRule.java:144)
at org.apache.shardingsphere.infra.datanode.DataNodes.getDataNodes(DataNodes.java:55)
at org.apache.shardingsphere.infra.metadata.schema.builder.util.TableMetaDataUtil.addOneActualTableDataNode(TableMetaDataUtil.java:62)
at org.apache.shardingsphere.infra.metadata.schema.builder.util.TableMetaDataUtil.getTableMetaDataLoadMaterial(TableMetaDataUtil.java:55)
at org.apache.shardingsphere.singletable.metadata.SingleTableMetaDataBuilder.load(SingleTableMetaDataBuilder.java:51)
at org.apache.shardingsphere.singletable.metadata.SingleTableMetaDataBuilder.load(SingleTableMetaDataBuilder.java:42)
at org.apache.shardingsphere.infra.metadata.schema.builder.TableMetaDataBuilder.load(TableMetaDataBuilder.java:65)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:49)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:38)
at org.apache.shardingsphere.infra.context.refresher.MetaDataRefreshEngine.refresh(MetaDataRefreshEngine.java:88)
at org.apache.shardingsphere.infra.context.refresher.MetaDataRefreshEngine.refresh(MetaDataRefreshEngine.java:75)
at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.refreshMetaData(ProxyLockEngine.java:110)
at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.doExecute(ProxyLockEngine.java:104)
at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.execute(ProxyLockEngine.java:81)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:126)
at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:61)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:99)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run$original$8t4JXPpQ(CommandExecutorTask.java:72)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run$original$8t4JXPpQ$accessor$2pAyI647(CommandExecutorTask.java)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask$auxiliary$wxUg6ojA.call(Unknown Source)
at org.apache.shardingsphere.agent.core.plugin.interceptor.InstanceMethodAroundInterceptor.intercept(InstanceMethodAroundInterceptor.java:75)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-995486976
I think this issue has been fixed by #13686.
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-921682172
@strongduanmu 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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-943114647
I have replaced the original `foreach put` logic with `stream api`. @wam12138 Can you help to see if this problem still exists?
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-921677032
I think it's modCount not equal to mc in Map when operating the list. I suggest adjusting this block to iterator or stream
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wsm12138 commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-921429060
Although produced the error, the proxy can use normal
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wsm12138 commented on issue #12514: On September 16 version master proxy startup log an error "Java. Util. ConcurrentModificationException: null "
Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514#issuecomment-921615312
Thanks for your reply. I restarted the proxy without changing the configuration, but this problem did not occur again. Maybe this problem is triggered with a certain probability.
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org