First contact with Fibers

Christian Stein sormuras at gmail.com
Tue Aug 13 07:39:26 UTC 2019


Hi everybody,

my first usage of Loom was to implement a simplistic JUnit 5 TestEngine.
The source and some timing results are available at: [1]

Can you please take a look and verify whether the implementation makes
sense?
 - [2] Threads via `Executors.newFixedThreadPool(1000);`
 - [3] Fibers via `FiberScope.open()`

Also, running with a lot of fiber instances, I encountered a JVM error that
reads:

# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (continuation.cpp:4110), pid=45199, tid=45234
# guarantee(false) failed: unreachable
#
# JRE version: OpenJDK Runtime Environment (14.0+2) (build 14-loom+2-4)
# Java VM: OpenJDK 64-Bit Server VM (14-loom+2-4, mixed mode, sharing,
tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x63d691] ContMirror::allocate_stacks_in_java(int, int,
int)+0x81

Cheers,
Christian

[1] https://github.com/sormuras/junit5-looming
[2]
https://github.com/sormuras/junit5-looming/blob/f154ef90dbbea359e2f1c92c8b03110e4ec731af/src/de.sormuras.junit.looming/main/java/de/sormuras/junit/looming/LoomTestEngine.java#L47-L66
[3]
https://github.com/sormuras/junit5-looming/blob/f154ef90dbbea359e2f1c92c8b03110e4ec731af/src/de.sormuras.junit.looming/main/java/de/sormuras/junit/looming/LoomTestEngine.java#L68-L81


More information about the loom-dev mailing list