Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Suspected memory leak in swig / swig-templates #41

@imran-uk

Description

@imran-uk

I recently got an error like this in production:

<--- Last few GCs --->

404572803 ms: Mark-sweep 1466.5 (1434.2) -> 1466.3 (1434.2) MB, 1884.6 / 0.0 ms [allocation failure] [GC in old space requested].
404574988 ms: Mark-sweep 1466.3 (1434.2) -> 1484.4 (1403.2) MB, 2184.6 / 0.0 ms [last resort gc].
404577008 ms: Mark-sweep 1484.4 (1403.2) -> 1503.8 (1403.2) MB, 2020.2 / 0.0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x23e3085cfb51 <JS Object>
    2: compiled [/opt/nodeapp/node_modules/swig/lib/swig.js:~608] [pc=0x19961c86ad0e] (this=0x23e3085e6111 <JS Global Object>,locals=0x2a837d238311 <an Object with map 0x382927d71809>)
    3: /* anonymous */ [/opt/nodeapp/node_modules/swig/lib/swig.js:559] [pc=0x199625010ad4] (this=0x23e3085e6111 <JS Global Object>,err=0x23e308504201 <null>,fn=0x2ec2109581f9 <JS Function compiled (SharedFunctio...

 "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"

I run node 6.x LTS with the defaults, no extra memory given to V8.

The mention of swig made me suspect something in swig is not releasing memory properly. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions