Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateExecption causing stop of processing incoming messages through WebSocket #12662

Open
paveldayneko opened this issue Dec 23, 2024 · 1 comment
Labels
Bug For general bugs on Jetty side

Comments

@paveldayneko
Copy link

Jetty version(s)
12.0.7

Jetty Environment
ee10

OS type/version
Linux

Description
We are running Java service with Spring Boot exposing Web Socket based connection. And some connections suddenly stop receiving incoming message. Every incedent like that coincides with Warning log from Jetty

WARN org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy [qtp1558825448-9112] Task run failed
java.lang.IllegalStateException: already released ReferenceCounter@4efeb79f[r=0]
	at org.eclipse.jetty.io.Retainable$ReferenceCounter.lambda$release$2(Retainable.java:192) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at java.base/java.util.concurrent.atomic.AtomicInteger.updateAndGet(AtomicInteger.java:281) ~[?:?]
	at org.eclipse.jetty.io.Retainable$ReferenceCounter.release(Retainable.java:189) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.io.AbstractRetainableByteBuffer.release(AbstractRetainableByteBuffer.java:58) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.io.ArrayByteBufferPool$Buffer.release(ArrayByteBufferPool.java:598) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.websocket.core.WebSocketConnection.releaseNetworkBuffer(WebSocketConnection.java:322) ~[jetty-websocket-core-common-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.websocket.core.WebSocketConnection.fillAndParse(WebSocketConnection.java:496) ~[jetty-websocket-core-common-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.websocket.core.WebSocketConnection.onFillable(WebSocketConnection.java:332) ~[jetty-websocket-core-common-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[jetty-io-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:410) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156) ~[jetty-util-12.0.7.jar!/:12.0.7]
	at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

It seems to be related to #12082

How to reproduce?

In our case issue can be reproduced only under high load

@paveldayneko paveldayneko added the Bug For general bugs on Jetty side label Dec 23, 2024
@joakime
Copy link
Contributor

joakime commented Dec 23, 2024

Upgrade to 12.0.16, this has already been addressed in that version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

2 participants