microsoft / microsoft/playwright-java
[Bug]: [java] Memory leak in long working tests
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 298
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 14
Description
Version
1.52.0
Steps to reproduce
You need docker to run this project
https://github.com/piotrczarnak/bug-1816_spring
Steps to reproduce:
- Download repo
2 .Go to project with terminal and use docker build -t [imagename] . - docker run --init --ipc=host -t [tagoimagefrom2ndpoint] mvn compile exec:java -D exec.mainClass="org.example.App"
- Wait ~4h and you will see memory consumption growing.
To check memory consumption per process use stem -t (already installed)
Expected behavior
Memory consumption stays on the same level.
Actual behavior
I have constantly running tests in docker container. Each hour I see memory consumption is growing even though I close each test page, browser and playwright itself. Test stared with 456 MB and after 8h it reached 4GB
Additional context
Tests are run in docker container which is created by myself. Tests are run each 1000 ms.
I noticed that there are many not closed processes. After using stem -t
Environment
OS: jvm-ubuntu:21
Language: Java
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and its Docker setup, then run the Maven command for org.example.App while monitoring memory and processes with stem -t. Done means reproducing the long-running growth and identifying the source of the unclosed processes or memory increase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100