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
I have a jenkins job that has a very large output log: 2,782,890 KB in size.
When I try to download it I get this exception:
java.lang.ArithmeticException: The byte count 2846143684 is too large to be converted to an int
at org.apache.commons.io.output.CountingOutputStream.getCount(CountingOutputStream.java:71)
at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:237)
at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:154)
at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:194)
at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:145)
at io.jenkins.blueocean.service.embedded.rest.LogResource.writeLogs(LogResource.java:75)
at io.jenkins.blueocean.service.embedded.rest.LogResource.writeLog(LogResource.java:51)
at io.jenkins.blueocean.service.embedded.rest.LogResource.doIndex(LogResource.java:37)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
Caused: javax.servlet.ServletException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:765)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
..
Looking at CountingOutputStream there is a getByteCount() method that returns a long. But LargeText is calling getCount() which does a length check, and throws this exception, before casting to an int.
LargeText.writeLogTo() returns a long, so it should be calling getByteCount() and dealing with longs, and thus allow large log files to be downloaded without this exception.
The text was updated successfully, but these errors were encountered:
I have a jenkins job that has a very large output log: 2,782,890 KB in size.
When I try to download it I get this exception:
Looking at CountingOutputStream there is a getByteCount() method that returns a long. But LargeText is calling getCount() which does a length check, and throws this exception, before casting to an int.
LargeText.writeLogTo() returns a long, so it should be calling getByteCount() and dealing with longs, and thus allow large log files to be downloaded without this exception.
The text was updated successfully, but these errors were encountered: