Skip to content

8361827: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java throws OutOfMemoryError #26278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.concurrent.CountDownLatch;
import com.sun.management.HotSpotDiagnosticMXBean;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

Expand All @@ -49,6 +50,15 @@ public class UnmountedVThreadNativeMethodAtTop {

boolean done;

/**
* The tests accumulate previous heap dumps. Trigger GC before each test to get rid of them.
* This makes dumps smaller, processing faster, and avoids OOMs
*/
@BeforeEach
void doGC() {
System.gc();
}

/**
* Test dumping the heap while a virtual thread is blocked entering a synchronized native method.
*/
Expand Down