Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

trial test runs leak memory #15622

@squahtx

Description

@squahtx

#15334 introduced a bug where HomeServer instances no longer get garbage collected during trial test runs. As a result, memory usage grows to multiple gigabytes during test runs.

See https://github.com/matrix-org/synapse/pull/15334/files#diff-f50ec854a65082453f4086048f20c291ca6020fab973486a9da2285025394cc8R180.
When we garbage collect generation 0, self.hs still holds a reference to the HomeServer, which gets promoted to generation 1 and then never collected.

Apart from that, there are also a couple of other leaks at play.


The last 3 are fairly annoying to fix, so I've left them alone.

Metadata

Metadata

Assignees

Labels

O-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceS-MinorBlocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Z-Dev-WishlistMakes developers' lives better, but doesn't have direct user impact

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions