Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10k+ leaked objects from simple test #3

Open
chaosphere2112 opened this issue Nov 23, 2016 · 0 comments
Open

10k+ leaked objects from simple test #3

chaosphere2112 opened this issue Nov 23, 2016 · 0 comments

Comments

@chaosphere2112
Copy link

Running the test_meshfill_draw_mesh.py test leaks about 10,900 objects. This is very significant, as it means that rendering multiple large datasets, even properly scoped so no vcs objects are reachable, will quickly exhaust the available system memory. This is also causing issues interfacing with other modules that need objects to be freed before the interpreter shuts down.

This is easy to test for manually:

  1. Take any existing test, and put the entire file, imports and all, into a def runTest(): block.
  2. Change any sys.exit(x) calls into return x.
  3. Add the following to the bottom of the script:
import gc
gc.enable()
gc.set_debug(gc.DEBUG_LEAK)

result = runTest()

gc.collect()

for i,g in enumerate(gc.garbage):
    print "Leak %d: %s @0x%x:\n   %s"%(i, type(g), id(g), str(g)[:70])

import sys
sys.exit(result)

The results of test_meshfill_draw_mesh.py are here: https://gist.github.com/dlonie/2d72d0cfa4a52271bb7a

Migrated from: CDAT/cdat#1343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant