Closed Bug 1855305 Opened 2 years ago Closed 2 years ago

Memory leaks on new Ubuntu 22.04 Wayland test pool

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: ahal, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I'm standing up tests running against Wayland, and I noticed that most of the debug tasks have leakcheck failures.

Here's an example log:
https://treeherder.mozilla.org/logviewer?job_id=430268408&repo=try&lineNumber=6554

But clicking around this push, you can see leaks on most tasks:
https://treeherder.mozilla.org/jobs?repo=try&searchStr=debug&revision=b0c5e6e605d1de9a867dde8a21255f5cc700409f&selectedTaskRun=dsv2SB9ZRz6j7t0DUQ9gRw.0

I'm not sure where to put this as it's happening across so many different tests, so filing in Core :: General.

These tasks can be run on try via:

./mach try fuzzy --full -q "'wayland 'debug 'mochitest-plain"

(or similar)

I'll also note that this is also the first time that we've run tasks against Ubuntu 22.04, so it's quite possible the leaks have nothing to do with Wayland, and everything to do with the Ubuntu upgrade.

It looks like the leaks are all Mutexes, so hopefully it is just one issue. If you have ASan builds working, you could try running a mochitest with that. If not, I could dig up the commands to get this leak checker to do more logging.

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

Component: General → Widget: Gtk
Priority: -- → P3

Will look at it. Also Widget/Gtk is the best component for Wayland issues, I can forward it to different component after triage.

Flags: needinfo?(stransky)

See some leaks but doesn't look related:

./mach test dom/tests/mochitest/bugs/

ERROR TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at wl_egl_window_create, mozilla::gl::GLContextEGL::CreateWaylandBufferSurface, mozilla::gl::GLContextEGL::CreateEGLSurfaceForCompositorWidget, mozilla::wr::RenderCompositorEGL::CreateEGLSurface
ERROR TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at mozilla::gl::GLContextEGL::CreateWaylandBufferSurface, mozilla::gl::GLContextEGL::CreateEGLSurfaceForCompositorWidget, mozilla::wr::RenderCompositorEGL::CreateEGLSurface, mozilla::wr::RenderCompositorEGL::Resume

but will investigate it anyway.

LSan is different from leakcheck. I see the Mutex leaks.

Attached file Allocation stack.

It seems to be the MozContainer lock.

This is easy to debug with:

XPCOM_MEM_LOG_CLASSES=Mutex ./mach mochitest dom/base/test/test_bug416317-1.html

Or so.

Yeah, I was just suggesting LSan because I couldn't remember the actual environment variables for regular leakchecking, so thanks for including that and the allocation stack.

Depends on: 1855457
Depends on: 1855461

With bug 1855457 and bug 1855461 I get no leakcheck failures locally. Andrew, can you give them a spin?

Flags: needinfo?(ahal)

Thanks for the quick investigation / fixes all!

I did end up scheduling a task on an asan build:
https://treeherder.mozilla.org/logviewer?job_id=430512469&repo=try&lineNumber=2588

But I guess we're passed that point now. I'll try a new push with those bugs applied shortly.

Flags: needinfo?(ahal)

Leakcheck failures are gone in comment 11, yay.

Assignee: nobody → emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Flags: needinfo?(stransky)

Awesome, thanks Emilio!

I noticed one "YOU ARE LEAKING THE WORLD" message in this task:
https://treeherder.mozilla.org/logviewer?job_id=430549919&repo=try&lineNumber=12434

But this seems like a separate issue that I can triage later.

Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: