0
votes

We have JSF2.1 app deployed in weblogic10.3.4 ,in one of our backing bean ,when we try to assign the reference ArrayList to a List instance ,weblogic ends up in Struck thread ,during peak traffic to our application.

java.util.ArrayList.indexOf(ArrayList.java:210)
java.util.ArrayList.contains(ArrayList.java:199)

Any one has faced this issue before.

1

1 Answers

1
votes

It is not entirely clear what you mean, so I'm going to assume that you mean a "stuck thread", and that the thread is stuck in the sense that it is continually executing at that point.

I can think of three plausible causes.

  • The object that is being searched for has a buggy equals(Object) method that in some circumstances goes into an infinite loop.

  • There are two (or more) threads accessing and/or updating the list roughly simultaneously, and you are not synchronizing properly. If you don't synchronize properly, there is a risk that the threads will see inconsistent views of the data structure, and that that will cause it behave in a way that seems impossible.

  • You've somehow set up a pathological situation that is causing one thread to be both reading and updating the list in the (incorrect) belief that it has two distinct lists.

My bet is that it is the second problem, since "heisenbugs" like that are more likely to occur when your server is under heavy load.


Finally, it is possible that the thread is not in an infinite loop, but is just taking a long time to do something. And it is possible that the loop involves other code, but each time you look at it is at that point.