JBoss threads hung in Http2StreamSinkChannel and AbstractFramedStreamSinkChannel.awaitWritable

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP) 7.x

Issue

  • JBoss is becoming unresponsive with request threads exhausted and persisting in Http2StreamSinkChannel/AbstractFramedStreamSinkChannel.awaitWritable calls:
"default task-21293" #37774 prio=5 os_prio=0 tid=0x000000004ac58800 nid=0x2644 in Object.wait() [0x00000000796de000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.awaitWritable(AbstractFramedStreamSinkChannel.java:301)
	- locked <0x00000006721ad108> (a java.lang.Object)
	at io.undertow.protocols.http2.Http2StreamSinkChannel.awaitWritable(Http2StreamSinkChannel.java:186)
	at org.xnio.conduits.StreamSinkChannelWrappingConduit.awaitWritable(StreamSinkChannelWrappingConduit.java:99)
	at org.xnio.conduits.AbstractSinkConduit.awaitWritable(AbstractSinkConduit.java:66)
	at org.xnio.conduits.ConduitStreamSinkChannel.awaitWritable(ConduitStreamSinkChannel.java:134)
	at io.undertow.channels.DetachableStreamSinkChannel.awaitWritable(DetachableStreamSinkChannel.java:87)
	at io.undertow.server.HttpServerExchange$WriteDispatchChannel.awaitWritable(HttpServerExchange.java:2052)

Resolution

  • Upgrade to EAP 7.3.10 or 7.4.2+ and set the following in your JVM options for a more prompt timeout:
-Dio.undertow.await_writable_timeout=10000

Root Cause

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.