Closed Bug 1849089 Opened 1 year ago Closed 7 months ago

115.0.2esr using lot of memory while executing selenium automation tests

Categories

(Core :: JavaScript Engine, defect, P3)

Firefox 115
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: paritadetroja29, Unassigned)

References

Details

Attachments

(4 files)

Attached image FF 115.0.2.esr.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

Steps to reproduce:

We are currently using Firefox 91.2.0esr to execute selenium automation tests, where FF web process (FirefoxCP web content) is using nearly 500-600MB of m/m.
Now, we are upgrading to Firefox 115.0.2esr and running same tests. Tests are now using more than 2.5-3GB of m/m and browser is crashing due to m/m.

To resolve this m/m issue we have tried different preferences listed below.

setPreference(profile, "fission.autostart", false);
setPreference(profile, "fission.webContentIsolationStrategy", 0);
setPreference(profile, "fission.bfcacheInParent", false);
setPreference(profile,"dom.ipc.processCount.webIsolated",1);
setPreference(profile, "identity.fxaccounts.enabledt", false);
setPreference(profile, "extensions.pocket.enabled", false);
setPreference(profile, "places.history.enabled", false);
setPreference(profile, "browser.sessionstore.max_tabs_undo", 0);
setPreference(profile, "privacy.history.custom", true);
setPreference(profile, "browser.cache.disk.enable", false);
setPreference(profile, "browser.cache.memory.enable", false);
setPreference(profile, "browser.sessionhistory.max_total_viewers", 0);
setPreference(profile, "browser.sessionhistory.max_entries", 1);

None of this preferences are helping in decreasing m/m issue.

Please find attached screenshots of m/m usage.

Actual results:

Due to browser crash, we are seeing test failures with below issue.
java.lang.RuntimeException: java.net.ConnectException: Connection refused (Connection refused)
org.openqa.selenium.NoSuchSessionException:
Tried to run command without establishing a connection
etc.

Expected results:

We are expecting latest Firefox 115.0.2esr should use less m/m similar to Firefox 91.2.0esr. Our automation test should run without any issue.

Attached image FF 91.2.0.esr.png

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core

Thanks for the report. Can you share a limited publicly available testcase, or a test environment which can be accessed by Firefox devs? Without a reproducible testcase, this bug may not be actionable.

If possible, you can share the testcase/dev environment details with mozilla devs ( continuation at gmail dot com) directly on email (without posting it publicly here).

Component: Networking → Performance
Flags: needinfo?(paritadetroja29)

Mayank, It is not possible for us to share test-case/test-project due to security constraints. Even we can't create demo test cases as it required instance and different dependency jars which are not available publicly.

I can provide below high level details.
Test-cases are interacting with seismic components through find element in shadow root. We are injecting different seismic component java script to perform different UI operations. Similar implementation was working perfectly with firefox version 91.2.0esr.

Flags: needinfo?(paritadetroja29)

This bug was moved into the Performance component.

:paritadetroja29, could you make sure the following information is on this bug?

  • For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.
  • For memory usage issues, capture a memory dump from about:memory and attach it to this bug.
  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

If the requested information is already in the bug, please confirm it is recent.

Thank you.

Flags: needinfo?(paritadetroja29)

Due to security constraints, I can not able to share profiler data. Already shared m/m usage screenshots.

Here I am attaching Troubleshooting information.

Flags: needinfo?(paritadetroja29)

Can we get further updates please? We are blocked in our upgrade process.

Flags: needinfo?(fdoty)

As per our analysis, we found below code which is increasing memory by approx 50MB per call.
let driverImport = await import('/externals/DRIVER_NAME/drivers/index.jsdbx');
We are executing similar import for more than 100 times in single test class.

Memory deallocation seems to be not happening for this code with Firefox 115.0.2esr.

This could be related to bug 1842798, which is related to fixing some module-related leaks we've been seeing. That was only fixed in 118, though.

See Also: → 1842798

We have ran our tests with 118 version. Still there is high usage of memory. Please find attached screenshot.

This appears to be more of a leak than a performance issue. Moving this to Javascript Engine because it seems possibly related to bug 1842798?

Component: Performance → JavaScript Engine
Flags: needinfo?(fdoty)

Hi: With the information in Comment 9, we were wondering if you could use https://mozilla.github.io/mozregression/quickstart.html to help find a regression range. It uses binary search, so hopefully it will not require too many iterations to point to something specific.

Flags: needinfo?(paritadetroja29)
Severity: -- → S3
Priority: -- → P3

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Given that the bug is still UNCONFIRMED, closing the bug as incomplete.

For more information, please visit BugBot documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 7 months ago
Flags: needinfo?(paritadetroja29)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: