开发者

How can I programatically recreate these Websphere logs due to Unsynchronized access to HashMap

开发者 https://www.devze.com 2023-04-10 00:56 出处:网络
We have few com开发者_开发知识库ponents in our project extending the HashMap Due to unsynchronized access to the HashMap object we are getting the logs like the below one in Production:

We have few com开发者_开发知识库ponents in our project extending the HashMap Due to unsynchronized access to the HashMap object we are getting the logs like the below one in Production:

    ThreadMonitor W WSVR0605W:Thread "webcontainer:5" has been active for 864096 milliseconds and may be hung.There is/are 5 thread(s) in the total server that may be hung.
    at java.util.HashMap.findNonNullKeyEntry(HashMap.java:525)
    at java.util.HashMap.putImpl(HashMap.java:622)
    at java.util.HashMap.put(HashMap.java:605

).......

I want to recreate this for the testing purpose and tried spawning different threads putting and getting the HashMap object, but still no breakthroughs. Also, I have set loadfactor to 0.1 so that resizing of the HashMap will occur more frequently,which we are analysing is causing the issue(Structural changes in the HahMap).

We are using IBM java version 6

Could anyone help me on this?


I think you can refer to the code by gwoolsey at the url below [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6611637] I hope this will help. I was able to reproduce the problem with this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号