Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PowerMock Junits causing OOM (Process Exit Code: 137 - The forked VM terminated without properly saying goodbye) #1169

@dswami8801

Description

@dswami8801

We have following configuration for our testing environment with 2.5G heap allocation.
The test execution terminates with OOM error along with a huge pile of Metaspace.
powermock: 1.7.1
mockito : 2.0.2-beta
Java 11

On heap dump analysis we see lot of org.powermock.core.classloader.MockClassLoader objects which are not being Garbage Collected and eventually it crashes with OOM.

Heap Dump:
image

Heap Used:
image

Metaspace Used:
image

I see similar Issues reported in past here #227 but can't see any resolution provided.

@johanhaleby Please assist If this is fixed in recent releases or any other workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions