]
Jay Howell updated JBAS-6310:
-----------------------------
Component/s: ClassLoading
Fix Version/s: JBossAS-4.2.4.GA
Affects Version/s: JBossAS-4.2.3.GA
Failure in loading classes due to thread stack overflow should be
logged as an error.
-------------------------------------------------------------------------------------
Key: JBAS-6310
URL:
https://jira.jboss.org/jira/browse/JBAS-6310
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: ClassLoading
Affects Versions: JBossAS-4.2.3.GA
Reporter: Jay Howell
Fix For: JBossAS-4.2.4.GA
in org.jboss.mx.loading.LoadMgr3, there is an error message that is a trace statement and
probably should be an error statement.
catch(Throwable e)
{
boolean retry = e instanceof ClassCircularityError
|| e.getClass().equals(LinkageError.class);
int numCCE = loadTask.incNumCCE();
if( retry && numCCE <= 10 )
{
/* Reschedule this task after all existing tasks to allow the
current load tasks which are conflicting to complete.
*/
try
{
if( trace )
log.trace("Run failed with exception", e);
// Reschedule and update the loadTask.threadTaskCount
scheduleTask(loadTask, ucl3, Integer.MAX_VALUE, true, trace);
}
The problem that we ran into is that we have a customer that is using an IBM application.
It seems that this IBM application has lots of logic in static initializers and it causes
the Stack to blow up at 128 k. The task is retried and eventually succeeds, but this
causes a race condition where things are not loaded when they should be and they get class
not found exceptions.
This was not easy to find, but the customer enabled trace and saw the message where the
stack overflowed. The fix is to increase thread stack, but it was difficult to find
since it was a trace statement and not an error. I would suggest the following fix...
if( trace )
log.trace("Retrying a failed loader task that failed with
exception", e);
// Reschedule and update the loadTask.threadTaskCount
The trace statement was
2008-12-04 13:29:12,404 TRACE [org.jboss.mx.loading.LoadMgr3] Run failed with exception
java.lang.StackOverflowError
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
at java.io.File.exists(File.java:702)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:893)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: