Closed Bug 1813562 Opened 1 year ago Closed 1 year ago

Intermittent LeakSanitizer | leak at alloc::alloc::alloc::hfd4840f40062c30e, alloc::alloc::Global::alloc_impl::hfe0f7428b77cab4e, _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::h331bbcc371f94af5, alloc::raw_vec::RawVec$LT

Categories

(Core :: Graphics: ImageLib, defect, P5)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: tnikkel)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Filed by: chorotan [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=403944877&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/drIlCYJoTxO4gjC7c2UAEg/runs/0/artifacts/public/logs/live_backing.log


[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | @resource://gre/modules/osfile.jsm:12:30
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | @resource://gre/modules/TelemetryStorage.sys.mjs:10:28
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:829:36
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | WARNING: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | WARNING: addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:727:15
[task 2023-01-30T12:15:22.628Z] 12:15:22     INFO - GECKO(20313) | addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:523:26
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | addBlocker@resource://gre/modules/AsyncShutdown.sys.mjs:458:15
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | setupShutdown@resource://gre/modules/osfile/osfile_async_front.jsm:1548:28
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | @resource://gre/modules/osfile/osfile_async_front.jsm:1568:16
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | @resource://gre/modules/osfile.jsm:12:30
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | @resource://gre/modules/TelemetryStorage.sys.mjs:10:28
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | _checkPendingPings@resource://gre/modules/TelemetrySend.sys.mjs:863:17
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | setup@resource://gre/modules/TelemetrySend.sys.mjs:803:18
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | setup@resource://gre/modules/TelemetrySend.sys.mjs:241:30
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | setupTelemetry/this._delayedInitTask<@resource://gre/modules/TelemetryControllerParent.sys.mjs:829:36
[task 2023-01-30T12:15:22.629Z] 12:15:22     INFO - GECKO(20313) | observe@resource://gre/modules/AsyncShutdown.sys.mjs:576:16
[task 2023-01-30T12:15:22.634Z] 12:15:22     INFO - GECKO(20313) | JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
[task 2023-01-30T12:15:22.635Z] 12:15:22     INFO - GECKO(20313) | JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
[task 2023-01-30T12:15:22.638Z] 12:15:22     INFO - GECKO(20313) | JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
[task 2023-01-30T12:15:22.638Z] 12:15:22     INFO - GECKO(20313) | JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
[task 2023-01-30T12:15:22.639Z] 12:15:22     INFO - GECKO(20313) | JavaScript error: resource://gre/modules/AsyncShutdown.sys.mjs, line 727: Error: Phase "profile-before-change" is finished, it is too late to register completion condition "OS.File: flush I/O queued before profileBeforeChange"
[task 2023-01-30T12:15:23.249Z] 12:15:23     INFO - GECKO(20313) | [Parent 20313, IPC I/O Parent] WARNING: Process 20450 may be hanging at shutdown; will wait for up to 40000ms: file /builds/worker/checkouts/gecko/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:180
[task 2023-01-30T12:15:23.793Z] 12:15:23     INFO - GECKO(20313) | =================================================================
[task 2023-01-30T12:15:23.794Z] 12:15:23    ERROR - GECKO(20313) | ==20450==ERROR: LeakSanitizer: detected memory leaks
[task 2023-01-30T12:15:23.794Z] 12:15:23     INFO - GECKO(20313) | Direct leak of 304 byte(s) in 1 object(s) allocated from:
[task 2023-01-30T12:15:23.796Z] 12:15:23     INFO - GECKO(20313) |     #0 0x560b2d5b997e in malloc /builds/worker/fetches/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
[task 2023-01-30T12:15:23.799Z] 12:15:23     INFO - GECKO(20313) |     #1 0x7f46f9ea0f6c in alloc::alloc::alloc::hfd4840f40062c30e /builds/worker/fetches/rust/library/alloc/src/alloc.rs:95:14
[task 2023-01-30T12:15:23.800Z] 12:15:23     INFO - GECKO(20313) |     #2 0x7f46f9ea0f6c in alloc::alloc::Global::alloc_impl::hfe0f7428b77cab4e /builds/worker/fetches/rust/library/alloc/src/alloc.rs:177:73
[task 2023-01-30T12:15:23.801Z] 12:15:23     INFO - GECKO(20313) |     #3 0x7f46f9ea0f6c in _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::h331bbcc371f94af5 /builds/worker/fetches/rust/library/alloc/src/alloc.rs:237:9
[task 2023-01-30T12:15:23.810Z] 12:15:23     INFO - GECKO(20313) |     #4 0x7f46f9ea0f6c in alloc::alloc::exchange_malloc::hf0ac8415eb7343be /builds/worker/fetches/rust/library/alloc/src/alloc.rs:326:11
[task 2023-01-30T12:15:23.811Z] 12:15:23     INFO - GECKO(20313) |     #5 0x7f46f9ea0f6c in alloc::boxed::Box$LT$T$GT$::new::he0f434ce1feed957 /builds/worker/fetches/rust/library/alloc/src/boxed.rs:220:9
[task 2023-01-30T12:15:23.811Z] 12:15:23     INFO - GECKO(20313) |     #6 0x7f46f9ea0f6c in qcms::transform::transform_create::h9181b97e976765ce /builds/worker/checkouts/gecko/gfx/qcms/src/transform.rs:1304:46
[task 2023-01-30T12:15:23.812Z] 12:15:23     INFO - GECKO(20313) |     #7 0x7f46ecbdc64c in mozilla::image::nsAVIFDecoder::Decode(mozilla::image::SourceBufferIterator&, mozilla::image::IResumable*) /builds/worker/checkouts/gecko/image/decoders/nsAVIFDecoder.cpp:1634:18
[task 2023-01-30T12:15:23.812Z] 12:15:23     INFO - GECKO(20313) |     #8 0x7f46ecbda762 in mozilla::image::nsAVIFDecoder::DoDecode(mozilla::image::SourceBufferIterator&, mozilla::image::IResumable*) /builds/worker/checkouts/gecko/image/decoders/nsAVIFDecoder.cpp:1181:25
[task 2023-01-30T12:15:23.813Z] 12:15:23     INFO - GECKO(20313) |     #9 0x7f46ecafabe1 in mozilla::image::Decoder::Decode(mozilla::image::IResumable*) /builds/worker/checkouts/gecko/image/Decoder.cpp:177:19
[task 2023-01-30T12:15:23.813Z] 12:15:23     INFO - GECKO(20313) |     #10 0x7f46ecafa20c in mozilla::image::AnimationSurfaceProvider::Run() /builds/worker/checkouts/gecko/image/AnimationSurfaceProvider.cpp:232:36
[task 2023-01-30T12:15:23.814Z] 12:15:23     INFO - GECKO(20313) |     #11 0x7f46ecb29ee3 in mozilla::image::DecodingTask::Run() /builds/worker/checkouts/gecko/image/DecodePool.cpp:146:12
[task 2023-01-30T12:15:23.814Z] 12:15:23     INFO - GECKO(20313) |     #12 0x7f46ea2eb6e5 in mozilla::TaskController::RunPoolThread() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:328:33
[task 2023-01-30T12:15:23.815Z] 12:15:23     INFO - GECKO(20313) |     #13 0x7f470c8d0628 in _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5
[task 2023-01-30T12:15:23.815Z] 12:15:23     INFO - GECKO(20313) |     #14 0x7f470c5e96da in start_thread /tmp/glibc/nptl/pthread_create.c:463
[task 2023-01-30T12:15:23.816Z] 12:15:23     INFO - GECKO(20313) | Direct leak of 184 byte(s) in 1 object(s) allocated from:
Blocks: 1813145

Failures starting from the 19th of March are due to Bug 1813145- which was backed out: https://bugzilla.mozilla.org/show_bug.cgi?id=1813145#c4

Oh, I think I know what the problem is, we allocate these color profiles for each frame decoded, when we should be doing it only once.

Ah, in that case, the profile should be freed before line 1642, and we can avoid recreating it on line 1616. On line 1642, the data can come from the AV1 bitstream, where the CICP values can change at any time.

I can hopefully throw together a patch for this sometime early this week.

Thanks. I think I got a patch, just testing it out.

We run this code for every frame of animated images, so we need to make the code handle that.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6005302ad01
Fix leak with color profile and transform in avif decoder. r=Zaggy1024
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: