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

Restore TomcatReactiveWebServerFactoryTests #19702

Closed
philwebb opened this issue Jan 14, 2020 · 5 comments
Closed

Restore TomcatReactiveWebServerFactoryTests #19702

philwebb opened this issue Jan 14, 2020 · 5 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@philwebb
Copy link
Member

A recent Netty upgrade brings a change has highlighted a potential Tomcat bug.

TomcatReactiveWebServerFactoryTests now fails with the following:

java.lang.IllegalArgumentException: Both 'Content-Length: 3000' and 'Transfer-Encoding: chunked' found
	at io.netty.handler.codec.http.HttpObjectDecoder.readHeaders(HttpObjectDecoder.java:648) ~[netty-codec-http-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:218) ~[netty-codec-http-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:202) ~[netty-codec-http-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:493) ~[netty-codec-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:432) ~[netty-codec-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:271) ~[netty-codec-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:227) [netty-handler-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:792) [netty-transport-native-epoll-4.1.44.Final-linux-x86_64.jar:4.1.44.Final]
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:475) [netty-transport-native-epoll-4.1.44.Final-linux-x86_64.jar:4.1.44.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) [netty-transport-native-epoll-4.1.44.Final-linux-x86_64.jar:4.1.44.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.44.Final.jar:4.1.44.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.44.Final.jar:4.1.44.Final]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_232]

We need to either revert the upgrade or find a workaround.

@philwebb philwebb added the type: bug A general bug label Jan 14, 2020
@philwebb philwebb added this to the 2.3.0.M1 milestone Jan 14, 2020
@philwebb philwebb added type: task A general task and removed type: bug A general bug labels Jan 14, 2020
philwebb added a commit that referenced this issue Jan 14, 2020
Temporarily disable some tests in `TomcatReactiveWebServerFactoryTests`
that fail since the Netty upgrade.

See gh-19702
@philwebb
Copy link
Member Author

I've disabled the tests for new. We'll need to revert 3fe4245 when we have a proper fix.

@wilkinsona
Copy link
Member

We need to either revert the upgrade or find a workaround.

The upgrade's accidental, unfortunately. We're still using 4.1.43 in spring-boot-dependencies, but Reactor Netty's transitive dependency on 4.1.44 is winning. 4.1.43 should be enforced, but I'm struggling to achieve that and publish Gradle module metadata that doesn't expose such strict requirements to consumers. I'm working with the Gradle team on it now. If push comes to shove, we can disable the publication of Gradle module metadata for M1 and switch back to using an enforced platform again.

@dreis2211
Copy link
Contributor

dreis2211 commented Jan 15, 2020

Adding this solely for a quick reference. The potential Tomcat bug turns out to be an issue in Spring-Framework: spring-projects/spring-framework#24361

@wilkinsona
Copy link
Member

The ignores added in f73c4a8 will also need to be reverted.

@wilkinsona wilkinsona modified the milestones: 2.3.0.M1, 2.1.x Jan 15, 2020
@wilkinsona
Copy link
Member

As will the @Disabled tests added in 285ae01.

@philwebb philwebb changed the title Netty client upgrade breaks TomcatReactiveWebServerFactoryTests Restore TomcatReactiveWebServerFactoryTests Jun 1, 2020
@philwebb philwebb modified the milestones: 2.1.x, 2.1.15 Jun 1, 2020
@philwebb philwebb self-assigned this Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

3 participants