five111 opened a new issue #2606:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2606


   接口调用时异常日志如下:
   ```
   org.apache.servicecomb.swagger.invocation.exception.InvocationException: 
InvocationException: code=408;msg=CommonExceptionData{code='SCB.00000004', 
message='Invocation Timeout.', dynamic={}}
        at 
org.apache.servicecomb.core.provider.consumer.SyncResponseExecutor.guardedWait(SyncResponseExecutor.java:85)
 ~[java-chassis-core-2.1.5-h0.gts.dsp.r17.jar:2.1.5-h0.gts.dsp.r17]
        at 
org.apache.servicecomb.core.provider.consumer.SyncResponseExecutor.waitResponse(SyncResponseExecutor.java:54)
 ~[java-chassis-core-2.1.5-h0.gts.dsp.r17.jar:2.1.5-h0.gts.dsp.r17]
        at 
org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:160)
 [java-chassis-core-2.1.5-h0.gts.dsp.r17.jar:2.1.5-h0.gts.dsp.r17]
        at 
org.apache.servicecomb.provider.pojo.HandlerInvocationCaller.syncInvoke(HandlerInvocationCaller.java:40)
 [provider-pojo-2.1.5-h0.gts.dsp.r17.jar:2.1.5-h0.gts.dsp.r17]
        at 
org.apache.servicecomb.provider.pojo.HandlerInvocationCaller.call(HandlerInvocationCaller.java:34)
 [provider-pojo-2.1.5-h0.gts.dsp.r17.jar:2.1.5-h0.gts.dsp.r17]
        at org.apache.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:71) 
[provider-pojo-2.1.5-h0.gts.dsp.r17.jar:2.1.5-h0.gts.dsp.r17]
        at com.sun.proxy.$Proxy343.queryTaskResult(Unknown Source) [?:?]
        at 
com.huawei.mateinfo.io.thread.install.rpc.taskquery.ItemInstallTaskQueryRunnable.getResult(ItemInstallTaskQueryRunnable.java:68)
 [mateinfo-app-mgt-io-1.0.0.jar:?]
        at 
com.huawei.mateinfo.io.thread.install.rpc.taskquery.BaseItemTaskQueryRunnable.execute(BaseItemTaskQueryRunnable.java:69)
 [mateinfo-app-mgt-io-1.0.0.jar:?]
        at 
com.huawei.mateinfo.io.thread.install.rpc.taskquery.BaseItemTaskQueryRunnable.run(BaseItemTaskQueryRunnable.java:45)
 [mateinfo-app-mgt-io-1.0.0.jar:?]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_292]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[?:1.8.0_292]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [?:1.8.0_292]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [?:1.8.0_292]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_292]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_292]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
   ```
   跟踪源码发现异常来源于此方法
   ```
    private void guardedWait(Invocation invocation) throws InvocationException {
       long wait = getWaitTime(invocation);
       try {
         if (wait <= 0) {
           latch.await();
           return;
         }
         if (latch.await(wait, TimeUnit.MILLISECONDS)) {
           return;
         }
       } catch (InterruptedException e) {
         //ignore
       }
       throw new InvocationException(REQUEST_TIMEOUT, 
ExceptionCodes.INVOCATION_TIMEOUT, "Invocation Timeout.");
     }
   ```
   latch.wait时,线程处于中断状态,导致抛出异常,请问这种问题该如何排查


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to