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

Detached windows are kept in memory during spec run #29708

Open
mindtraveller opened this issue Jun 19, 2024 · 2 comments
Open

Detached windows are kept in memory during spec run #29708

mindtraveller opened this issue Jun 19, 2024 · 2 comments
Labels

Comments

@mindtraveller
Copy link

Test code to reproduce

We have a spec with 30+ tests, all the tests with number 30+ start failing due to memory issues WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance.
Research's shown that it might be related to the fact that the Detached Windows are kept in the memory. It can be easily reproduced by retrying a single test multiple times and then inspecting Memory snapshot. Detached Window instances in turn hold the pointers to the internal objects of our application preventing garbage collection.

Here I restarted test couple of times and the amount of Detached Windows grows.
image

None of the mentioned in the template of this issue options help:

  • experimentalMemoryManagement: true
  • numTestsKeptInMemory: 0

Cypress Mode

cypress run

Cypress Version

13.12.0

Browser Version

Chrome 125

Node version

v18.16.1

Operating System

macOS 14.4.1

Memory Debug Logs

cannot get them with the instructions provided

Other

No response

@jennifer-shehane
Copy link
Member

To clarify, you're running via cypress open and clicking this retry button multiple times before inspecting the Memory snapshot?

@mindtraveller
Copy link
Author

That's right, it's the easiest way to reproduce and debug the issue. Initially we faced the issue during cypress run on CI after we added 30nth test to a spec.

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

No branches or pull requests

2 participants