#1500 org/jboss/mx/loading/LoadMgr.java deadlock

v3.2
closed-fixed
Scott M Stark
JBossMX (91)
5
2004-04-25
2003-09-01
sal ingrilli
No

JBOSS: Release ID: JBoss [WonderLand] 3.2.1 (build:
CVSTag=JBoss_3_2_1 date=200305041533)
OS: Microsoft Windows XP [Version 5.1.2600]
CPU: Intel pentium 4 3Ghz, with hyperthreading
JVM: java version "1.3.1_02", 1.3.1_02-b02
Stack traces: attached
Related issues: 662098

I have 2 threads, each issuing a Class.forName ()
through the following util:

public static Class forName (final String className)
throws ClassNotFoundException {

final Thread currentThread = Thread.currentThread ();
final ClassLoader classLoader =
currentThread.getContextClassLoader ();
final Class newClass = classLoader.loadClass
(className);
return newClass;
}

I get a deadlock in the JBoss LoadMgr quite regularly
during startup.

Discussion

  • sal ingrilli
    sal ingrilli
    2003-09-01

    LoadMgr.nextTask.deadlock.txt

     
  • Scott M Stark
    Scott M Stark
    2003-09-02

    Logged In: YES
    user_id=175228

    Attach a thread dump of the deadlock.

     
  • sal ingrilli
    sal ingrilli
    2003-09-02

    Logged In: YES
    user_id=396317

    i attached LoadMgr.nextTask.deadlock.txt in the original post.
    it contains the traces of 2 threads stuck in LoadMgr.nextTask
    ()
    if you need something different, just shoot & i'll get it to you.

     
  • Scott M Stark
    Scott M Stark
    2003-09-02

    Logged In: YES
    user_id=175228

    I'm going to need the trace level log as described in the
    docs section on class loading debugging.

     
  • sal ingrilli
    sal ingrilli
    2003-09-02

     
    Attachments
  • sal ingrilli
    sal ingrilli
    2003-09-03

    Logged In: YES
    user_id=396317

    i attached ucl.log on 9/2 but didn't see an email notification
    for it. so this is just to generate the notification.

     
  • Scott M Stark
    Scott M Stark
    2003-09-04

    Logged In: YES
    user_id=175228

    The log file only has 3 lines in it. See this link
    https://sourceforge.net/docman/display_doc.php?docid=14918&group_id=22866
    for how to configure the trace level logging. It requires
    putting the following into the conf/log4j.xml file:

    <appender name="UCL" class="org.apache.log4j.FileAppender">
    <param name="File"
    value="${jboss.server.home.dir}/log/ucl.log"/>
    <param name="Append" value="false"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern"
    value="[%r,%c{1},%t] %m%n"/>
    </layout>
    </appender>
    <category name="org.jboss.mx.loading" additivity="false">
    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
    <appender-ref ref="UCL"/>
    </category>

     
  • Scott M Stark
    Scott M Stark
    2003-09-04

    • assigned_to: nobody --> starksm
     
  • sal ingrilli
    sal ingrilli
    2003-09-10

    Logged In: YES
    user_id=396317

    Attached is a zipped 18Mb ucl.log

     
  • Scott M Stark
    Scott M Stark
    2003-09-10

    Logged In: YES
    user_id=175228

    This will not fit as an attachment. Send to me directly at
    scott@jboss.org

     
  • Scott M Stark
    Scott M Stark
    2003-10-13

    • status: open --> closed-works-for-me
     
  • Scott M Stark
    Scott M Stark
    2003-10-13

    Logged In: YES
    user_id=175228

    Reopen when you have a log that shows the deadlock.

     
  • sal ingrilli
    sal ingrilli
    2004-01-24

    Logged In: YES
    user_id=396317

    JBOSS: Release ID: JBoss [WonderLand] 3.2.1 (build:
    CVSTag=JBoss_3_2_1 date=200305041533)
    OS: Microsoft Windows XP [Version 5.1.2600]
    CPU: Intel pentium 4 3Ghz
    JVM: java version "1.3.1_02", 1.3.1_02-b02
    Stack traces: attached
    Related issues: 662098

    Scott:

    I was finally able to recreate this with UCL tracing ON as you
    had requested.

    Let me know what else I can do to help resolve this.

    Sal.

     
  • sal ingrilli
    sal ingrilli
    2004-01-24

    • status: closed-works-for-me --> open-works-for-me
     
  • Scott M Stark
    Scott M Stark
    2004-01-24

    Logged In: YES
    user_id=175228

    I need the ucl.log zipped up and sent to scott.stark@jboss.org

     
  • Scott M Stark
    Scott M Stark
    2004-04-25

    • status: open-works-for-me --> closed-fixed
     
  • Scott M Stark
    Scott M Stark
    2004-04-25

    Logged In: YES
    user_id=175228

    Someone submitted a testcase that demonstrated a way to
    deadlock the class loaders and this has been fixed for
    3.2.4RC2. Try that version when its out next week.