Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon suddenly stopped working - BufferUnderflowException #645

Closed
eforx opened this issue May 10, 2022 · 7 comments
Closed

Daemon suddenly stopped working - BufferUnderflowException #645

eforx opened this issue May 10, 2022 · 7 comments
Labels
bug Something isn't working
Milestone

Comments

@eforx
Copy link

eforx commented May 10, 2022

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 (97c587c)
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)
@gnodet
Copy link
Contributor

gnodet commented May 10, 2022

The registry may have been corrupted somehow. Could you try deleting the ~/.m2/mvnd/registry directory and try again ?

@eforx
Copy link
Author

eforx commented May 10, 2022

Seems it helps. Thank you very much! Are you interested about corrupted registry.bin file for future investigation?

@gnodet
Copy link
Contributor

gnodet commented May 10, 2022

Sure, please attach it to this issue, I'll try to have a look.

@gnodet
Copy link
Contributor

gnodet commented May 10, 2022

@eforx also, you should have seen the warning printed at

LOGGER.warn("Invalid daemon registry info, " +
"trying to recover from this issue. " +
"If you keep getting this warning, " +
"try deleting the `registry.bin` file at [" + absPath + "]", e);
. Isn't that the case ? it should have hinted you at deleting the registry file.

@eforx
Copy link
Author

eforx commented May 10, 2022

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.

daemon-239b49e8.log
registry_corrupted.zip

@gnodet gnodet added the bug Something isn't working label May 13, 2022
@gnodet gnodet added this to the 0.8.1 milestone May 13, 2022
@tedchang77
Copy link

we've seen similar errors. has this been fixed and when will 0.8.1 be released?

@gnodet gnodet closed this as completed Aug 30, 2022
@gnodet
Copy link
Contributor

gnodet commented Aug 30, 2022

Fixed by e51416f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants