Skip to content

BUG: build_docs fails with Brain instance leak on 10_overview after #13995 #14046

Closed

Description

@natinew77-creator

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:

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).

cc @teonbrooks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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