apache / apache/maven-surefire

[SUREFIRE-2072] Surefire retains too much heap in some case, leading to OutOfMemory

Open
#3,116 9 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Mickael Istria](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mickael.istria)** opened **[SUREFIRE-2072](https://issues.apache.org/jira/browse/SUREFIRE-2072?redirect=false)** and commented

Most likely since SuREFIRE-1845, every test execution can retain 64kB of RAM (as cache). Which caching is welcome, this cannot scale with some big test suites of several thousands of tests and cause OutOfMemoryError.

This is the case when running Eclipse JDT dom test suite, since tycho-surefire-plugin started to adopt surefire 3.0.0.M6, as described in https://github.com/eclipse/tycho/issues/879#issuecomment-1096454637

---

**Issue Links:**
- [SUREFIRE-1845](https://issues.apache.org/jira/browse/SUREFIRE-1845) Fixed the performance of Utf8RecodingDeferredFileOutputStream as a bottleneck for the tests with logs
(_**"is caused by"**_)

1 votes, 4 watchers

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Eclipse JDT DOM test suite case described in the issue and inspect the caching change from SUREFIRE-1845. Trace which per-test data remains retained and verify the result with a several-thousand-test suite; done means the cache no longer scales into an OutOfMemoryError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.