iotaledger / iri

IOTA Reference Implementation
Other
1.15k stars 370 forks source link

When running a node from a local snapshot that has an old DB an OOM occurs #1474

Open GalRogozinski opened 5 years ago

GalRogozinski commented 5 years ago

Bug description

An out of memory error appears when running a node from local snapshot files

IRI version

v1.7.1-RC

Hardware Spec

Hetzner CX51 8-core 32 GB ram -Xmx 4G

Steps To Reproduce

  1. Take a node that is out of sync
  2. Try to sync it by only copying local snapshot files
  3. Let it sync until an out of memory error appears

Expected behaviour

No errors

Actual behaviour

error

Errors

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid1.hprof ...
GalRogozinski commented 5 years ago

image

This is the analysis of the heap dump. We see that a Thread object is the one holding most of the object. I suspect that it is the anonymous Thread in LatestMilestoneTrackerImpl becuase it holds a set. So this is probably related to #1447

GalRogozinski commented 4 years ago

Related to #1391

GalRogozinski commented 4 years ago

Can be fixed by #1447