Skip to content

Conversation

@jglick
Copy link
Member

@jglick jglick commented Apr 25, 2025

Can be merged whenever; just provides a harness to evaluate jenkinsci/stapler#657 + jenkinsci/jenkins#10515.

@jglick jglick added the tests label Apr 25, 2025

@WithTimeout(600)
@Issue("JENKINS-75081")
@Test public void giantLogRunning() throws Exception {
Copy link
Member Author

@jglick jglick Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before: passes in 132s.

After: passes in 135s.

Code path not changed here, either way uses an inefficient system but at least only in smallish chunks.


@WithTimeout(600)
@Issue("JENKINS-75081")
@Test public void giantLogCompleted() throws Exception {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before: crashes with multiple OOMEs.

After: OOMEs in WebClient, so I guess I need to rewrite the test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also after:

java.lang.OutOfMemoryError: Java heap space
	at org.kohsuke.stapler.framework.io.CharSpool.renew(CharSpool.java:63)
	at org.kohsuke.stapler.framework.io.CharSpool.write(CharSpool.java:50)
	at java.base/java.io.Writer.implWrite(Writer.java:334)
	at java.base/java.io.Writer.write(Writer.java:318)
	at java.base/java.io.Writer.write(Writer.java:278)
	at hudson.console.ConsoleAnnotationOutputStream.eol(ConsoleAnnotationOutputStream.java:148)
	at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:69)
	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:62)
	at java.base/java.io.FilterOutputStream.write(FilterOutputStream.java:89)
	at org.jenkinsci.plugins.workflow.log.FileLogStorage$1$1.write(FileLogStorage.java:252)
	at java.base/java.io.FilterOutputStream.write(FilterOutputStream.java:139)
	at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:213)
	at org.kohsuke.stapler.framework.io.LargeText.writeLogUncounted(LargeText.java:250)
	at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:235)
	at hudson.console.AnnotatedLargeText.writeRawLogTo(AnnotatedLargeText.java:234)
	at org.jenkinsci.plugins.workflow.log.FileLogStorage$1.writeHtmlTo(FileLogStorage.java:217)
	at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:208)
	at org.kohsuke.stapler.framework.io.LargeText.doProgressTextImpl(LargeText.java:319)
	at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:277)
	at hudson.console.AnnotatedLargeText.doProgressiveHtmlImpl(AnnotatedLargeText.java:119)
	at hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:104)

which as noted cannot be solved (we cannot avoid buffering in HTML mode).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, with new HTTP client, and after ceasing to even bother to test progressiveHtml on a completed build:

console fails

java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.Arrays.copyOf(Arrays.java:3541)
	at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:100)
	at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:132)
	at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:147)
	at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:244)
	at hudson.console.AnnotatedLargeText.writeRawLogTo(AnnotatedLargeText.java:226)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$$Lambda/0x000000010099e798.writeLogTo(Unknown Source)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.writeLogTo(WorkflowRun.java:1167)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.getLogInputStream(WorkflowRun.java:1135)
	at hudson.model.Run.writeLogTo(Run.java:1464)

consoleFull passes (oddly)

consoleText passes

progressiveText fails

java.lang.OutOfMemoryError: Java heap space
	at org.kohsuke.stapler.framework.io.CharSpool.renew(CharSpool.java:63)
	at org.kohsuke.stapler.framework.io.CharSpool.write(CharSpool.java:50)
	at org.kohsuke.stapler.framework.io.WriterOutputStream.flushOutput(WriterOutputStream.java:90)
	at org.kohsuke.stapler.framework.io.WriterOutputStream.decode(WriterOutputStream.java:125)
	at org.kohsuke.stapler.framework.io.WriterOutputStream.write(WriterOutputStream.java:73)
	at hudson.console.PlainTextConsoleOutputStream.eol(PlainTextConsoleOutputStream.java:86)
	at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:69)
	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:62)
	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:84)
	at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:147)
	at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:244)
	at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:217)
	at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:218)
	at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:207)
	at org.kohsuke.stapler.framework.io.LargeText.doProgressTextImpl(LargeText.java:311)
	at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:274)
	at hudson.console.AnnotatedLargeText.doProgressiveText(AnnotatedLargeText.java:128)

After:

all pass.

@jglick jglick merged commit 5e2896f into jenkinsci:master Apr 28, 2025
17 checks passed
@jglick jglick deleted the DefaultLogStorageTest.performance branch April 28, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants