alephium icon indicating copy to clipboard operation
alephium copied to clipboard

Debian 11 - make assembly - [error] [launcher] error during sbt launcher: java.lang.OutOfMemoryError: Java heap space

Open blackmennewstyle opened this issue 2 years ago • 2 comments

I'm trying to build from sources on Debian 11 and i am stuck with that error:

sbt assembly
[info] welcome to sbt 1.6.2 (Debian Java 11.0.18)
[info] loading settings for project alephium-2-3-5-build from plugins.sbt ...
[info] loading project definition from /home/ceedii/alephium-2.3.5/project
[info] loading settings for project alephium-scala-blockflow from build.sbt ...
[info] resolving key references (23211 settings) ...
[info] set current project to alephium (in build file:/home/ceedii/alephium-2.3.5/)
[info] 2 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 1 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 2 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] 2 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 7 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] Built: /home/ceedii/alephium-2.3.5/target/scala-2.13/alephium-assembly-HEAD+20230722-0155.jar
[info] Jar hash: 7f2b5ea758f6c203c3dd301c99d1a32a60beb51b
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 13 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] Built: /home/ceedii/alephium-2.3.5/macros/target/scala-2.13/alephium-macros-assembly-HEAD+20230722-0155.jar
[info] Jar hash: c229f53da55656e70a647d9c15e3c0c273d3de3e
[info] Built: /home/ceedii/alephium-2.3.5/json/target/scala-2.13/alephium-json-assembly-HEAD+20230722-0155.jar
[info] Jar hash: af3b56b9a6bd2a975eb4579f301e1a4b4df01dbb
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 13 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 19 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] compiling 1 Scala source to /home/ceedii/alephium-2.3.5/protocol/target/scala-2.13/classes ...
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 13 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] Built: /home/ceedii/alephium-2.3.5/util/target/scala-2.13/alephium-util-assembly-HEAD+20230722-0155.jar
[info] Jar hash: dd1bbe85c54499768c08541c256849fdd3babe58
[info] Built: /home/ceedii/alephium-2.3.5/serde/target/scala-2.13/alephium-serde-assembly-HEAD+20230722-0155.jar
[info] Jar hash: 16b3c5938d2d461ed8beae96bee4feca12bdb7f4
[info] Built: /home/ceedii/alephium-2.3.5/rpc/target/scala-2.13/alephium-rpc-assembly-HEAD+20230722-0155.jar
[info] Jar hash: a179869a51f60ba59615b579afeffab17ea024be
[info] Built: /home/ceedii/alephium-2.3.5/crypto/target/scala-2.13/alephium-crypto-assembly-HEAD+20230722-0155.jar
[info] Jar hash: a861e03bbe8d988a03e9fc5e47ce745ed53c0b41
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 14 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[info] compiling 91 Scala sources to /home/ceedii/alephium-2.3.5/api/target/scala-2.13/classes ...
[16.750s][warning][gc,alloc] scala-execution-context-global-49: Retried waiting for GCLocker too often allocating 4194306 words
[16.778s][warning][gc,alloc] scala-execution-context-global-66: Retried waiting for GCLocker too often allocating 4194306 words
[18.665s][warning][gc,alloc] scala-execution-context-global-65: Retried waiting for GCLocker too often allocating 8388610 words
[18.795s][warning][gc,alloc] scala-execution-context-global-60: Retried waiting for GCLocker too often allocating 8388610 words
[19.058s][warning][gc,alloc] scala-execution-context-global-66: Retried waiting for GCLocker too often allocating 8388610 words
[info] 4 file(s) merged using strategy 'Rename' (Run the task at debug level to see the details)
[info] 29 file(s) merged using strategy 'Discard' (Run the task at debug level to see the details)
[20.762s][warning][gc,alloc] scala-execution-context-global-39: Retried waiting for GCLocker too often allocating 8388610 words
java.lang.OutOfMemoryError: Java heap space
	at scala.collection.mutable.ResizableArray.ensureSize(ResizableArray.scala:106)
	at scala.collection.mutable.ResizableArray.ensureSize$(ResizableArray.scala:96)
	at scala.collection.mutable.ArrayBuffer.ensureSize(ArrayBuffer.scala:49)
	at scala.collection.mutable.ArrayBuffer.$plus$eq(ArrayBuffer.scala:85)
	at scala.collection.mutable.ArrayBuffer.$plus$eq(ArrayBuffer.scala:49)
	at scala.collection.generic.Growable.$anonfun$$plus$plus$eq$1(Growable.scala:62)
	at scala.collection.generic.Growable$$Lambda$123/0x0000000800214040.apply(Unknown Source)
	at scala.collection.Iterator.foreach(Iterator.scala:943)
	at scala.collection.Iterator.foreach$(Iterator.scala:943)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
	at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
	at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
	at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:105)
	at scala.reflect.io.Streamable$Bytes.toByteArray(Streamable.scala:59)
	at scala.reflect.io.Streamable$Bytes.toByteArray$(Streamable.scala:56)
	at scala.reflect.io.Streamable$$anon$1.toByteArray(Streamable.scala:137)
	at scala.reflect.io.Streamable$.bytes(Streamable.scala:137)
	at sbtassembly.MergeStrategy$.$anonfun$deduplicate$3(MergeStrategy.scala:125)
	at sbtassembly.MergeStrategy$$$Lambda$6709/0x0000000801a7b840.apply(Unknown Source)
	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
	at scala.collection.TraversableLike$$Lambda$143/0x0000000800287840.apply(Unknown Source)
	at scala.collection.Iterator.foreach(Iterator.scala:943)
	at scala.collection.Iterator.foreach$(Iterator.scala:943)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
	at scala.collection.TraversableLike.map(TraversableLike.scala:286)
	at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
	at scala.collection.AbstractTraversable.map(Traversable.scala:108)
	at sbtassembly.MergeStrategy$.$anonfun$deduplicate$1(MergeStrategy.scala:125)
	at sbtassembly.MergeStrategy$$$Lambda$4067/0x000000080122d040.apply(Unknown Source)
[error] [launcher] error during sbt launcher: java.lang.OutOfMemoryError: Java heap space
[20.842s][warning][gc,alloc] scala-execution-context-global-43: Retried waiting for GCLocker too often allocating 8388610 words
[20.884s][warning][gc,alloc] scala-execution-context-global-47: Retried waiting for GCLocker too often allocating 8388610 words
[20.990s][warning][gc,alloc] scala-execution-context-global-45: Retried waiting for GCLocker too often allocating 8388610 words

blackmennewstyle avatar Jul 22 '23 02:07 blackmennewstyle

@blackmennewstyle It requires 4GB memory to compile now. I just added a commit to set the default maximal memory to 4GB. It should solve your problem.

polarker avatar Jul 22 '23 10:07 polarker

@blackmennewstyle It requires 4GB memory to compile now. I just added a commit to set the default maximal memory to 4GB. It should solve your problem.

Thank you. I managed to compile 2.4.0 but when i launch it, i have that error:

java -jar /home/ceedii/alephium_core/alephium-2.4.0.jar
2023-07-29 10:52:48,232 [main]          INFO  o.a.f.s.Configs$                       - Using user configuration file at /home/ceedii/.alephium/user.conf 

2023-07-29 10:52:48,263 [main]          INFO  o.a.f.s.Configs$                       - Using system configuration file at /home/ceedii/.alephium/testnet/system.conf 

2023-07-29 10:52:48,273 [main]          INFO  o.a.f.s.Configs$                       - Using network configuration file at /home/ceedii/.alephium/testnet/network.conf 

2023-07-29 10:52:57,886 [-dispatcher-5] INFO  a.e.s.Slf4jLogger                      - Slf4jLogger started
2023-07-29 10:52:58,532 [main]          INFO  o.a.f.c.BlockFlow$                     - Load BlockFlow from storage: #3567149 blocks/headers
2023-07-29 10:52:58,789 [dispatcher-13] INFO  o.a.f.n.CliqueManager                  - Start intra and inter clique managers, cliqueId: 03d9a083cfa4d245e2b62bbc4aaf71c72ff112c873d7ac2e3dc827e3bf1e26da2d
2023-07-29 10:52:58,792 [dispatcher-22] INFO  o.a.f.n.TcpController                  - Node bound to /0:0:0:0:0:0:0:0:9973
2023-07-29 10:52:58,793 [dispatcher-22] INFO  o.a.f.n.CliqueManager                  - Intra clique manager is ready
2023-07-29 10:52:58,806 [dispatcher-15] INFO  o.a.f.n.DiscoveryServer                - UDP server bound to /0.0.0.0:9973
2023-07-29 10:52:58,820 [main]          INFO  o.a.app.BootUp                         - Build info: name: alephium-app, scalaVersion: 2.13.10, sbtVersion: 1.6.2, commitId: missing-git-commit, branch: , releaseVersion: HEAD+20230729-1048
2023-07-29 10:52:58,822 [main]          INFO  o.a.app.BootUp                         - Genesis digests: 88e72240-f9d22f41-a55a2ac2-1284af43-9019ffb4-746e2e55-a7ce72b6-28dc3897-05e623b8-5ce78379-f505b89a-9c277d3b-11591e8c-5dcec0fd-8004ddfe-48afc92f
2023-07-29 10:52:58,822 [main]          INFO  o.a.app.Server$Impl                    - Starting service: Server

2023-07-29 10:52:59,821 [dispatcher-22] INFO  o.a.f.n.DiscoveryServer                - Initial P2P discovery is done: #3 neighbors
2023-07-29 10:52:59,823 [dispatcher-22] INFO  o.a.f.n.InterCliqueManager             - Try to connect to BrokerInfo(CliqueId(hex"03dc5965c65dab1cb3a9057bfb0fc839be77ff98b25d95eadf8681cbbcb95dd5c5"),0,1,/3.72.40.126:9973)
2023-07-29 10:52:59,828 [-dispatcher-5] INFO  o.a.f.n.InterCliqueManager             - Try to connect to BrokerInfo(CliqueId(hex"021a41d10691a07248185407ee0def215057e597e50949a616610f2df3c6cc76b4"),0,1,/3.252.165.200:9973)
2023-07-29 10:52:59,828 [-dispatcher-5] INFO  o.a.f.n.InterCliqueManager             - Try to connect to BrokerInfo(CliqueId(hex"035a43dcab403275e62f7af2a02bc65576aa3bf350d97b9a626eaca8b366e98297"),0,1,/3.67.137.68:9973)
2023-07-29 10:53:00,005 [dispatcher-15] INFO  o.a.f.n.i.OutboundBrokerHandler        - Connected to /3.67.137.68:9973
Uncaught error from thread [flow-akka.actor.default-dispatcher-20]: null, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[flow]
java.lang.ExceptionInInitializerError
	at org.alephium.protocol.message.HandShakeSerding.unsafe(Payload.scala:192)
	at org.alephium.protocol.message.HandShakeSerding.unsafe$(Payload.scala:190)
	at org.alephium.protocol.message.Hello$.unsafe(Payload.scala:246)
	at org.alephium.flow.network.broker.OutboundBrokerHandler.handShakeMessage(OutboundBrokerHandler.scala:83)
	at org.alephium.flow.network.broker.OutboundBrokerHandler.handShakeMessage$(OutboundBrokerHandler.scala:82)
	at org.alephium.flow.network.interclique.OutboundBrokerHandler.handShakeMessage(OutboundBrokerHandler.scala:56)
	at org.alephium.flow.network.broker.BrokerHandler.handShaking(BrokerHandler.scala:93)
	at org.alephium.flow.network.broker.BrokerHandler.handShaking$(BrokerHandler.scala:92)
	at org.alephium.flow.network.interclique.OutboundBrokerHandler.handShaking(OutboundBrokerHandler.scala:56)
	at org.alephium.flow.network.broker.OutboundBrokerHandler$$anonfun$1.applyOrElse(OutboundBrokerHandler.scala:66)
	at akka.actor.Actor.aroundReceive(Actor.scala:537)
	at akka.actor.Actor.aroundReceive$(Actor.scala:535)
	at org.alephium.flow.network.interclique.OutboundBrokerHandler.aroundReceive(OutboundBrokerHandler.scala:56)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
	at akka.actor.ActorCell.invoke(ActorCell.scala:547)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
	at akka.dispatch.Mailbox.run(Mailbox.scala:231)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.RuntimeException: Invalid release version: HEAD+20230729-1048
	at org.alephium.protocol.model.ReleaseVersion$.$anonfun$current$1(ReleaseVersion.scala:41)
	at scala.Option.getOrElse(Option.scala:201)
	at org.alephium.protocol.model.ReleaseVersion$.<clinit>(ReleaseVersion.scala:40)
	... 23 more

blackmennewstyle avatar Jul 29 '23 10:07 blackmennewstyle