Tropo vs Twilio

At year 2009 I start using Tropo to build a voice channel of a Expert System, the system was designed with a complex rule engine, the interaction is asked to be do in a asynchronous way - the backend rule engine is able to interrupt the running call session with event. This make us having to choose Tropo, which support the asynchronous event. Of course, this product is using Java.

Continue reading Tropo vs Twilio

InfoQ 文章 Hunting Java Concurrency Bugs

http://www.infoq.com/articles/Hunting-Concurrency-Bugs-1

 

这篇文章很值得一读。

 

主要讨论了openJDK(注意文中没有说明Oracle JDK也有相同问题)自身存在的问题,以及分析问题的艰辛过程。

 

第一个问题是1.7.0_40 之前存在的多线程下造成livelock,jstack无响应。

 

第二个问题是HashMap的OOM,多线程下操作引起循环指针在序列化的情况下出现OOM。

 

这个问题出现后还好有个10G 的heapdump,文件太大不能工具直接分析,直接看文件分析可能是循环指针序列化造成的,尝试使用ObjectInputStream读出,但是由于其本机没有生产环境所有的类(造业),此路不通,最后通过unix的strings工具获得反序列化的字符串,得知是个hashmap。

他们在本机尝试多线程操作hashmap引起崩溃,重现了问题。最后将hashmap改为java.util.concurrent.ConcurrentHashMap解决问题。

 

评论中提到JCStress

http://www.oschina.net/translate/concurrency-torture-testing-your-code-within-the-java-memory-model

Continue reading InfoQ 文章 Hunting Java Concurrency Bugs

Pagination


Total views.

© 2013 - 2018. All rights reserved.

Powered by Hydejack v6.6.1