qiaofazhan commented on issue #21900:
URL: https://github.com/apache/pulsar/issues/21900#issuecomment-1891626912

   > @qiaofazhan There's a chance that this is a bug in Apache Eventmesh. I 
noticed from the thread dump that Apache Eventmesh is used, perhaps version 
v1.8.0 . The producer cache within Eventmesh uses java.util.HashMap which isn't 
thread safe. 
https://github.com/apache/eventmesh/blob/63ac4ec808933a64b048a3988f6c91671d2bc41a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/client/PulsarClientWrapper.java#L47
 I'd assume that a ConcurrentHashMap should be used if Eventmesh uses multiple 
threads. This is a bug that should be reported to Apache Eventmesh.
   
   
   ========================
   thanks, but I use concurrentHap for that problem .  And there are some other 
dump info:
   
   "pulsar-client-io-112-1" #286 daemon prio=5 os_prio=0 cpu=64764.93ms 
elapsed=128885.97s tid=0x00007f66c407be40 nid=0x17e waiting for monitor entry  
[0x00007f661458b000]
      java.lang.Thread.State: BLOCKED (on object monitor)
           at 
org.apache.pulsar.client.impl.ProducerImpl.closeAndClearPendingMessages(ProducerImpl.java:1092)
           - waiting to lock <0x000000064b01bde8> (a 
org.apache.pulsar.client.impl.ProducerImpl)
           at 
org.apache.pulsar.client.impl.ProducerImpl.lambda$closeAsync$10(ProducerImpl.java:1079)
           at 
org.apache.pulsar.client.impl.ProducerImpl$$Lambda$782/0x0000000840948c40.apply(Unknown
 Source)
           at 
java.util.concurrent.CompletableFuture.uniHandle([email protected]/CompletableFuture.java:930)
           at 
java.util.concurrent.CompletableFuture$UniHandle.tryFire([email protected]/CompletableFuture.java:907)
           at 
java.util.concurrent.CompletableFuture.postComplete([email protected]/CompletableFuture.java:506)
           at 
java.util.concurrent.CompletableFuture.complete([email protected]/CompletableFuture.java:2073)
           at 
org.apache.pulsar.client.impl.ClientCnx.handleSuccess(ClientCnx.java:533)
           at 
org.apache.pulsar.common.protocol.PulsarDecoder.channelRead(PulsarDecoder.java:252)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
           at 
org.apache.pulsar.shade.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
           at 
org.apache.pulsar.shade.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
           at 
org.apache.pulsar.shade.io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
           at 
org.apache.pulsar.shade.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
           at 
org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
           at 
org.apache.pulsar.shade.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
           at 
org.apache.pulsar.shade.io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
           at 
org.apache.pulsar.shade.io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499)
           at 
org.apache.pulsar.shade.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397)
           at 
org.apache.pulsar.shade.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
           at 
org.apache.pulsar.shade.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
           at 
org.apache.pulsar.shade.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
           at java.lang.Thread.run([email protected]/Thread.java:829)
   
      Locked ownable synchronizers:
           - None


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