You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: build_docs fails with Brain instance leak on 10_overview after #13995 #14046
Since #13995 was merged, the build_docs job (the memory-profiled html-pattern-memory build that runs on PRs) fails on tutorials/intro/10_overview.py with a Brain instance leak:
sphinx.errors.ExtensionError: reset_modules failed: when='after', fname='10_overview.py'
assert_no_instances(Brain, when=when, request=request)
File ".../refleak/testing/_core.py", line 501, in assert_no_instances
assert n == 0, (
AssertionError
I hit this on my GSoC PR #13925 right after updating my branch. The tutorial code that creates the Brain didn't change, so I looked into where it came from:
Holding those references on the Brain looks like it's enough to keep the instance alive past the assert_no_instances(Brain) check in reset_modules.
One thing worth noting: build_docs_main on main is green, so it doesn't show up there. My guess is the PR build runs under mprof (html-pattern-memory) and the GC timing there is what surfaces the leak, whereas the plain full build collects it in time.
Repro: build 10_overview under the memory-profiled docs build (make html-pattern-memory with a pattern that includes it).
Activity