[jboss-jira] [JBoss JIRA] (WFLY-11103) If ServletInputStream.isReady returns false it is illegal to call the ServletInputStream.read method and EAP returns HTTP 200
Adam Krajcik (Jira)
issues at jboss.org
Tue Oct 2 10:17:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-11103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Krajcik moved JBEAP-15567 to WFLY-11103:
---------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-11103 (was: JBEAP-15567)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Web (Undertow)
(was: Web (Undertow))
Affects Version/s: 14.0.1.Final
(was: 7.2.0.CD14)
> If ServletInputStream.isReady returns false it is illegal to call the ServletInputStream.read method and EAP returns HTTP 200
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11103
> URL: https://issues.jboss.org/browse/WFLY-11103
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 14.0.1.Final
> Reporter: Adam Krajcik
> Assignee: Romain Pelisse
> Priority: Major
> Attachments: JBEAP-12223.zip
>
>
> EAP returns HTTP 200 instead of 500 when IllegalStateException is thrown if ServletInputStream.isReady returns false.
> This exists in 7.2.0.CD14, it works in 7.2.0.CD13.
> {code}
> Caused by: java.lang.IllegalStateException: UT010035: Stream in async mode was not ready for IO operation
> at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:164)
> at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:154)
> at org.resteasy.simple.deployment.er2.ResourceInfoInjectionResource$1.onDataAvailable(ResourceInfoInjectionResource.java:42)
> at io.undertow.servlet.spec.ServletContextImpl$3.call(ServletContextImpl.java:188)
> at io.undertow.servlet.spec.ServletContextImpl$3.call(ServletContextImpl.java:185)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at io.undertow.servlet.spec.ServletContextImpl.invokeOnDataAvailable(ServletContextImpl.java:1009)
> ... 4 more
> 16:27:16,509 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default I/O-5) RESTEASY002020: Unhandled asynchronous exception, sending back 500: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: java.lang.IllegalStateException: UT010035: Stream in async mode was not ready for IO operation
> at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:257)
> at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:197)
> at org.jboss.resteasy.core.SynchronousDispatcher.asynchronousExceptionDelivery(SynchronousDispatcher.java:513)
> at org.jboss.resteasy.core.AbstractAsynchronousResponse.internalResume(AbstractAsynchronousResponse.java:228)
> at org.jboss.resteasy.plugins.server.servlet.Servlet3AsyncHttpRequest$Servlet3ExecutionContext$Servle3AsychronousResponse.resume(Servlet3AsyncHttpRequest.java:118)
> at org.resteasy.simple.deployment.er2.ResourceInfoInjectionResource$1.onError(ResourceInfoInjectionResource.java:61)
> at io.undertow.servlet.spec.ServletInputStreamImpl$ServletInputStreamChannelListener$1.run(ServletInputStreamImpl.java:317)
> at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:181)
> at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:178)
> at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:1027)
> at io.undertow.servlet.spec.ServletInputStreamImpl$ServletInputStreamChannelListener.handleEvent(ServletInputStreamImpl.java:314)
> at io.undertow.servlet.spec.ServletInputStreamImpl$1$1.run(ServletInputStreamImpl.java:135)
> at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
> Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: UT010035: Stream in async mode was not ready for IO operation
> at io.undertow.servlet.spec.ServletContextImpl.invokeOnDataAvailable(ServletContextImpl.java:1011)
> at io.undertow.servlet.spec.ServletInputStreamImpl$ServletInputStreamChannelListener.handleEvent(ServletInputStreamImpl.java:295)
> ... 3 more
> Caused by: java.lang.IllegalStateException: UT010035: Stream in async mode was not ready for IO operation
> at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:164)
> at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:154)
> at org.resteasy.simple.deployment.er2.ResourceInfoInjectionResource$1.onDataAvailable(ResourceInfoInjectionResource.java:42)
> at io.undertow.servlet.spec.ServletContextImpl$3.call(ServletContextImpl.java:188)
> at io.undertow.servlet.spec.ServletContextImpl$3.call(ServletContextImpl.java:185)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at io.undertow.servlet.spec.ServletContextImpl.invokeOnDataAvailable(ServletContextImpl.java:1009)
> ... 4 more
> {code}
> The exception mentions that HTTP 500, should be returned.
> [Comment|https://issues.jboss.org/browse/JBEAP-12223?focusedCommentId=13638954&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13638954] from [~rpelisse] previous JIRA:
> {quote}Thanks for the step to reproduce, I've also managed to reproduce the behavior. Debugging through the problem, i've established that the code inserted to adress the isssue is still being used, the exception that lead to a 500 error to be returned is no longer being leading to 500 (but a 200).
> If I'm not mistaken, CD13 used Undertow 2.0.9 while CD14 is now using 2.0.13. I'll keep looking tomorrow to which of the few commits introduced in between those versions can have caused the issue.
> {quote}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list