Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Possible listOfDeferencedIpids memory leak

Help
2014-04-30
2014-05-13
  • Alexey Gershun
    Alexey Gershun
    2014-04-30

    Hi,

    I am using j-interop 3.0.0 version and there are 4 DCs connected.
    When inspecting the dump file (Eclipse, MAT plugin) I've found three JISession instances (out of total ) consume ~300MB of memory.

    Taking one instance for example:

    "Leak suspect: One instance of "org.jinterop.dcom.core.JISession" loaded by "sun.misc.Launcher$AppClassLoader @ 0x34cfd190" occupies 125,504,848 (36.08%) bytes."
    Retained Heap Size of "listOfDeferencedIpids" is 119.7 MB
    Total number of keys (String hashes) is 770,963

    Instances grouped by JISession class:
    Class Name | Objects | Shallow Heap | Retained Heap


    .JISession. | | |
    org.jinterop.dcom.core.JISession$IPID_SessionID_Holder | 2,807 | 67,368 | >= 112,280
    org.jinterop.dcom.core.JISession | 15 | 1,080 | >= 283,538,272
    org.jinterop.dcom.core.JISession$Release_References_TimerTask| 1 | 32 | >= 32
    org.jinterop.dcom.core.JISession$2 | 1 | 8 | >= 8
    org.jinterop.dcom.core.JISession$1 | 1 | 8 | >= 8
    Total: 5 entries (2,289 filtered) | 2,825 | 68,496 |


    Seems like the same issue https://sourceforge.net/p/j-interop/discussion/600729/thread/aadbdd09/
    How can I debug the issue? Any bug opened for this?

    Thank you

     
    • Hi,

      This could be a bug, if the ipids are dereferenced, they should be cleaned
      up (by DCOM calls) and then this list cleared.

      Can you please elaborate on your scenario a bit more ? How many COM servers
      are you connected too ? What is the frequency of calls being made ? and the
      likes ... dumping the log file (at FINEST level and not encrypted) will
      also help.

      best regards,
      Vikram

      On Wed, Apr 30, 2014 at 7:44 PM, Alexey Gershun gershun@users.sf.netwrote:

      Hi,

      I am using j-interop 3.0.0 version and there are 4 DCs connected.
      When inspecting the dump file (Eclipse, MAT plugin) I've found three
      JISession instances (out of total ) consume ~300MB of memory.

      Taking one instance for example:

      "Leak suspect: One instance of "org.jinterop.dcom.core.JISession" loaded
      by "sun.misc.Launcher$AppClassLoader @ 0x34cfd190" occupies 125,504,848
      (36.08%) bytes."
      Retained Heap Size of "listOfDeferencedIpids" is 119.7 MB
      Total number of keys (String hashes) is 770,963

      Instances grouped by JISession class:
      Class Name | Objects | Shallow Heap | Retained Heap


      .JISession. | | |
      org.jinterop.dcom.core.JISession$IPID_SessionID_Holder | 2,807 | 67,368 |

      = 112,280
      org.jinterop.dcom.core.JISession | 15 | 1,080 | >= 283,538,272
      org.jinterop.dcom.core.JISession$Release_References_TimerTask| 1 | 32 | >=
      32
      org.jinterop.dcom.core.JISession$2 | 1 | 8 | >= 8
      org.jinterop.dcom.core.JISession$1 | 1 | 8 | >= 8
      Total: 5 entries (2,289 filtered) | 2,825 | 68,496 |


      Seems like the same issue
      https://sourceforge.net/p/j-interop/discussion/600729/thread/aadbdd09/
      How can I debug the issue? Any bug opened for this?

      Thank you

      Possible listOfDeferencedIpids memory leakhttps://sourceforge.net/p/j-interop/discussion/600730/thread/7c1cd7c1/?limit=25#736a

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/j-interop/discussion/600730/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      The Mind is a place of its own. It can make a heaven out of hell or a hell
      out of heaven. Attitude is everything. No matter how adverse conditions
      maybe, one has the capacity to turn things around by one's Determination,
      Perseverance and Hardwork.

      John Milton
      (Paradise Lost)

       
      Attachments
      • Alexey Gershun
        Alexey Gershun
        2014-05-13

        Hi,
        Thank you for the prompt answer

        There are 4 DCs our app connected to.
        Around 5000 events per hour (from all 4)
        The call for getting new events happens every 10 seconds:
        eventAsVariant = (JIVariant) ( wbemEventSource.callMethodA( "NextEvent", new Object[] { new Integer(10000) } ) )[ 0 ];

        I can't enclose the logs because it's our customer's. We are trying to get the FINEST log in the lab but it will take time...

        Now, from our app log I can see one "problematic" DC which disconnects once in a while (few time a week) with 0x8001FFFF error:

        2014-04-22T20:58:35.234-04:00 0000002093 30013 NOTICE ADObserver: Connection to Domain Controller was interrupted (Domain Controller was unresponsive), domain={dc-hostname=<...>, dc-name=<...>, dc-netBIOS=<...>, dc-username=<...>, dc-windows-version=Win2008R2}, system={system:exception-cause=java.io.IOException: Interrupted while reading, system:exception-class=class org.jinterop.dcom.common.JIException, system:exception-message=An internal error occurred. [0x8001FFFF], system:exception-stack=org.jinterop.dcom.core.JIComServer.call(JIComServer.java:996), system:exception-stack=org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945), system:exception-stack=org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:271), system:exception-stack=org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:156), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:313), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:518), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:524), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:475), ...
        

        And as I've already noticed, the listOfDeferencedIpids is exploded (up to 1.8 M of entries)

        Could you elaborate a bit on this list?
        When new entries come in?
        When the clean up takes place?
        I can debug it myself, but I need some starting point

        Thank you a lot

         
        • Hi,

          The list size is exactly equal to the COM server references taken up by
          your application. There is a clean up thread responsible for clearing it
          up, however it needs CPU time to run and given your throughput I am not
          sure if this is happening. I think this is either in JISession or jisystem
          class. I am not in office today to point you exactly.

          Best regards,
          Vikram
          On May 13, 2014 6:19 PM, "Alexey Gershun" gershun@users.sf.net wrote:

          Hi,
          Thank you for the prompt answer

          There are 4 DCs our app connected to.
          Around 5000 events per hour (from all 4)
          The call for getting new events happens every 10 seconds:
          eventAsVariant = (JIVariant) ( wbemEventSource.callMethodA( "NextEvent",
          new Object[] { new Integer(10000) } ) )[ 0 ];

          I can't enclose the logs because it's our customer's. We are trying to get
          the FINEST log in the lab but it will take time...

          Now, from our app log I can see one "problematic" DC which disconnects
          once in a while (few time a week) with 0x8001FFFF error:

          2014-04-22T20:58:35.234-04:00 0000002093 30013 NOTICE ADObserver: Connection to Domain Controller was interrupted (Domain Controller was unresponsive), domain={dc-hostname=<...>, dc-name=<...>, dc-netBIOS=<...>, dc-username=<...>, dc-windows-version=Win2008R2}, system={system:exception-cause=java.io.IOException: Interrupted while reading, system:exception-class=class org.jinterop.dcom.common.JIException, system:exception-message=An internal error occurred. [0x8001FFFF], system:exception-stack=org.jinterop.dcom.core.JIComServer.call(JIComServer.java:996), system:exception-stack=org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945), system:exception-stack=org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:271), system:exception-stack=org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:156), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:313), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:518), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:524), system:exception-stack=org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:475), ...

          And as I've already noticed, the listOfDeferencedIpids is exploded (up to
          1.8 M of entries)

          Could you elaborate a bit on this list?
          When new entries come in?
          When the clean up takes place?
          I can debug it myself, but I need some starting point

          Thank you a lot

          Possible listOfDeferencedIpids memory leakhttps://sourceforge.net/p/j-interop/discussion/600730/thread/7c1cd7c1/?limit=25#736a/31ae/9ae2

          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/j-interop/discussion/600730/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

           
          Attachments