Loom crash with very simple test case

Ron Pressler ron.pressler at oracle.com
Sun Dec 8 13:08:20 UTC 2019


Hi.

Structured concurrency just made a tactical withdrawal; it will come back.
I’ll try to reproduce your crash tomorrow.

Ron


On 8 December 2019 at 13:01:43, Cay Horstmann (cay at horstmann.com) wrote:

Hi, I built Loom from scratch yesterday and ran a simple test program  
with the most current API. (BTW--not a fan of this API. It was better  
with FiberScope a few weeks ago.)  

On Ubuntu Linux 18.04, it dumped core. Just FYI. I am writing a blog  
post for javaadvent.com, so it would be nice if I could provide  
something that makes a million fibers and works :-) Any ideas?  

Thanks,  

Cay  

public class LoomTest2  
{  
public static int DELAY = 10_000;  

public static void main(String[] args) throws InterruptedException  
{  
int NTASKS = 1_000_000;  
for (int i = 1; i <= NTASKS; i++) {  
String taskname = "task-" + i;  
Thread.builder()  
.name(taskname)  
.virtual()  
.task(() -> run(taskname))  
.build()  
.start();  
}  
Thread.sleep(10 * DELAY);  
}  

public static void run(String n) {  
try {  
Thread.sleep(DELAY);  
} catch (InterruptedException ex) {  
ex.printStackTrace();  
}  
System.out.println(n);  
}  
}  

#  
# A fatal error has been detected by the Java Runtime Environment:  
#  
# Internal Error (continuation.cpp:2803), pid=13918, tid=13938  
# guarantee(argsize == 0) failed: for now  
#  
# JRE version: OpenJDK Runtime Environment (14.0) (build  
14-internal+0-adhoc.cay.loom2)  
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.cay.loom2,  
mixed mode, tiered, compressed oops, g1 gc, linux-amd64)  
# Problematic frame:  
# V [libjvm.so+0x77f4a8] freeze_result Freeze<Config<true, true, true,  
true, false, false>, (op_mode)0>::finalize<Compiled>(frame const&,  
hframe&, int*)+0x2c8  
#  
# Core dump will be written. Default location: Core dumps may be  
processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to  
/tmp/core.13918)  
#  
# An error report file with more information is saved as:  
# /tmp/hs_err_pid13918.log  
[thread 13939 also had an error]  
[thread 13946 also had an error]  
#  
# If you would like to submit a bug report, please visit:  
# https://bugreport.java.com/bugreport/crash.jsp  
#  


--  

Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com  


More information about the loom-dev mailing list