Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-772

Thread local storage keeping reference to an org.infinispan.context.impl.LocalTxInvocationContext

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.CR1
    • None
    • None
    • None

      I'm seeing the following sequence of invocations during AS cluster classloader leak unit tests:

      1. InvocationContextContainerImpl.createInvocationContext creates a new
      LocalTxInvocationContext (lets call it #3011) and sets thread local
      (icTL) to it.

      2. InvocationContextContainerImpl.suspend() LocalTxInvocationContext
      #3011 which clears the thread local reference.

      3. We InvocationContextContainerImpl.resume() LocalTxInvocationContext
      #3011 which sets the thread local reference.

      4. We InvocationContextContainerImpl.suspend() LocalTxInvocationContext
      #3011 which clears the thread local reference.

      5. We InvocationContextContainerImpl.resume() LocalTxInvocationContext
      #3011 which sets the thread local reference.

      I don't see another suspend call, so LocalTxInvocationContext #3011 is
      still referenced by the thread local InvocationContextContainerImpl.icTL which keeps the classloader in memory (the icTL reference is the only reference to the classloader).

      Call stack showing where the LocalTxInvocationContext was created from http://pastie.org/1300157

              manik_jira Manik Surtani (Inactive)
              smarlow1@redhat.com Scott Marlow
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: