Details
-
Bug
-
Resolution: Done
-
Major
-
4.2.0.GA_CP05, 4.3.0.GA_CP03
-
None
-
Workaround Exists
-
Description
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.error("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)
Attachments
Issue Links
- is blocked by
-
JBAS-6310 Failure in loading classes due to thread stack overflow should be logged as an error.
- Closed
- is related to
-
JBPAPP-1960 Reduce level of additional logging in JBPAPP-1491
- Closed