Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2, 3.2.0-alpha.2
    • Fix Version/s: 3.1.3, 3.2.0-beta.1
    • Component/s: library
    • Labels:
      None
    • Story Points:
      1

      Description

      Running the Node.js SDK with a large quantity of operations implies a memory leak is occurring, as the memory usage of the process slowly increases.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          brett19 Brett Lawson added a comment - - edited

          Upon further investigation of this bug, I've discovered that there was indeed a memory leak within the SDK due to a reference counting error within some of the internally objects that are shared between the extension and v8. Specifically, some objects that were passed from the Node.js side to the extension were not being correctly released by the extension after they were no longer in use, due to the default behaviour being to keep cells referenced even after destruction of the smart pointer to them. This caused the memory to leak in a way that is non-obvious due to the fact that it is alive and referenced as part of the v8 GC, but cannot be collected due to the outstanding reference count. In addition to this, it appears that objects referenced in this way do not appear in the Node.js heap allocation trace and have an interesting property that the v8 memory cell's allocation does not appear as having been allocated by the extension, but instead shows as having been allocated by v8 itself.

          Show
          brett19 Brett Lawson added a comment - - edited Upon further investigation of this bug, I've discovered that there was indeed a memory leak within the SDK due to a reference counting error within some of the internally objects that are shared between the extension and v8. Specifically, some objects that were passed from the Node.js side to the extension were not being correctly released by the extension after they were no longer in use, due to the default behaviour being to keep cells referenced even after destruction of the smart pointer to them. This caused the memory to leak in a way that is non-obvious due to the fact that it is alive and referenced as part of the v8 GC, but cannot be collected due to the outstanding reference count. In addition to this, it appears that objects referenced in this way do not appear in the Node.js heap allocation trace and have an interesting property that the v8 memory cell's allocation does not appear as having been allocated by the extension, but instead shows as having been allocated by v8 itself.

            People

            Assignee:
            brett19 Brett Lawson
            Reporter:
            brett19 Brett Lawson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty