You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by "Jialin Qiao (Jira)" <ji...@apache.org> on 2019/12/18 07:36:00 UTC

[jira] [Closed] (IOTDB-14) Concurrent Error of HashMap in StatMonitor class

     [ https://issues.apache.org/jira/browse/IOTDB-14?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jialin Qiao closed IOTDB-14.
----------------------------
    Resolution: Cannot Reproduce

> Concurrent Error of HashMap in StatMonitor class
> ------------------------------------------------
>
>                 Key: IOTDB-14
>                 URL: https://issues.apache.org/jira/browse/IOTDB-14
>             Project: Apache IoTDB
>          Issue Type: Bug
>            Reporter: xiangdong Huang
>            Assignee: Rui Liu
>            Priority: Major
>              Labels: need-to-check
>
> When running IoTDB UT, I found an exception:
> [INFO] Running org.apache.iotdb.db.monitor.MonitorTest
> WARN [2019-01-28 23:50:28,816] [main] org.apache.iotdb.db.conf.IoTDBDescriptor:60 - Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading config file iotdb-engine.properties, use default configuration
> INFO [2019-01-28 23:50:28,822] [main] org.apache.iotdb.db.conf.directories.Directories:66 - folder data/data/settled in tsfileFolders doesn't exist, create it
> WARN [2019-01-28 23:50:28,823] [main] org.apache.iotdb.tsfile.common.conf.TSFileDescriptor:88 - Failed to find config file tsfile-format.properties at classpath, use default configuration
> INFO [2019-01-28 23:50:28,834] [main] org.apache.iotdb.db.auth.user.BasicUserManager:76 - Admin initialized
> INFO [2019-01-28 23:50:28,836] [main] org.apache.iotdb.db.auth.user.BasicUserManager:76 - Admin initialized
> INFO [2019-01-28 23:50:28,838] [main] org.apache.iotdb.db.auth.authorizer.BasicAuthorizer:62 - Initialization of Authorizer completes
> INFO [2019-01-28 23:50:28,840] [main] org.apache.iotdb.db.auth.user.BasicUserManager:76 - Admin initialized
> INFO [2019-01-28 23:50:28,841] [main] org.apache.iotdb.db.auth.authorizer.BasicAuthorizer:62 - Initialization of Authorizer completes
> INFO [2019-01-28 23:50:28,844] [main] org.apache.iotdb.db.engine.filenode.FileNodeManager:113 - data/system/info dir home doesn't exist, create it
> INFO [2019-01-28 23:50:29,866] [pool-1-IoTDB-StatMonitor-ServerServiceImpl-thread-1] org.apache.iotdb.db.engine.filenode.FileNodeProcessor:221 - The data directory of the filenode processor root.stats doesn't exist. Create new directory data/system/info/root.stats
> INFO [2019-01-28 23:50:29,876] [pool-1-IoTDB-StatMonitor-ServerServiceImpl-thread-1] org.apache.iotdb.db.engine.filenode.FileNodeProcessor:498 - Allocate folder data/data/settled for the new bufferwrite processor.
> ERROR [2019-01-28 23:50:33,855] [pool-1-IoTDB-StatMonitor-ServerServiceImpl-thread-1] org.apache.iotdb.db.monitor.StatMonitor$statBackLoop:376 - Error occurred in Stat Monitor thread
> java.util.ConcurrentModificationException: null
>  at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
>  at java.util.HashMap$EntryIterator.next(HashMap.java:1471)
>  at java.util.HashMap$EntryIterator.next(HashMap.java:1469)
>  at org.apache.iotdb.db.monitor.StatMonitor.gatherStatistics(StatMonitor.java:264)
>  at org.apache.iotdb.db.monitor.StatMonitor$statBackLoop.run(StatMonitor.java:372)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>  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)
>  
> It is because when you traverse a HashMap, the elements changed, I think.
>  
> A strange thing is that org.apache.iotdb.db.monitor.MonitorTest passed... It is what we must fix, otherwise UT is meaningless.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)