Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

AbstractUnsafe.close(...) may cause NPE while notify flush futures #1239

Closed
normanmaurer opened this Issue · 0 comments

1 participant

@normanmaurer
Collaborator

Here is the stacktrace we saw in vert.x

An exception was thrown by GenericFutureListener.
java.lang.NullPointerException: cause
at io.netty.channel.DefaultChannelHandlerContext.fireExceptionCaught(DefaultChannelHandlerContext.java:763)
at io.netty.channel.DefaultChannelPipeline.fireExceptionCaught(DefaultChannelPipeline.java:1001)
at io.netty.channel.ChannelFutureListener$3.operationComplete(ChannelFutureListener.java:69)
at io.netty.channel.ChannelFutureListener$3.operationComplete(ChannelFutureListener.java:65)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:545)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:478)
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:380)
at io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:91)
at io.netty.channel.ChannelFlushPromiseNotifier.notifyFlushFutures(ChannelFlushPromiseNotifier.java:124)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:705)
at io.netty.channel.DefaultChannelPipeline$HeadHandler.close(DefaultChannelPipeline.java:1314)
at io.netty.channel.DefaultChannelHandlerContext.invokeClose0(DefaultChannelHandlerContext.java:1138)
at io.netty.channel.DefaultChannelHandlerContext.invokeClose(DefaultChannelHandlerContext.java:1123)
at io.netty.channel.DefaultChannelHandlerContext.close(DefaultChannelHandlerContext.java:1117)
at org.vertx.java.core.impl.ExceptionDispatchHandler.close(ExceptionDispatchHandler.java:55)
at io.netty.channel.DefaultChannelHandlerContext.invokeClose0(DefaultChannelHandlerContext.java:1138)
at io.netty.channel.DefaultChannelHandlerContext.invokeClose(DefaultChannelHandlerContext.java:1123)
at io.netty.channel.DefaultChannelHandlerContext.close(DefaultChannelHandlerContext.java:1117)
at io.netty.channel.ChannelOperationHandlerAdapter.close(ChannelOperationHandlerAdapter.java:71)
at io.netty.channel.DefaultChannelHandlerContext.invokeClose0(DefaultChannelHandlerContext.java:1138)
at io.netty.channel.DefaultChannelHandlerContext.invokeClose(DefaultChannelHandlerContext.java:1123)
at io.netty.channel.DefaultChannelHandlerContext.close(DefaultChannelHandlerContext.java:1117)
at io.netty.channel.DefaultChannelHandlerContext.close(DefaultChannelHandlerContext.java:982)
at io.netty.channel.ChannelHandlerUtil.fail(ChannelHandlerUtil.java:158)
at io.netty.channel.ChannelHandlerUtil.handleFlush(ChannelHandlerUtil.java:136)
at io.netty.channel.ChannelOutboundMessageHandlerAdapter.flush(ChannelOutboundMessageHandlerAdapter.java:74)
at io.netty.channel.CombinedChannelDuplexHandler.flush(CombinedChannelDuplexHandler.java:237)
at io.netty.channel.DefaultChannelHandlerContext.invokeFlush0(DefaultChannelHandlerContext.java:1270)
at io.netty.channel.DefaultChannelHandlerContext.write0(DefaultChannelHandlerContext.java:1407)
at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:1374)
at io.netty.channel.DefaultChannelHandlerContext.write(DefaultChannelHandlerContext.java:997)
at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1067)
at io.netty.channel.AbstractChannel.write(AbstractChannel.java:245)
at org.vertx.java.core.http.impl.ClientConnection.write(ClientConnection.java:335)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.writeHead(DefaultHttpClientRequest.java:384)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.connected(DefaultHttpClientRequest.java:359)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.access$200(DefaultHttpClientRequest.java:40)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest$3.handle(DefaultHttpClientRequest.java:337)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest$3.handle(DefaultHttpClientRequest.java:334)
at org.vertx.java.core.http.impl.HttpConnectionPool.getConnection(HttpConnectionPool.java:80)
at org.vertx.java.core.http.impl.DefaultHttpClient.getConnection(DefaultHttpClient.java:335)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.connect(DefaultHttpClientRequest.java:334)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.write(DefaultHttpClientRequest.java:421)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.write(DefaultHttpClientRequest.java:126)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.end(DefaultHttpClientRequest.java:222)
at org.vertx.java.core.http.impl.DefaultHttpClientRequest.end(DefaultHttpClientRequest.java:215)
at org.vertx.java.core.http.HttpClientRequest$end.call(Unknown Source)
at org.vertx.groovy.core.http.HttpClientRequest.end(HttpClientRequest.groovy:215)
at foo.Bar$_withPostResponse_closure7.doCall(Bar.groovy:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:411)
at groovy.lang.Closure.call(Closure.java:427)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.with(DefaultGroovyMethods.java:220)
at foo.Bar.withPostResponse(Bar.groovy:200)
at foo.Bar.this$2$withPostResponse(Bar.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1085)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:848)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:831)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:71)
at foo.Bar$_createApartments_closure4_closure9.doCall(Bar.groovy:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:411)
at groovy.lang.Closure.call(Closure.java:427)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.times(DefaultGroovyMethods.java:10647)
at foo.Bar$_createApartments_closure4.doCall(Bar.groovy:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:411)
at groovy.lang.Closure.call(Closure.java:427)
at foo.Bar$_showResponse_closure8_closure12.doCall(Bar.groovy:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.vertx.groovy.core.http.HttpClientResponse$_bodyHandler_closure1.doCall(HttpClientResponse.groovy:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:411)
at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:51)
at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:82)
at com.sun.proxy.$Proxy48.handle(Unknown Source)
at org.vertx.java.core.http.impl.DefaultHttpClientResponse.handleChunk(DefaultHttpClientResponse.java:111)
at org.vertx.java.core.http.impl.ClientConnection.handleResponseChunk(ClientConnection.java:281)
at org.vertx.java.core.http.impl.DefaultHttpClient$ClientHandler.doMessageReceived(DefaultHttpClient.java:515)
at org.vertx.java.core.http.impl.DefaultHttpClient$ClientHandler.doMessageReceived(DefaultHttpClient.java:490)
at org.vertx.java.core.http.impl.VertxHttpHandler.messageReceived(VertxHttpHandler.java:87)
at io.netty.channel.ChannelHandlerUtil.handleInboundBufferUpdated(ChannelHandlerUtil.java:60)
at org.vertx.java.core.http.impl.VertxHttpHandler.inboundBufferUpdated(VertxHttpHandler.java:58)
at io.netty.channel.DefaultChannelHandlerContext.invokeInboundBufferUpdated(DefaultChannelHandlerContext.java:896)
at io.netty.channel.DefaultChannelHandlerContext.fireInboundBufferUpdated0(DefaultChannelHandlerContext.java:864)
at io.netty.channel.DefaultChannelHandlerContext.fireInboundBufferUpdated(DefaultChannelHandlerContext.java:843)
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.inboundBufferUpdated(ByteToMessageDecoder.java:69)
at io.netty.channel.ChannelInboundByteHandlerAdapter.inboundBufferUpdated(ChannelInboundByteHandlerAdapter.java:51)
at io.netty.channel.CombinedChannelDuplexHandler.inboundBufferUpdated(CombinedChannelDuplexHandler.java:194)
at io.netty.channel.DefaultChannelHandlerContext.invokeInboundBufferUpdated(DefaultChannelHandlerContext.java:896)
at io.netty.channel.DefaultChannelHandlerContext.fireInboundBufferUpdated0(DefaultChannelHandlerContext.java:864)
at io.netty.channel.DefaultChannelHandlerContext.fireInboundBufferUpdated(DefaultChannelHandlerContext.java:843)
at io.netty.channel.DefaultChannelPipeline.fireInboundBufferUpdated(DefaultChannelPipeline.java:1017)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:115)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:434)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:397)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:327)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:109)
at java.lang.Thread.run(Thread.java:722)

@normanmaurer normanmaurer was assigned
@bk1te bk1te referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.