microsoft / microsoft/playwright-java

[Bug]: [java] Memory leak in long working tests

Open
#1,841 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
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:

  1. Download repo
    2 .Go to project with terminal and use docker build -t [imagename] .
  2. docker run --init --ipc=host -t [tagoimagefrom2ndpoint] mvn compile exec:java -D exec.mainClass="org.example.App"
  3. 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

Image
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

Image
Environment
OS: jvm-ubuntu:21
Language: Java

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.