Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Massive array of ints

 
Randy Yarger
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm debugging an application running on Tomcat 7 that is proving to be extremely unstable. I see three of the four typical causes for site failure regularly: runaway CPU consumption, deadlocked threads and OutOfMemory conditions (about the only thing I don't see is DAO connection issues).

In the heapdump for crashes that happen due to OutOfMemory, I consistently see that a large portion of the heap (80%+) is taken up by a single object - an array of ints that is referenced (apparently) directly from org.apache.tomcat.util.threads.TaskThread. I've seen more than half billion elements in this array, causing it to take up gigabytes of heap space. When viewing the heap summary through YourKit, this object is listed as unreachable.

The application itself doesn't use int arrays to store anything, at least explicitly.

Any ideas where these may be coming from? I seem to remember reading that Expression Language elements can cause problems in newer versions of Tomcat but I can find little reference to this on Google. This intrigues me because when the servers die due to thread deadlocks, there are almost always thread blocked in the middle of EL evaluation. Could the EL engine be sharing space somehow and getting tangled up?

Any ideas would be appreciated!

-Randy Yarger
MICROS-Retail
ryarger@micros-retail.com
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18165
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya got me, podner.

There's nothing I know of that should be causing this. I'd be interested in finding out what's going on myself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic