Open Bug 1767786 Opened 3 years ago Updated 3 days ago

Intermittent devtools/shared/test-helpers/browser_allocation_tracker.js | single tracking bug

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: jmaher, Assigned: ochameau)

References

Details

(Keywords: intermittent-failure, intermittent-testcase)

Attachments

(1 file, 1 obsolete file)

No description provided.

Filter on devtools-intermittent-singletrackingbug-triage

Severity: -- → S4
Attachment #9384342 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 1 year ago11 months ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

Seems relatively low frequency. We used to have similar failures back in July. The test seems to find a negative number of objects without stacks at https://searchfox.org/firefox-main/rev/21d3e8ab8b61715ddd39ac04c62a846fa79deddd/devtools/shared/test-helpers/browser_allocation_tracker.js#180-190

Assert.greater(
  record.objectsWithoutStack,
  10,
  "We get an handful of objects without stacks. Most likely created by Memory API itself."
);

is(
  record.leaks.length,
  2,
  "We get the one leak and the objects with missing stacks"
);

Alex, is it relevant to assert the objects without stack? Are we really guaranteed to have > 10 objects without stack?

Flags: needinfo?(poirot.alex)
See Also: → 1993498

(In reply to Julian Descottes [:jdescottes] from comment #107)

Seems relatively low frequency. We used to have similar failures back in July. The test seems to find a negative number of objects without stacks at https://searchfox.org/firefox-main/rev/21d3e8ab8b61715ddd39ac04c62a846fa79deddd/devtools/shared/test-helpers/browser_allocation_tracker.js#180-190

Assert.greater(
  record.objectsWithoutStack,
  10,
  "We get an handful of objects without stacks. Most likely created by Memory API itself."
);

is(
  record.leaks.length,
  2,
  "We get the one leak and the objects with missing stacks"
);

Alex, is it relevant to assert the objects without stack? Are we really guaranteed to have > 10 objects without stack?

I'm getting >3000 such object locally, so the different is quite huge with try runs.
Otherwise, these objects without stack are dark matter so there is no subjective number to pick.
We could easily drop all assertion/tracking about objects without stack, but my concern is that it looks like the other assertion is also failing, but this one indicates a bug!

[task 2025-10-06T15:09:35.768+00:00] 15:09:35     INFO - TEST-UNEXPECTED-FAIL | devtools/shared/test-helpers/browser_allocation_tracker.js | We get the one leak and the objects with missing stacks - Got 1, expected 2
[task 2025-10-06T15:09:35.768+00:00] 15:09:35     INFO - Stack trace:
[task 2025-10-06T15:09:35.768+00:00] 15:09:35     INFO - chrome://mochikit/content/browser-test.js:test_is:1761
[task 2025-10-06T15:09:35.768+00:00] 15:09:35     INFO - chrome://mochitests/content/browser/devtools/shared/test-helpers/browser_allocation_tracker.js:null:186
[task 2025-10-06T15:09:35.768+00:00] 15:09:35     INFO - chrome://mochikit/content/browser-test.js:handleTask:1251

https://treeherder.mozilla.org/logviewer?job_id=530238933&repo=autoland&lineNumber=30493

Unfortunately, I can't reproduce locally, but I'll try to push to tentative improvements.

Flags: needinfo?(poirot.alex)

but my concern is that it looks like the other assertion is also failing, but this one indicates a bug!

I haven't looked too deeply but based on the assertion message "We get the one leak and the objects with missing stacks", since we get a negative number of objects without stacks, I thought this was 100% caused by the other issue?

Assignee: nobody → poirot.alex
Attachment #9520237 - Attachment description: WIP: Bug 1767786 - [devtools] Wait for async tasks queued in the event loop before tracking for memory usages. → Bug 1767786 - [devtools] Wait for async tasks queued in the event loop before tracking for memory usages. r=#devtools
Attachment #9520237 - Attachment description: Bug 1767786 - [devtools] Wait for async tasks queued in the event loop before tracking for memory usages. r=#devtools → Bug 1767786 - [devtools] Tune garbage collection before tracking for memory usages. r=#devtools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: