question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Daemon crashing when building big project.

See original GitHub issue

I am currently trying to build a monolith with around 15 modules. With vanilla, Maven takes around 20 minutes. When I tried to build it with mvnd I am getting that somehow the daemon crashed:

13:03:16.035 I Dispatch message: KeepAlive
13:03:16.136 I Dispatch message: KeepAlive
13:03:16.236 I Dispatch message: KeepAlive
13:03:16.337 I Dispatch message: KeepAlive
13:03:16.438 I Dispatch message: KeepAlive
13:03:16.538 I Dispatch message: KeepAlive
13:03:16.639 I Dispatch message: KeepAlive
13:03:16.739 I Dispatch message: KeepAlive
----- End of the daemon log file -----
  output: C:\Users\fy95bn\.m2\mvnd\registry\0.2.0\daemon-f3678b8f-7dea-4fff-95c6-8e7915255fda.out.log
----- Last  200 lines from daemon output - C:\Users\fy95bn\.m2\mvnd\registry\0.2.0\daemon-f3678b8f-7dea-4fff-95c6-8e7915255fda.out.log -----

----- End of the daemon output -----

        at org.mvndaemon.mvnd.client.DaemonClientConnection.receive(DaemonClientConnection.java:125)
        at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:254)
        at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:98)
Caused by: java.io.IOException: No message received within 3000ms, daemon may have crashed. You may want to check its status using mvnd --status
        at org.mvndaemon.mvnd.client.DaemonClientConnection.receive(DaemonClientConnection.java:107)
        ... 2 more

But I guess the problem is indeed when trying to ping the daemon to see if alive, because, after it crashed with the error showed above, I can see the java process is still alive (maven building)

Checking C:\Users\fy95bn.m2\mvnd\registry\0.2.0\daemon-f3678b8f-7dea-4fff-95c6-8e7915255fda.out.log:

I can see the next:

13:03:20.203 I Dispatch message: KeepAlive
13:03:20.207 E Error dispatching events
org.mvndaemon.mvnd.common.DaemonException$RecoverableMessageIOException: Could not write message KeepAlive to '/127.0.0.1:50604'.
	at org.mvndaemon.mvnd.common.DaemonConnection.dispatch(DaemonConnection.java:116)
	at org.mvndaemon.mvnd.daemon.Server.lambda$handle$3(Server.java:468)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
	at sun.nio.ch.SocketDispatcher.write0(Native Method)
	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
	at sun.nio.ch.IOUtil.write(IOUtil.java:51)
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:469)
	at org.mvndaemon.mvnd.common.DaemonConnection$SocketOutputStream.writeWithNonBlockingRetry(DaemonConnection.java:275)
	at org.mvndaemon.mvnd.common.DaemonConnection$SocketOutputStream.writeBufferToChannel(DaemonConnection.java:263)
	at org.mvndaemon.mvnd.common.DaemonConnection$SocketOutputStream.flush(DaemonConnection.java:257)
	at java.io.DataOutputStream.flush(DataOutputStream.java:123)
	at org.mvndaemon.mvnd.common.DaemonConnection.dispatch(DaemonConnection.java:113)
	... 2 common frames omitted
13:03:26.011 D Expiration check running
13:03:26.014 D Storing daemon stop event: after the daemon was no longer found in the daemon registry
13:03:26.015 I Daemon will be stopped at the end of the build after the daemon was no longer found in the daemon registry
13:03:26.015 D Stop as soon as idle requested. The daemon is busy.
13:03:26.016 I Updating state to: StopRequested
13:03:26.016 D daemon stop has been requested. Sleeping until state changes.
13:03:36.012 D Expiration check running
13:03:46.011 D Expiration check running

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
gnodetcommented, Jan 1, 2022

Sorry to bump something so old but have we considered making the mvnd.maxHeapSize config default to null so that the JVM can decide the Xmx? This will bring it in line with vanilla Maven which leaves the heap size to the JVM unless an explicit -Xmx is passed?

It was a bit frustrating to discover that the daemon is crashing because it is low on memory especially since the observable failure is the lost keepalives instead of an OOM.

This is a possibility, could you open a new issue for that ?

0reactions
hashharcommented, Dec 31, 2021

Sorry to bump something so old but have we considered making the mvnd.maxHeapSize config default to null so that the JVM can decide the Xmx? This will bring it in line with vanilla Maven which leaves the heap size to the JVM unless an explicit -Xmx is passed?

It was a bit frustrating to discover that the daemon is crashing because it is low on memory especially since the observable failure is the lost keepalives instead of an OOM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Daemon crashing when building big project. #291 - GitHub
I am currently trying to build a monolith with around 15 modules. With vanilla, Maven takes around 20 minutes. When I tried to...
Read more >
Gradle daemon crashed when building with sonarqube
We've configured our project with Sonarqube on our yml file. Basically, we've encountered an issue with gradle daemon crash.
Read more >
Gradle build daemon disappeared unexpectedly (it may have ...
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) while building Android project on Jenkins - Stack Overflow....
Read more >
Troubleshooting build errors and crashes - Expo Documentation
When something goes wrong, it probably will go wrong in one of two ways: 1) your build will fail, or 2) the build...
Read more >
Diagnosing issues using crash reports and device logs
To debug a problem using a crash report: Build your app with symbol information and retain the Xcode archive before distributing the app....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found