apache / apache/iotdb

内存溢出:java.lang.OutOfMemoryError: Java heap space

Open
#7,453 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

2022-09-21 07:14:31,538 [pool-32-IoTDB-Meta-Heartbeat-1] INFO o.a.i.c.s.h.HeartbeatThread:99 - Meta: The leader Node(internalIp:192.200.3.8, metaPort:9003, nodeIdentifier:-206822371, dataPort:40010, clientPort:6667, clientIp:192.200.3.8) timed out
2022-09-21 07:13:30,137 [pool-49-IoTDB-ClusterDataRPC-Client-140] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-49-IoTDB-ClusterDataRPC-Client-140-309
java.lang.OutOfMemoryError: Java heap space
at java.base/java.lang.Long.valueOf(Long.java:1180)
at org.apache.iotdb.db.engine.storagegroup.LastFlushTimeManager.getFlushedTime(LastFlushTimeManager.java:237)
at org.apache.iotdb.db.engine.storagegroup.VirtualStorageGroupProcessor.insert(VirtualStorageGroupProcessor.java:964)
at org.apache.iotdb.db.engine.StorageEngine.insert(StorageEngine.java:591)
at org.apache.iotdb.db.qp.executor.PlanExecutor.insert(PlanExecutor.java:1648)
at org.apache.iotdb.db.qp.executor.PlanExecutor.processNonQuery(PlanExecutor.java:276)
at org.apache.iotdb.cluster.log.applier.BaseApplier.processPlanWithTolerance(BaseApplier.java:203)
at org.apache.iotdb.cluster.log.applier.BaseApplier.applyPhysicalPlan(BaseApplier.java:76)
at org.apache.iotdb.cluster.log.applier.DataLogApplier.applyInsert(DataLogApplier.java:183)
at org.apache.iotdb.cluster.log.applier.DataLogApplier.applyPhysicalPlan(DataLogApplier.java:120)
at org.apache.iotdb.cluster.server.member.DataGroupMember.executeNonQueryPlan(DataGroupMember.java:720)
at org.apache.iotdb.cluster.server.member.RaftMember.executeNonQueryPlan(RaftMember.java:722)
at org.apache.iotdb.cluster.server.service.BaseSyncService.executeNonQueryPlan(BaseSyncService.java:176)
at org.apache.iotdb.cluster.server.service.DataGroupServiceImpls.executeNonQueryPlan(DataGroupServiceImpls.java:687)
at org.apache.iotdb.cluster.rpc.thrift.RaftService$Processor$executeNonQueryPlan.getResult(RaftService.java:918)
at org.apache.iotdb.cluster.rpc.thrift.RaftService$Processor$executeNonQueryPlan.getResult(RaftService.java:898)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
2022-09-21 07:14:38,348 [pool-6-IoTDB-timedQuerySqlCount-1] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-6-IoTDB-timedQuerySqlCount-1-18
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:15:21,542 [pool-32-IoTDB-Meta-Heartbeat-1] INFO o.a.i.c.s.m.RaftMember:615 - Meta has become a ELECTOR
2022-09-21 07:14:32,490 [pool-37-IoTDB-ClusterMetaHeartbeatRPC-Client-4] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-37-IoTDB-ClusterMetaHeartbeatRPC-Client-4-348
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:14:30,583 [pool-49-IoTDB-ClusterDataRPC-Client-231] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-49-IoTDB-ClusterDataRPC-Client-231-408
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:13:17,777 [pool-49-IoTDB-ClusterDataRPC-Client-161] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-49-IoTDB-ClusterDataRPC-Client-161-331
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:14:33,444 [pool-19-IoTDB-WAL-Trim-root.DLGL-0-1] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-19-IoTDB-WAL-Trim-root.DLGL-0-1-37
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:13:22,548 [pool-23-IoTDB-WAL-Trim-root.YMCS-0-1] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-23-IoTDB-WAL-Trim-root.YMCS-0-1-41
java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1896)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2114)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
at java.base/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
2022-09-21 07:16:15,223 [pool-37-IoTDB-ClusterMetaHeartbeatRPC-Client-8] INFO o.a.i.c.s.m.RaftMember:615 - Meta has become a FOLLOWER
2022-09-21 07:16:14,274 [pool-32-IoTDB-Meta-Heartbeat-1] INFO o.a.i.c.s.m.RaftMember:635 - Meta has been set to null in term 115611
2022-09-21 07:15:17,729 [pool-19-IoTDB-WAL-Trim-root.DLGL-0-2] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-19-IoTDB-WAL-Trim-root.DLGL-0-2-597
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:15:16,772 [pool-49-IoTDB-ClusterDataRPC-Client-121] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-49-IoTDB-ClusterDataRPC-Client-121-290
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:15:18,682 [ClusterDataRPC] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread ClusterDataRPC-166
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:15:16,773 [pool-47-IoTDB-PullSnapshotHint-1] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-47-IoTDB-PullSnapshotHint-1-73
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:14:39,336 [pool-27-IoTDB-WAL-Trim-root.GML-0-1] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-27-IoTDB-WAL-Trim-root.GML-0-1-48
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:16:29,505 [pool-32-IoTDB-Meta-Heartbeat-1] INFO o.a.i.c.s.h.HeartbeatThread:137 - Meta: Start elections
2022-09-21 07:15:17,729 [persist-log-delete-/data/iotdb/system/raftLog/0/] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread persist-log-delete-/data/iotdb/system/raftLog/0/-15
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:14:40,322 [pool-49-IoTDB-ClusterDataRPC-Client-166] ERROR o.a.i.d.c.IoTDBDefaultThreadExceptionHandler:31 - Exception in thread pool-49-IoTDB-ClusterDataRPC-Client-166-337
java.lang.OutOfMemoryError: Java heap space
2022-09-21 07:16:46,046 [pool-32-IoTDB-Meta-Heartbeat-1] INFO o.a.i.c.s.h.HeartbeatThread:141 - Meta: End elections
2022-09-21 07:16:42,121 [pool-37-IoTDB-ClusterMetaHeartbeatRPC-Client-8] INFO o.a.i.c.s.m.RaftMember:637 - Meta has become a follower of Node(internalIp:192.200.3.8, metaPort:9003, nodeIdentifier:-206822371, dataPort:40010, clientPort:6667, clientIp:192.200.3.8) in term 115611

**Desktop (please complete the following information):**
- OS: centOS7.9
- JDK:1.8
- Version 0.12=3

Contributor guide

Open the contributing guide

Research direction

Start at LastFlushTimeManager.getFlushedTime (line 237) and follow the insert path through VirtualStorageGroupProcessor, StorageEngine, and the cluster applier classes named in the stack trace. Compare the heap failures across cluster RPC, WAL, heartbeat, and timed-query threads to establish a reproducible cause. Done means identifying the source of heap growth and validating a fix with a regression test or documented reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.