snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Resteasy Reactive: InputStream is closed too early #345

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug

There seems to be a regression from 2.0.0.Alpha3 to 2.0.0.CR1 where now in CR1 a ContainerRequestFilter that tries to read the inputstream some time after suspending the ContainerRequestContext will end up reading it forever and eventually timing out as the underlying stream is constantly returning saying it has bytes available as its hitting this code in org.jboss.resteasy.reactive.server.vertx.VertxInputStream and input1 is null:

image

It thus returns the value of the content length header and the stream reader ends up trying forever to read as it thinks there are always more bytes available.

Expected behavior

The stream should remain readable even after a suspend has been done.

Actual behavior

In CR1 the stream becomes unusable soon after a suspend is called

To Reproduce

I don't have a reproducer and was hoping the cause could be found as it is specifically happening due to some changes from Alpha3 to CR1

Configuration

# Add your application.properties here, if applicable.

Screenshots

(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Output of uname -a or ver

Output of java -version

GraalVM version (if different from Java)

Quarkus version or git rev

2.0.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

Additional context


https://github.com/quarkusio/quarkus/issues/17506


$upstream:17506$