google / google/error-prone

Excessive Metaspace usage when Error Prone enabled

Open
#2,793 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

As mentioned in https://github.com/google/error-prone/issues/2786#issuecomment-1003368760, we are planning to move away from forking `javac`. However, after disabling the `fork` option, we noticed that the metaspace (off-heap) usage increased significantly (220 MiB -> 1.8 GiB). Please have a look at the graphs below.

I don't have a reproduction case at the moment, but we don't have anything custom, only some command-line options to enable/disable some checks. Maybe it's worth mentioning; we also use [NullAway](https://github.com/uber/NullAway); however, disabling it didn't change the metaspace usage.

Depending on the feedback, I am happy to help reproduce this in an open-source repository. Please let me know.

---

I run `mvn -T 4 clean install -DskipTests` and attached `jconsole`.

#### Error Prone disabled
Screenshot 2022-01-04 at 10 56 05
Screenshot 2022-01-04 at 10 55 56

#### Error Prone enabled
Screenshot 2022-01-04 at 11 06 53
Screenshot 2022-01-04 at 11 06 44

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.