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 · 3 comments
Open

Detached windows are kept in memory during spec run #29708

mindtraveller opened this issue Jun 19, 2024 · 3 comments
Labels
stale no activity on this issue for a long period type: performance 🏃‍♀️ Performance related

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.

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period type: performance 🏃‍♀️ Performance related
Projects
None yet
Development

No branches or pull requests

3 participants