The GitHub Actions job "Java CI with Gradle" on poi.git/integration-test-memory 
has failed.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
42315fbc90033a96580ae41cf50a4d4a08e846f0 / PJ Fanning 
<[email protected]>
Cut the heap the integration tests need and fix their heap settings

The gradle CI job (GitHub Actions) never set CI_BUILD, so poi-integration
ran with the root 2g heap and one test thread per processor; the 3g/2-thread
config in poi-integration/build.gradle only applied on Jenkins. Under that
heap TestAllFiles intermittently stalls in "Retried waiting for GCLocker too
often" and then kills the JUnit engine with an OutOfMemoryError (seen on
the Java 21 job for #1276). Apply the 3g heap unconditionally, trigger the
parallelism cap on CI=true as well, and raise the ant heap to match.

Also reduce what the tests actually hold on the heap:

- IOUtils.toByteArray: when the length is known and fits the initial
  allocation, read straight into the result array instead of through a
  ByteArrayOutputStream plus toByteArray() copy. Halves the transient
  memory of every sized read (zip entries up to 2MB, record payloads).
- TestAllFiles: lower the temp-file threshold from 16MB to 2MB. Since
  76d93fcc0f (#1236) the threshold also bounds how much of an unknown-size
  entry is buffered on the heap before spilling; the workbooks POI writes
  to a stream (which SpreadsheetHandler re-reads for every spreadsheet) use
  data descriptors, so their parts had moved from temp files onto the heap.
- SpreadsheetHandler: write the discarded first copy to NullOutputStream
  and drop the serialized bytes before processing the re-read workbook.
- XSSFFileHandler, OPCFileHandler, XSSFBFileHandler: close the OPCPackages
  opened from streams; each kept every decompressed part alive until GC.

Co-Authored-By: Claude Opus 5 <[email protected]>

Report URL: https://github.com/apache/poi/actions/runs/35326471231

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to