It's not a secret anymore!*
The moose likes Tomcat and the fly likes Massive array of ints Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Massive array of ints" Watch "Massive array of ints" New topic
Author

Massive array of ints

Randy Yarger
Greenhorn

Joined: Feb 13, 2007
Posts: 6
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

Joined: Jun 25, 2001
Posts: 15959
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Massive array of ints
 
Similar Threads
Cause of memory leaks in Tomcat
View the objects which are getting stored in permgen and total non heap space
Sun Cirtification
Infinite loop or deadlock in finalize()
Reading 600 mb size text file