Thank you. Any suggestions are greatly appreciated!
--
You received this message because you are subscribed to the Google Groups "memory-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memory-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/memory-dev/CALRxhAsHybh-Zuexx15fyTPBVX1Qp63hnHyygb5PfDcufuk8jg%40mail.gmail.com.
Hi Michael,Thank you for your quick response.This is production code, not a testing environment.Here is the CL for debugging this issue: https://chromium-review.googlesource.com/c/chromium/src/+/2928738And this is the test case: https://output.jsbin.com/xocoroh/4. Please run chrome with --enable-blink-features=CompositeBGColorAnimation to observe the leak.
In the native paint worklet case, all I need is a worker thread that can support GC, and that should be a much simpler setup compared with AnimationAndPaintWorkletThread. So that's why I just created a dedicated worker thread and set that to support GC, and I thought that should be enough.So based on what you said, a worker thread that supports GC needs to have a V8 Isolate attached to it?
Hi Michael,Thank you for your help.I forgot to mention, we also have memory leaks even with AnimationAndPaintWorkletThread.This is the test case: https://output.jsbin.com/vafewif, and you can run it without any flag. In this test case, my logging shows that the number of PaintRenderingContext2D instances climbs > 1000 within 30 seconds, and also the PaintRenderingContext2D::Trace() function is never called.The PaintRenderingContext2D instance is created here in CSSPaintDefinition::Paint(), which runs on a worker thread. The worker thread comes from here, which is the thread where global_scope is created. The global scope is created here, and as you can see, it is actually using the AnimationAndPaintWorkletThread.Do you think this problem is the same as the native paint worklet? Or is this a separate issue?
Thanks for the information and for digging in to the test case!As not being able to schedule GC without an isolate, as far as I know we can't use GarbageCollected types without GC. NativePaintWorklet, so requiring an isolate to schedule GC means that the only way we can instantiate / use Blink GC classes on another thread is to also instantiate an isolate on that thread, which IIUC has non-trivial performance implications (e.g. runtime and memory). Is this correct? If so, could we revisit this decision / consider other ways of scheduling GC?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/memory-dev/CAH%2BmL5CFn3VDQDjRScVDFqKrTGA4sSP20DC%2Bb0naKGDf2Wz2Lg%40mail.gmail.com.
Some users disable JavaScript (this is a legitimate use case). We need to make sure that Oilpan is triggered even if no v8::Isolate is created.
I thought it was working with the existing in-Blink Oilpan. Is it not the case with the Oilpan library?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/memory-dev/CALRxhAvygWbB9KHb_f%3DbJL5T9yjP8nVi3N9MKMJXAj%3D1oLU01A%40mail.gmail.com.
Is it possible that there is a generic problem of objects that are supposed to be garbage collected being missed under some circumstances, such as when running on secondary threads?
The (now fixed) issue with IDBFactory related leaks (crbug.com/1183081) and some still open similar issues (crbug.com/1208061). Is there enough commonality here that we should be looking at automated ways to either fix or detect these?
I'm confused by the claim that we never had such issues. Isn't crbug.com/1183081 an example of such an issue? That was causing 50+ MB/day of leaks on my home laptop and was only noticed because there was an associated handle leak, and my (vague) understanding was that it was somehow GC related.
#0 0x560846ee7b29 base::debug::CollectStackTrace()
#1 0x560846e149a3 base::debug::StackTrace::StackTrace()
#2 0x5608466bb4f3 blink::ThreadState::SetGCPhase()
#3 0x5608466bf342 blink::ThreadState::AtomicPauseSweepAndCompact()
#4 0x5608466c0eb2 blink::UnifiedHeapController::TraceEpilogue()
#5 0x560845644b48 v8::internal::LocalEmbedderHeapTracer::TraceEpilogue()
#6 0x56084569aec0 v8::internal::Heap::PerformGarbageCollection()
#7 0x560845697e3f v8::internal::Heap::CollectGarbage()
#8 0x5608456a224d v8::internal::Heap::FinalizeIncrementalMarkingIfComplete()
#9 0x5608456b6bcb v8::internal::IncrementalMarkingJob::Task::RunInternal()