You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/02 15:13:14 UTC

[GitHub] [pulsar] lhotari opened a new issue #10784: [Java client] PulsarClientImpl.shutdown sporadically hangs

lhotari opened a new issue #10784:
URL: https://github.com/apache/pulsar/issues/10784


   **Describe the bug**
   
   PulsarClientImpl.shutdown sporadically hangs.
   
   Example stack trace
   ```
   "main" #1 prio=5 os_prio=0 cpu=91735.76ms elapsed=641.12s tid=0x00007f628c027800 nid=0x2e0d9 in Object.wait()  [0x
   00007f629099d000]
      java.lang.Thread.State: WAITING (on object monitor)
           at java.lang.Object.wait(java.base@11.0.11/Native Method)
           - waiting on <no object reference available>
           at java.lang.Object.wait(java.base@11.0.11/Object.java:328)
           at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:253)
           - waiting to re-lock in wait() <0x00000000cd41e1f0> (a io.netty.util.concurrent.DefaultPromise)
           at io.netty.util.concurrent.DefaultPromise.get(DefaultPromise.java:337)
           at org.apache.pulsar.client.impl.PulsarClientImpl.shutdownEventLoopGroup(PulsarClientImpl.java:779)
           at org.apache.pulsar.client.impl.PulsarClientImpl.shutdown(PulsarClientImpl.java:717)
           at org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.internalCleanup(MockedPulsarServiceBaseTest.j
   ava:192)
           at org.apache.pulsar.broker.admin.v1.V1_AdminApiTest$MockedPulsarService.cleanup(V1_AdminApiTest.java:1953
   )
           at org.apache.pulsar.broker.admin.v1.V1_AdminApiTest.cleanup(V1_AdminApiTest.java:178)
   ```
   
   **Expected behavior**
   
   Shutdown should complete after a reasonable timeout, for example 60 seconds.
   
   **Additional context**
   
   Full thread dump at https://jstack.review/?https://gist.github.com/lhotari/d8c6039c54e7f107876b652f98181792#tda_1_dump


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #10784: [Java client] PulsarClientImpl.shutdown sporadically hangs

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #10784:
URL: https://github.com/apache/pulsar/issues/10784#issuecomment-1058889785


   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on issue #10784: [Java client] PulsarClientImpl.shutdown sporadically hangs

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #10784:
URL: https://github.com/apache/pulsar/issues/10784#issuecomment-858707889


   Maybe We should set timeout in Future.get() method? am i right?
   ```
   private void shutdownEventLoopGroup(EventLoopGroup eventLoopGroup) throws PulsarClientException {
           if (createdEventLoopGroup && eventLoopGroup != null && !eventLoopGroup.isShutdown()) {
               try {
                   eventLoopGroup.shutdownGracefully().get(60, Timeunit.seconds);
               } catch (Throwable t) {
                   throw PulsarClientException.unwrap(t);
               }
           }
       }
   ```


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin removed a comment on issue #10784: [Java client] PulsarClientImpl.shutdown sporadically hangs

Posted by GitBox <gi...@apache.org>.
gaozhangmin removed a comment on issue #10784:
URL: https://github.com/apache/pulsar/issues/10784#issuecomment-858698484


   Maybe We should set timeout in Future.get() method? am i right?
   ```
   private void shutdownEventLoopGroup(EventLoopGroup eventLoopGroup) throws PulsarClientException {
           if (createdEventLoopGroup && eventLoopGroup != null && !eventLoopGroup.isShutdown()) {
               try {
                   eventLoopGroup.shutdownGracefully().get(60, );
               } catch (Throwable t) {
                   throw PulsarClientException.unwrap(t);
               }
           }
       }
   ```


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on issue #10784: [Java client] PulsarClientImpl.shutdown sporadically hangs

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #10784:
URL: https://github.com/apache/pulsar/issues/10784#issuecomment-858698484


   Maybe We should set timeout in Future.get() method? am i right?
   ```
   private void shutdownEventLoopGroup(EventLoopGroup eventLoopGroup) throws PulsarClientException {
           if (createdEventLoopGroup && eventLoopGroup != null && !eventLoopGroup.isShutdown()) {
               try {
                   eventLoopGroup.shutdownGracefully().get(60, );
               } catch (Throwable t) {
                   throw PulsarClientException.unwrap(t);
               }
           }
       }
   ```


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org