You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2018/04/06 12:34:07 UTC

[GitHub] wangmh opened a new issue #1038: grpc client BlockingCallClientInterceptor null exception

wangmh opened a new issue #1038: grpc client BlockingCallClientInterceptor null exception
URL: https://github.com/apache/incubator-skywalking/issues/1038
 
 
   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [√ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   5.0.0-alpha mac java version "1.8.0_91"
   - Which company or project?
    hualala.com
   - What happen?
   grpc client -> grpc server , client add agent then
   client has null point exception 
   
   严重: Exception while executing runnable io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed@1e54cb33
   java.lang.NullPointerException
   	at org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan.log(AbstractTracingSpan.java:132)
   	at org.apache.skywalking.apm.agent.core.context.trace.ExitSpan.log(ExitSpan.java:116)
   	at org.apache.skywalking.apm.agent.core.context.trace.ExitSpan.log(ExitSpan.java:39)
   	at org.apache.skywalking.apm.plugin.grpc.v1.BlockingCallClientInterceptor$CallListener.onClose(BlockingCallClientInterceptor.java:80)
   	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
   	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:663)
   	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
   	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392)
   	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:443)
   	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
   	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:525)
   	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:446)
   	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:557)
   	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
   	at io.grpc.stub.ClientCalls$ThreadlessExecutor.waitAndDrain(ClientCalls.java:625)
   	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:122)
   	at com.hualala.helloworld.GreeterGrpc$GreeterBlockingStub.sayHello(GreeterGrpc.java:179)
   	at com.hualala.HelloWorldClient.greet(HelloWorldClient.java:123)
   	at com.hualala.HelloWorldClient.main(HelloWorldClient.java:145)
   
   ___
   ### Requirement or improvement
   -   BlockingCallClientInterceptor.java:78  ` if (status.isOk())  should be  if (!status.isOk()) `
           @Override public void onClose(Status status, Metadata trailers) {
               delegate().onClose(status, trailers);
               if (status.isOk()) {
                   AbstractSpan activeSpan = ContextManager.activeSpan();
                   activeSpan.errorOccurred().log(status.getCause());
                   Tags.STATUS_CODE.set(activeSpan, status.getCode().name());
               }
               ContextManager.stopSpan();
           }
    

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services