Comments (6)
现在程序不处理消息,但是CPU仍然刚好100%, 以及根据上面的堆栈,代码。 推断应该是死循环。
from metamorphosis.
不容易也容易(183167601) 15:01:14
item == null的时候 可能会死循环
这个 会是null么
小规模(245885697) 15:02:49
那个队列比较抽象,不知道对应的业务消息是什么
所以不好整
不容易也容易(183167601) 15:03:31
那就只能问作者了 这个类起的名字和jdk里的一样
小规模(245885697) 15:03:36
如果是一般的逻辑就好看了
小规模(245885697) 15:08:04
到社区上提个单跟踪一下
吧
from metamorphosis.
注意堆栈信息,并不是卡在队列的next方法,而是队列迭代器的构造函数中。
at com.taobao.gecko.core.util.LinkedTransferQueue$Itr.advance(LinkedTransferQueue.java:714)
at com.taobao.gecko.core.util.LinkedTransferQueue$Itr.(LinkedTransferQueue.java:691)
at com.taobao.gecko.core.util.LinkedTransferQueue.iterator(LinkedTransferQueue.java:673)
at com.taobao.gecko.core.core.impl.AbstractSession.close0(AbstractSession.java:350)
from metamorphosis.
你能确认在这种情况下,进程的GC情况和内存使用情况,我怀疑是OOM了。
from metamorphosis.
RES:1.6G
-Xmx=2048m
jmap 信息:
num #instances #bytes class name
1: 2952836 415622496 [Ljava.util.concurrent.ConcurrentHashMap$HashEntry;
2: 239339 175449112 [B
3: 2952820 118112800 java.util.concurrent.ConcurrentHashMap$Segment
4: 3127193 100070176 java.util.concurrent.locks.ReentrantLock$NonfairSync
5: 38515 77359288 [I
6: 1174647 46985880 java.util.HashMap$KeyIterator
7: 283385 38623656 [Ljava.lang.Object;
8: 207652 16604960 [Ljava.util.HashMap$Entry;
9: 184553 14764128 [Ljava.util.concurrent.ConcurrentHashMap$Segment;
10: 142390 11316576 [S
11: 172107 11014848 com.taobao.gecko.service.callback.SingleRequestCallBack
12: 335853 10747296 java.util.concurrent.ConcurrentHashMap$HashEntry
13: 81049 10012480 [C
14: 207465 9958320 java.util.HashMap
15: 172315 9649640 com.taobao.gecko.core.nio.impl.TimerRef
16: 184553 8858544 java.util.concurrent.ConcurrentHashMap
17: 179494 7179760 com.taobao.metamorphosis.network.PutCommand
18: 215756 6904192 java.util.HashMap$Entry
19: 170667 6826680 com.taobao.metamorphosis.Message
20: 180951 5790432 com.taobao.gecko.core.core.impl.FutureImpl
21: 172107 5507424 java.util.concurrent.CountDownLatch$Sync
22: 227950 5470800 java.util.Collections$UnmodifiableCollection$1
23: 170667 5461344 com.taobao.metamorphosis.client.producer.SimpleMessageProducer$1
24: 201764 4842336 org.apache.flume.event.SimpleEvent
25: 200738 4817712 org.apache.flume.sink.MetaSink$EventStat
26: 137186 4389952 com.taobao.gecko.service.exception.NotifyRemotingException
27: 172107 4130568 com.taobao.gecko.service.impl.DefaultConnection$SingleRequestCallBackRunner
28: 170667 4096008 org.apache.flume.sink.MetaSink$MyCallback
29: 24747 3374008
30: 24747 3365048
31: 198551 3176816 java.lang.Integer
32: 192142 3074272 java.lang.Object
33: 174221 2787536 java.util.concurrent.locks.ReentrantLock
34: 172107 2753712 java.util.concurrent.CountDownLatch
35: 170667 2730672 com.taobao.metamorphosis.network.PutCommand$1
36: 2173 2292160
37: 36402 1971032
38: 58488 1871616 java.lang.String
39: 2173 1621144
40: 1858 1385168
41: 39113 1251616 java.util.concurrent.locks.AbstractQueuedSynchronizer$Node
42: 15496 743808 java.nio.HeapByteBuffer
43: 30166 723984 java.util.concurrent.LinkedBlockingQueue$Node
44: 18870 603840 java.lang.StackTraceElement
from metamorphosis.
jstat -gcutil 看看,明显是OOM了,不work了。
from metamorphosis.
Related Issues (20)
- 如何发送定时消息 HOT 1
- Query pending messages shows negative consumed messages
- 不停的创建新线程直至资源耗尽 HOT 5
- 关于consumer 安全消费的问题 HOT 1
- Spring配置共享订阅者方式中的问题
- Send message timeout时不能自动恢复的问题
- Metamorphosis 分布式事务支持 HOT 1
- Consumer消费失败问题
- Offset存储异常问题
- Offset存储Mysql异常问题
- 与Storm0.10集成出错
- zk每个两三天就会过期重连 HOT 2
- 发送消息的主题不能自定义吗? HOT 7
- MetaQ接收数据客户端进入死循环 HOT 2
- 这么通用的中间件,原码为何不用utf-8,而用GBK?造成编译很容易出问题。 HOT 3
- 是否支持一条消息多个消费点 同时消费
- 如何发送延时消息 HOT 1
- 图挂了 HOT 1
- Inconsistent library versions notice.
- 关于MessageConsumer shutdown的问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metamorphosis.