New issue
Advanced search Search tips

Issue 918458 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Today
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

The process memory usage is rising in AJAX calls.

Reported by k078...@gmail.com, Jan 2

Issue description

Chrome Version: Chromium 72.0.3618.0 (Headless)
OS: Ubuntu 18.04
    macOS 10.14
<b>See <https://www.chromium.org/for-testers/providing-memory-details> to</b>
provide memory usage snapshots.

URL (if applicable) where the memory bloat occurred:

Can you reproduce this memory bloat?

What steps will reproduce this memory bloat (or if it's not reproducible,
what were you doing until then)?

(1) Make an Ajax request every second.

```html
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Ajax Test</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>

<body>
    <div></div>
    <script>
        sendReq();

        function sendReq() {
            $.ajax({
                type: "POST",
                url: "http://127.0.0.1:3001/post",
                success: function (msg) {
                    var timeout = setTimeout(function() {
                        sendReq();
                        clearTimeout(timeout);
                    }, 1000);
                }
            });
        };
    </script>
</body>
```

(2) Take a coffee and a few hours.


*Please note that issues filed with no information filled in above
will be marked as WontFix*



 
chart.png
25.9 KB View Download
Labels: Needs-Triage-M72
Cc: santhoshkumar@chromium.org l...@chromium.org
Labels: Triaged-ET
This issue looks similar to  issue 886569  hence adding luoe@chromium.org to cc list for further inputs.

Thanks !
Cc: morlovich@chromium.org
Components: Blink>Network>XHR
Hmm, if Headless has an equivalent of chrome://crashes, anything in it?
 
c#2: the other  issue 886569  pertains to sites that produce lots of console logs and DevTools is open.  This issue seems unrelated to DevTools.

Comment 5 by ricea@chromium.org, Jan 18 (4 days ago)

Labels: Type-Bug
Status: Available (was: Unconfirmed)
Confirmed. I created a simpler repro that doesn't involve jquery, and also goes much faster.

```html
<!doctype html>
<script>
sendReq();

function sendReq() {
  const xhr = new XMLHttpRequest();
  xhr.open("POST", "http://127.0.0.1/cgi-bin/post");
  xhr.onreadystatechange = () => {
    if (xhr.readyState === 4 && xhr.status === 200) {
      var timeout = setTimeout(() => {
        sendReq();
        clearTimeout(timeout);
      }, 10);
    }
  };
  xhr.send("data");
}
</script>
```

Initial analysis using about:tracing appears to show that the leak is in Blink rather than V8.

Even with the increased speed of my repro, the leak is very slow, so the priority to fix this is low.

Comment 6 by morlovich@chromium.org, Jan 18 (4 days ago)

Do you know if this leak retains something browser/network-service side? We have some cases where there was an unreasonable number of URLLoaders around...

Comment 7 by ricea@chromium.org, Jan 21 (2 days ago)

#6 I didn't run with browser tracing enabled, but it looks like browser memory usage is stable.

Comment 8 Deleted

Comment 9 by ricea@chromium.org, Jan 21 (2 days ago)

My comment #8 was mistaken so I have deleted it. I was actually running the original jQuery repro over the weekend. Memory usage stabilised eventually.

There's probably nothing to do here. I'm going to run one more test to be on the safe side.

Comment 10 by ricea@chromium.org, Today (21 hours ago)

Status: WontFix (was: Available)
I did an overnight run of my repro in #5, and again the memory usage levelled out after a while. I don't think we have a memory leak.

Sign in to add a comment