You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
We occasionally got a bad string size exception in our ci system showing below
Exception in thread "main" java.lang.IllegalStateException: Bad string size: 29801
at org.mvndaemon.mvnd.common.DaemonRegistry.readString(DaemonRegistry.java:274)
at org.mvndaemon.mvnd.common.DaemonRegistry.doUpdate(DaemonRegistry.java:204)
at org.mvndaemon.mvnd.common.DaemonRegistry.read(DaemonRegistry.java:159)
at org.mvndaemon.mvnd.common.DaemonRegistry.getAll(DaemonRegistry.java:101)
at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:97)
at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:233)
at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:98)
In my situation, data keeps correct until reading the missing short bytes, which is the length of reason field, and then crashes. It may still work if the next short bytes is less than 1024 (but the DaemonStopEvent data breaks down since then)
what's worse, all later builds on the same ci machine will crash due to readString exception, until we delete the registry.bin file.
It happens in mvnd 0.4.1, but I think we still suffers in 0.5.1.
The problem registry.bin is in attach file below (I masked some working path info due to sensitive security policy), be sure using 0.4.1 to debug with it (token field add in 0.5.0) registry.bin.zip
one guess is that mvnd crashed unexpectedly while FileChannel is flushing the file, so it closed and remains incomplete data in registry.bin.
The text was updated successfully, but these errors were encountered:
…pache#433
Fix a possible write a long string in case where the string length is <= 1024 but the encoded size if > 1024.
Truncate long strings and warn instead of throwing an exception which could lead to an invalid registry.
Since the registry data is invalid, the content is emptied to guarantee the next registry will work correct.
This fix is based on apache#435 provided by lanmaoxinqing, many thanks !
gnodet
pushed a commit
to gnodet/mvnd
that referenced
this issue
Jun 18, 2021
…pache#433
Fix a possible write a long string in case where the string length is <= 1024 but the encoded size if > 1024.
Truncate long strings and warn instead of throwing an exception which could lead to an invalid registry.
Since the registry data is invalid, the content is emptied to guarantee the next registry will work correct.
This fix is based on apache#435 provided by @lanmaoxinqing, many thanks !
Hi,
We occasionally got a
bad string size
exception in our ci system showing belowIn my situation, data keeps correct until reading the missing
short
bytes, which is the length ofreason
field, and then crashes. It may still work if the nextshort bytes
is less than 1024 (but theDaemonStopEvent
data breaks down since then)what's worse, all later builds on the same ci machine will crash due to
readString
exception, until we delete theregistry.bin
file.It happens in mvnd 0.4.1, but I think we still suffers in 0.5.1.
The problem
registry.bin
is in attach file below (I masked some working path info due to sensitive security policy), be sure using 0.4.1 to debug with it (token field add in 0.5.0)registry.bin.zip
one guess is that mvnd crashed unexpectedly while
FileChannel
is flushing the file, so it closed and remains incomplete data inregistry.bin
.The text was updated successfully, but these errors were encountered: