rabbitmq-java-client icon indicating copy to clipboard operation
rabbitmq-java-client copied to clipboard

locked <0x00000000f8cbd8c8> (a com.rabbitmq.utility.BlockingValueOrException)

Open liwenxian opened this issue 9 years ago • 4 comments

jstack

"localhost-startStop-1" #20 daemon prio=5 os_prio=0 tid=0x00007f1c88002000 nid=0x74fa in Object.wait() [0x00007f1d01720000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:50) - locked <0x00000000f8cbd8c8> (a com.rabbitmq.utility.BlockingValueOrException) at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:89) - locked <0x00000000f8cbd8c8> (a com.rabbitmq.utility.BlockingValueOrException) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:361) at com.rabbitmq.client.impl.ChannelN.basicConsume(ChannelN.java:1117) at com.rabbitmq.client.impl.ChannelN.basicConsume(ChannelN.java:1087) at com.rabbitmq.client.impl.ChannelN.basicConsume(ChannelN.java:1071) at com.bbtree.mq.core.MqChannel.consume(MqChannel.java:49) at com.bbtree.mq.core.MqChannel.consume(MqChannel.java:44)

liwenxian avatar May 02 '17 11:05 liwenxian

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes two things:

  1. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team)
  2. We have a certain amount of information to work with

We get at least a dozen of questions through various venues every single day, often quite light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions fofor potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.

Getting all the details necessary to make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing as much relevant information as possible on the list:

  • Server, client library and plugin (if applicable) versions used
  • Server logs
  • A code example or terminal transcript that can be used to reproduce
  • Full exception stack traces (not a single line message)
  • rabbitmqctl status (and, if possible, rabbitmqctl environment output)
  • Other relevant things about the environment and workload, e.g. a traffic capture

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have enough details and evidence we'd be happy to file a new issue.

Thank you.

michaelklishin avatar May 02 '17 11:05 michaelklishin

Channel#basicConsume is a synchronous operation in the protocol, which means it expects a response and will use a BlockingCell (continuation) to wait until one arrives. There can be plenty of reasons why it doesn't happen in a reasonable amount of time.

Unfortunately we cannot suggest more with the amount of information provided. This is mailing list material.

michaelklishin avatar May 02 '17 11:05 michaelklishin

@liwenxian 我也遇到了这样的问题,是因为消费消息的时候同时发送消息了,恰好这个发送队列是个僵死队列(不响应任何操作),在txCommit后,消费线程一直等待服务器返回结果,出现了和你差不多的堆栈。 "SimpleAsyncTaskExecutor-36" - Thread t@633616 java.lang.Thread.State: WAITING at java.lang.Object.wait(Native Method) - waiting on <6442c565> (a com.rabbitmq.utility.BlockingValueOrException) at java.lang.Object.wait(Object.java:485) at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:50) at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:89) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343) at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:216) at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:118) at com.rabbitmq.client.impl.ChannelN.txCommit(ChannelN.java:1004) at com.rabbitmq.client.impl.ChannelN.txCommit(ChannelN.java:61) at sun.reflect.GeneratedMethodAccessor1854.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:348) - locked <5eb23e70> (a java.lang.Object) at $Proxy47.txCommit(Unknown Source) at org.springframework.amqp.rabbit.connection.RabbitUtils.commitIfNecessary(RabbitUtils.java:85) at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.commitIfNecessary(BlockingQueueConsumer.java:438) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:481) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:455) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$300(SimpleMessageListenerContainer.java:58) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:548) at java.lang.Thread.run(Thread.java:662)

niomac avatar Oct 17 '18 06:10 niomac

Hi, I have almost the same situation.Spring Boot stuck when init.

But after wait for some time, some more clear error throw.Something like below.Then it turn out to be a RabbitMQ Server issue(You may just try a restart)

Caused by: org.springframework.amqp.AmqpTimeoutException: java.util.concurrent.TimeoutException
	at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:74) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
	at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:509) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:682) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

hh3755 avatar May 24 '21 09:05 hh3755