Skip to content

Large number of C++ objects unclaimed in node v0.12.7  #2813

Closed
@gireeshpunathil

Description

Node version: v0.12.7

Platform tested: Linux IA32

  1. Here is a standalone test case which reproduces the issue: https://github.com/gireeshpunathil/nodev0.12.7tlsmemoryleak
  2. Over time, Quite many objects of type WriteWrap, TLSWrap, SecureContext, TCP etc. pile up in the native heap, and the RSS growth drives node out of memory.
  3. Sample snapshots of the Object containment chain below. The leak is not apparent in the heapdump, as neither the comparison view nor the retention chain show up the anything, as these objects have lost their association with any JS objects.
  4. This issue seem related to Possible memory leak in TLS(Wrap?) #1075 but as the code base is different here, a fix does not look straightforward.
  5. We migrated from v0.10 to v0.12 due to an outstanding memory leak in the former. It would be great if this can be fixed in v0.12.7

image

image

image

Metadata

Assignees

No one assigned

    Labels

    memoryIssues and PRs related to the memory management or memory footprint.tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions