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
Seeing java.lang.IllegalArgumentException: demand pending
during load testing
#11694
Comments
java.lang.IllegalArgumentException: demand pending
during load testing
Here is my theory about what could be the cause of this: TL;DR I think Jersey is reading from the IAE thrown because if (httpChannelState._onContentAvailable != null)
throw new IllegalArgumentException("demand pending"); The recycling happens when the core Handler's callback is succeeded and its order is:
Repeating the reported stack trace:
If HttpInput.read()
AsyncContentProducer.nextChunk() // returns EOF
_consumedEof = true;
// If EOF do we need to wake for allDataRead callback?
if (onContentProducible()) // sets inputState to READY; also sets state to WOKEN if it was WAITING, return true in that case
scheduleReadListenerNotification(); // dispatches a thread that will have the stack trace above The dispatched thread would eventually call Can we have a demand already registered at this point? while (isReady()) // sets the inputState to READY and returns true on the 1st check; sets the inputState to UNREADY, registers a demand and returns false on the 2nd check
httpInput.read(); // reads -1, prepares the dispatch to call onAllDataRead() But that needs to be confirmed. |
Jetty version(s)
12.0.8
Jetty Environment
ee10
Java version/vendor
(use: java -version)
JDK21
OS type/version
Linux
Description
How to reproduce?
Load testing
The text was updated successfully, but these errors were encountered: