-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
25
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
With many virtual threads and intense GC pressure, Thread.dump_to_file crashes the VM.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
$ java Test.java
---------- BEGIN SOURCE ----------
import java.io.IOException;
class Test {
public static void main() throws InterruptedException, IOException {
for (var i = 0; i < 10000; i++) {
Thread.startVirtualThread(
() -> {
while (true) {
var unused = new byte[1024];
Thread.yield();
}
});
}
while (true) {
new ProcessBuilder(
System.getProperty("java.home") + "/bin/jcmd",
Long.toString(ProcessHandle.current().pid()),
"Thread.dump_to_file",
"-overwrite",
"/dev/null")
.start()
.waitFor();
}
}
}
---------- END SOURCE ----------
With many virtual threads and intense GC pressure, Thread.dump_to_file crashes the VM.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
$ java Test.java
---------- BEGIN SOURCE ----------
import java.io.IOException;
class Test {
public static void main() throws InterruptedException, IOException {
for (var i = 0; i < 10000; i++) {
Thread.startVirtualThread(
() -> {
while (true) {
var unused = new byte[1024];
Thread.yield();
}
});
}
while (true) {
new ProcessBuilder(
System.getProperty("java.home") + "/bin/jcmd",
Long.toString(ProcessHandle.current().pid()),
"Thread.dump_to_file",
"-overwrite",
"/dev/null")
.start()
.waitFor();
}
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8364343 ThreadSnapshotFactory::get_thread_snapshot() crashes without JVMTI agent
-
- Open
-