glassfish
  1. glassfish
  2. GLASSFISH-19130

Timer Creating "Active" Transactions in Transaction Service Monitor - Memory Leak

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.0_b60
    • Component/s: jts
    • Labels:
      None

      Description

      After much isolation trying to pin down a memory leak I've gotten to what may be the root cause. We have the monitoring level set to HIGH for the Transaction Service and are using 3.1.2.2 build 5.

      If I create a simple stateless bean that contains a method with a @Schedule annotation:

      @Schedule(second = "", minute = "", hour = "", dayOfWeek = "", dayOfMonth = "", month = "", year = "*", info = "MasterScheduler")

      This will cause the Transaction Service monitor to note an "active transaction" every time the timer is invoked.

      Over the course of a day there's a noticeable memory leak and it will eventually run out of memory.

      If we turn the monitoring level for the Transaction Service to OFF it goes away.

        Activity

        Hide
        marina vatkina added a comment -

        Actually, concurrency might not be an issue, but the way transactions are committed - if they become XA transactions during commit, the monitoring table isn't updated, and the XA transaction can't be removed.

        Show
        marina vatkina added a comment - Actually, concurrency might not be an issue, but the way transactions are committed - if they become XA transactions during commit, the monitoring table isn't updated, and the XA transaction can't be removed.
        Hide
        marina vatkina added a comment -

        Can you try attached jars (you need both) with your 3.1.2 install? If you are using the trunk build, the fix will be available after the checkin.

        Show
        marina vatkina added a comment - Can you try attached jars (you need both) with your 3.1.2 install? If you are using the trunk build, the fix will be available after the checkin.
        Hide
        marina vatkina added a comment -

        Fixed with
        Sending transaction/jta/src/main/java/com/sun/enterprise/transaction/JavaEETransactionImpl.java
        Sending transaction/jta/src/main/java/com/sun/enterprise/transaction/JavaEETransactionManagerSimplified.java
        Sending transaction/jts/src/main/java/com/sun/enterprise/transaction/jts/JavaEETransactionManagerJTSDelegate.java
        Transmitting file data ...
        Committed revision 56702.

        Note that the changes include some cleanup in addition to the actual fix, which was to move monitoring table update to JavaEETransactionImpl (before it clears jtsTx ref)

        Show
        marina vatkina added a comment - Fixed with Sending transaction/jta/src/main/java/com/sun/enterprise/transaction/JavaEETransactionImpl.java Sending transaction/jta/src/main/java/com/sun/enterprise/transaction/JavaEETransactionManagerSimplified.java Sending transaction/jts/src/main/java/com/sun/enterprise/transaction/jts/JavaEETransactionManagerJTSDelegate.java Transmitting file data ... Committed revision 56702. Note that the changes include some cleanup in addition to the actual fix, which was to move monitoring table update to JavaEETransactionImpl (before it clears jtsTx ref)
        Hide
        hapi added a comment -

        I can confirm (somewhat belatedly) that the attached jars did seem to solve the problem.

        Will this be a part of some future sub-release? 3.1.2.3?

        Show
        hapi added a comment - I can confirm (somewhat belatedly) that the attached jars did seem to solve the problem. Will this be a part of some future sub-release? 3.1.2.3?
        Hide
        marina vatkina added a comment -

        If there is a public release for 3.1.2.x, then yes. Otherwise you can get a patch from Oracle sustaining if you have a support contract.

        Show
        marina vatkina added a comment - If there is a public release for 3.1.2.x, then yes. Otherwise you can get a patch from Oracle sustaining if you have a support contract.

          People

          • Assignee:
            marina vatkina
            Reporter:
            hapi
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: