Closed Bug 1374856 Opened 7 years ago Closed 5 years ago

Intermittent LeakSanitizer | leak at NewSegment, CreateSegment, mozilla::ipc::Shmem::Alloc, mozilla::ipc::IToplevelProtocol::CreateSharedMemory

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: bulk-close-intermittents, intermittent-failure, memory-leak, Whiteboard: [stockwell unknown])

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Note backout in bug 1389021.
Whiteboard: [stockwell fixed:backout]
Priority: -- → P3
Keywords: mlk
This bug has failed 36 times in the last 7 days only on Linux 64 affecting asan build types. 
Failing test opt-mochitest-media-e10s.

Link to a recent log: https://treeherder.mozilla.org/logviewer.html#?repo=mozilla-central&job_id=165402248&lineNumber=3495

Part of that log:
01:15:55     INFO - GECKO(1572) | [GFX1]: Texture deallocated too late during shutdown
[task 2018-03-02T01:15:56.749Z] 01:15:56     INFO - GECKO(1572) | =================================================================
[task 2018-03-02T01:15:56.750Z] 01:15:56    ERROR - GECKO(1572) | ==1622==ERROR: LeakSanitizer: detected memory leaks
[task 2018-03-02T01:15:56.750Z] 01:15:56     INFO - GECKO(1572) | Direct leak of 960 byte(s) in 8 object(s) allocated from:
[task 2018-03-02T01:15:56.751Z] 01:15:56     INFO - GECKO(1572) |     #0 0x4c1c93 in malloc /builds/worker/workspace/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:88:3
[task 2018-03-02T01:15:56.751Z] 01:15:56     INFO - GECKO(1572) |     #1 0x4f26fd in moz_xmalloc /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:70:17
[task 2018-03-02T01:15:56.752Z] 01:15:56     INFO - GECKO(1572) |     #2 0x7fafa3cd0bf7 in operator new /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/mozalloc.h:159:12 

:jimm do you have any update on this?
Flags: needinfo?(jmathies)
Whiteboard: [stockwell fixed:backout] → [stockwell needs work]
In the logs from mid January and before (Comment 20) the leaks are in test-linux64-asan/opt-test-verify-e10s, and  have MediaPipelineReceiveVideo::PipelineListener::RenderVideoFrame in the stack.

Starting in comment 21 from 02-11, the leaks are in test-linux64-asan/opt-mochitest-media-e10s-1, are more frequent, and have FFmpegVideoDecoder<55>::DoDecode in the stack. Those started on Feb 9. So maybe some new media thing landed around then?
"Texture deallocated too late during shutdown" also suggests something did try to free this memory. Maybe there was some change to media shutdown. The message is a little spammy, but I think that in the log from comment 24 that message is being triggered 8 times, and then we leak 8 textures.
Component: IPC → Audio/Video: Playback
Update:
There have been 55 failures in the last week.
Summary: Intermittent LeakSanitizer | leak at NewSegment, CreateSegment, mozilla::ipc::Shmem::Alloc, mozilla::ipc::IToplevelProtocol::CreateSharedMemory
This fails only on Linux x64 / asan.

Here is a recent relevant log file:
https://treeherder.mozilla.org/logviewer.html#?repo=mozilla-central&job_id=167249478&lineNumber=3510
rillian, do you know who might be able to look at this? Thanks.
Flags: needinfo?(giles)
Jean-Yves, looks like there's a frame data leak in FFmpegVideoDecoder::DoDecode.
Flags: needinfo?(giles) → needinfo?(jyavenard)
I don't see how this can be happening, and unfortunately, don't have the bandwidth to dive into it at this time
Flags: needinfo?(jyavenard)
no failures on trunk since March 20th and only a few on mozilla-beta.
Whiteboard: [stockwell disable-recommended] → [stockwell unknown]
Flags: needinfo?(jmathies)
Current stacks fail in -

mozilla::layers::BufferTextureData::CreateInternal

with logs like - 

[task 2018-05-03T20:39:49.346Z] 20:39:49     INFO - GECKO(1593) | Crash Annotation GraphicsCriticalError: |[C0][GFX1]: Texture deallocated too late during shutdown (t=789.374)
[task 2018-05-03T20:39:49.347Z] 20:39:49     INFO - GECKO(1593) | ###!!! [Child][MessageChannel] Error: (msgtype=0x2D00CD,name=PContent::Msg_GraphicsError) Closed channel: cannot send/recv
[task 2018-05-03T20:39:49.347Z] 20:39:49     INFO - GECKO(1593) | [GFX1]: Texture deallocated too late during shutdown
[task 2018-05-03T20:39:49.350Z] 20:39:49     INFO - GECKO(1593) | Crash Annotation GraphicsCriticalError: |[C0][GFX1]: Texture deallocated too late during shutdown (t=789.374) |[C1][GFX1]: Texture deallocated too late during shutdown (t=789.374)
[task 2018-05-03T20:39:49.351Z] 20:39:49     INFO - GECKO(1593) | ###!!! [Child][MessageChannel] Error: (msgtype=0x2D00CD,name=PContent::Msg_GraphicsError) Closed channel: cannot send/recv
[task 2018-05-03T20:39:49.351Z] 20:39:49     INFO - GECKO(1593) | [GFX1]: Texture deallocated too late during shutdown

moving to graphics.
Component: Audio/Video: Playback → Graphics: Layers
Component: Graphics: Layers → Audio/Video: MediaStreamGraph
Status: REOPENED → RESOLVED
Closed: 7 years ago5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.