My experience using loom for a load generator

eric.ackermann at student.hpi.de eric.ackermann at student.hpi.de
Thu Jun 25 14:21:57 UTC 2020


Good afternoon,

On 25/06/2020 09:51, Alan Bateman wrote:
> The EA builds has been refreshed [1] so they include several fixes from 
> the last few weeks. Would you mind re-running your test to see if you 
> still observe the crash?

I re-ran the tests with the refreshed builds without -XX:-UseContinuationChunks and did not observe any JVM crashes any more.
However, I encountered an internal error in ReentrantLock.java I thought you might be interested in, see the stack trace below [1].
The problem seems to occur when instances of AsyncHttpClient are created inside a virtual thread while other instances are sending requests in other virtual threads, and I was not able to reliably reproduce it.
I am not sure whether this is a bug in Loom or async-http-client, but since I never experienced this issue on JVMs 11 through 13 when using Kotlin coroutines I am convinced that my application and Kotlin are not the culprits.
I am currently using version 2.10.4 of async-http-client, Kotlin version 1.3.70 and Windows 10 1903 (Build 18362.900).
	
Kind regards,
Eric Ackermann

[1] java.lang.IllegalMonitorStateException
	at java.base/java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:175)
	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1006)
	at java.base/java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:494)
	at java.base/java.lang.VirtualThread.parkCarrierThread(VirtualThread.java:385)
	at java.base/java.lang.VirtualThread$1.onPinned(VirtualThread.java:157)
	at java.base/java.lang.Continuation.onPinned0(Continuation.java:498)
	at java.base/java.lang.Continuation.yield0(Continuation.java:468)
	at java.base/java.lang.Continuation.yield(Continuation.java:430)
	at java.base/java.lang.VirtualThread.tryPark(VirtualThread.java:470)
	at java.base/java.lang.VirtualThread.park(VirtualThread.java:418)
	at java.base/java.lang.System$2.parkVirtualThread(System.java:2322)
	at java.base/jdk.internal.misc.VirtualThreads.park(VirtualThreads.java:56)
	at java.base/sun.nio.ch.SelChImpl.park(SelChImpl.java:93)
	at java.base/sun.nio.ch.SelChImpl.park(SelChImpl.java:123)
	at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:818)
	at java.base/java.nio.channels.SocketChannel.open(SocketChannel.java:224)
	at java.base/sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:127)
	at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:76)
	at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:61)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
	at java.base/sun.nio.ch.PipeImpl.<init>(PipeImpl.java:171)
	at java.base/sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:60)
	at java.base/java.nio.channels.Pipe.open(Pipe.java:155)
	at java.base/sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:142)
	at java.base/sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
	at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:179)
	at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:147)
	at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:138)
	at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:37)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
	at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:78)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:73)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:60)
	at org.asynchttpclient.netty.channel.NioTransportFactory.newEventLoopGroup(NioTransportFactory.java:32)
	at org.asynchttpclient.netty.channel.NioTransportFactory.newEventLoopGroup(NioTransportFactory.java:21)
	at org.asynchttpclient.netty.channel.ChannelManager.<init>(ChannelManager.java:130)
	at org.asynchttpclient.DefaultAsyncHttpClient.<init>(DefaultAsyncHttpClient.java:89)
	at org.asynchttpclient.Dsl.asyncHttpClient(Dsl.java:32)
	[...]




More information about the loom-dev mailing list