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 2020/07/08 08:50:53 UTC

[GitHub] [pulsar] ltamber opened a new issue #7478: pulsar-admin reset cursor hangs

ltamber opened a new issue #7478:
URL: https://github.com/apache/pulsar/issues/7478


   **Describe the bug**
   the thread stack below is one of pulsar-web thread pool.
   ```java
   "pulsar-web-54-19" #450 prio=5 os_prio=0 tid=0x00007fcbb40b7000 nid=0x1db1 waiting on condition [0x00007fc946584000]
      java.lang.Thread.State: WAITING (parking)
           at sun.misc.Unsafe.park(Native Method)
           - parking to wait for  <0x000000070021c320> (a java.util.concurrent.CompletableFuture$Signaller)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
           at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1693)
           at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
           at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1729)
           at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
           at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalResetCursorOnPosition(PersistentTopicsBase.java:1802)
           at org.apache.pulsar.broker.admin.v2.PersistentTopics.resetCursorOnPosition(PersistentTopics.java:890)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
           at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$$Lambda$300/1032656803.invoke(Unknown Source)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
           at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:183)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
           at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
           at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
           at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
           at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
           at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
           at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
           at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
           at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
           at org.apache.pulsar.broker.web.ResponseHandlerFilter.doFilter(ResponseHandlerFilter.java:53)
           at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1591)
           at org.apache.pulsar.broker.intercept.BrokerInterceptor$BrokerInterceptorDisabled.onWebServiceRequest(BrokerInterceptor.java:73)
           at org.apache.pulsar.broker.web.EventListenerFilter.doFilter(EventListenerFilter.java:46)
           at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1591)
           at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
           at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
           at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
           at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
           at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
           at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
           at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
           at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
           at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
           at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:173)
           at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.Server.handle(Server.java:494)
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
           at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
           at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
           at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
           at java.lang.Thread.run(Thread.java:748)
   
      Locked ownable synchronizers:
           - <0x000000070021c950> (a java.util.concurrent.ThreadPoolExecutor$Worker)
   ```
   
   


----------------------------------------------------------------
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 #7478: pulsar-admin reset cursor hangs

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


   @ltamber Are you interested in fixing this problem? looks the problem is `sub.resetCursor(PositionImpl.get(messageId.getLedgerId(), messageId.getEntryId())).get();` can't complete and there are no timeout the the `future.get()`. It's better to change all logic of the reset cursor to async.


----------------------------------------------------------------
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] jiawulin001 commented on issue #7478: pulsar-admin reset cursor hangs

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


   @codelipenghui 
   I'm thinking if we should introduce a timeout mechanism to avoid this problem instead of changing the logic to async? Since asynchronously resetting the cursor might return a response directly before it actually finish the work, and may influence the order of code execution on client side and lead to unexpected outcome.


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