maven-mvnd
maven-mvnd copied to clipboard
Daemon suddenly stopped working - BufferUnderflowException
After few weeks of using this excellent utility, it suddenly stopped working. Reinstallation did not help.
$ java -version java version "1.8.0_311" Java(TM) SE Runtime Environment (build 1.8.0_311-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
$ mvnd --version mvnd native client 0.7.1-windows-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal
Exception in thread "main" java.nio.BufferUnderflowException
at java.nio.ByteBuffer.get(ByteBuffer.java:798)
at java.nio.ByteBuffer.get(ByteBuffer.java:826)
at org.mvndaemon.mvnd.common.DaemonRegistry.readString(DaemonRegistry.java:303)
at org.mvndaemon.mvnd.common.DaemonRegistry.doUpdate(DaemonRegistry.java:213)
at org.mvndaemon.mvnd.common.DaemonRegistry.read(DaemonRegistry.java:164)
at org.mvndaemon.mvnd.common.DaemonRegistry.getAll(DaemonRegistry.java:102)
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:101)
at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:272)
at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:118)
The registry may have been corrupted somehow. Could you try deleting the ~/.m2/mvnd/registry directory and try again ?
Seems it helps. Thank you very much! Are you interested about corrupted registry.bin file for future investigation?
Sure, please attach it to this issue, I'll try to have a look.
@eforx also, you should have seen the warning printed at https://github.com/apache/maven-mvnd/blob/4cea5d30785dbac160b1e140f612e8b99d8dbd04/common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java#L252-L255. Isn't that the case ? it should have hinted you at deleting the registry file.
The log does not contain mentioned phrase (I attached last log from yesterday also). It also looks like, the daemon stopped creating logs after computer restart (after registry corruption) - no more logs from today, till I removed ~/.m2/mvnd/registry directory.
we've seen similar errors. has this been fixed and when will 0.8.1 be released?
Fixed by https://github.com/apache/maven-mvnd/commit/e51416f7f2f6d95add36c06090ff9b5aaa2a705a