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

[gateway] Thread deadlock #709

Closed
brasseld opened this Issue Jul 24, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@brasseld
Member

brasseld commented Jul 24, 2017

Found one Java-level deadlock:
=============================
"vert.x-eventloop-thread-5":
  waiting to lock monitor 0x00007f88b95067b8 (object 0x00000000c37b80d8, a io.vertx.core.http.impl.ServerConnection),
  which is held by "vert.x-eventloop-thread-4"
"vert.x-eventloop-thread-4":
  waiting to lock monitor 0x00007f88a4022998 (object 0x00000000c37ad410, a io.vertx.core.http.impl.ClientConnection),
  which is held by "vert.x-eventloop-thread-5"

Java stack information for the threads listed above:
===================================================
"vert.x-eventloop-thread-5":
	at io.vertx.core.http.impl.HttpServerResponseImpl.ended(HttpServerResponseImpl.java:359)
	- waiting to lock <0x00000000c37b80d8> (a io.vertx.core.http.impl.ServerConnection)
	at io.gravitee.gateway.standalone.vertx.VertxHttpServerResponse.write(VertxHttpServerResponse.java:56)
	at io.gravitee.gateway.standalone.vertx.VertxHttpServerResponse.write(VertxHttpServerResponse.java:28)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler.lambda$null$1(ApiReactorHandler.java:130)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler$$Lambda$171/1169214513.handle(Unknown Source)
	at io.gravitee.gateway.policy.impl.StreamablePolicyChain.write(StreamablePolicyChain.java:94)
	at io.gravitee.gateway.policy.impl.StreamablePolicyChain.write(StreamablePolicyChain.java:33)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler$$Lambda$173/1649138707.handle(Unknown Source)
	at io.gravitee.gateway.http.vertx.VertxHttpClient.lambda$handleClientResponse$3(VertxHttpClient.java:152)
	at io.gravitee.gateway.http.vertx.VertxHttpClient$$Lambda$198/2055712849.handle(Unknown Source)
	at io.vertx.core.http.impl.HttpClientResponseImpl.handleChunk(HttpClientResponseImpl.java:234)
	- locked <0x00000000c37ad410> (a io.vertx.core.http.impl.ClientConnection)
	at io.vertx.core.http.impl.ClientConnection.handleResponseChunk(ClientConnection.java:345)
	at io.vertx.core.http.impl.ClientHandler.doMessageReceived(ClientHandler.java:77)
	at io.vertx.core.http.impl.ClientHandler.doMessageReceived(ClientHandler.java:38)
	at io.vertx.core.http.impl.VertxHttpHandler.lambda$channelRead$0(VertxHttpHandler.java:71)
	at io.vertx.core.http.impl.VertxHttpHandler$$Lambda$82/1057391884.run(Unknown Source)
	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:335)
	at io.vertx.core.impl.ContextImpl$$Lambda$54/653648989.run(Unknown Source)
	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:193)
	at io.vertx.core.http.impl.VertxHttpHandler.channelRead(VertxHttpHandler.java:71)
	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:122)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:748)
"vert.x-eventloop-thread-4":
	at io.vertx.core.http.impl.HttpClientRequestImpl.end(HttpClientRequestImpl.java:351)
	- waiting to lock <0x00000000c37ad410> (a io.vertx.core.http.impl.ClientConnection)
	at io.gravitee.gateway.http.vertx.VertxClientRequest.end(VertxClientRequest.java:55)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler.lambda$null$6(ApiReactorHandler.java:157)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler$$Lambda$166/1710859573.handle(Unknown Source)
	at io.gravitee.gateway.policy.impl.StreamablePolicyChain.end(StreamablePolicyChain.java:105)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler.lambda$null$8(ApiReactorHandler.java:169)
	at io.gravitee.gateway.handlers.api.ApiReactorHandler$$Lambda$168/1228765300.handle(Unknown Source)
	at io.gravitee.gateway.standalone.vertx.VertxHttpServerRequest$$Lambda$164/1066890089.handle(Unknown Source)
	at io.vertx.core.http.impl.HttpServerRequestImpl.handleEnd(HttpServerRequestImpl.java:406)
	- locked <0x00000000c37b80d8> (a io.vertx.core.http.impl.ServerConnection)
	at io.vertx.core.http.impl.ServerConnection.handleEnd(ServerConnection.java:297)
	at io.vertx.core.http.impl.ServerConnection.processMessage(ServerConnection.java:441)
	at io.vertx.core.http.impl.ServerConnection.lambda$checkNextTick$0(ServerConnection.java:464)
	at io.vertx.core.http.impl.ServerConnection$$Lambda$226/1166899141.handle(Unknown Source)
	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
	at io.vertx.core.impl.ContextImpl$$Lambda$54/653648989.run(Unknown Source)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:748)

Found 1 deadlock.

@brasseld brasseld self-assigned this Jul 24, 2017

@brasseld brasseld added this to the 1.8.3 milestone Jul 24, 2017

@brasseld brasseld added the type: bug label Jul 24, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Jul 24, 2017

brasseld added a commit to gravitee-io/gravitee-resource-oauth2-provider-am that referenced this issue Jul 24, 2017

brasseld added a commit to gravitee-io/gravitee-resource-oauth2-provider-generic that referenced this issue Jul 24, 2017

brasseld added a commit to gravitee-io/gravitee-resource-oauth2-provider-am that referenced this issue Jul 24, 2017

tcompiegne added a commit to gravitee-io/gravitee-gateway that referenced this issue Jul 24, 2017

tcompiegne added a commit to gravitee-io/gravitee-resource-oauth2-provider-generic that referenced this issue Jul 24, 2017

tcompiegne added a commit to gravitee-io/gravitee-resource-oauth2-provider-am that referenced this issue Jul 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment