Content-Length: 301778 | pFad | https://github.com/flutter/flutter/issues/167889

1B PlatformThread Deadlock caused by RasterThreadMerger with multiple engines. · Issue #167889 · flutter/flutter · GitHub
Skip to content

PlatformThread Deadlock caused by RasterThreadMerger with multiple engines. #167889

@iamjinge

Description

@iamjinge

Steps to reproduce

Image

When RasterThreadMerger::MergeWithLease is called right after fml::TaskRunner::RunNowOrPostTask and before latch.Wait, the platform thread will be blocked by deadlock.
I found a closed issue of ios: #94524. This issue was fixed by rendering platform views without merging the raster thread on ios platform. Is there any plan to fix this issue on android or other platforms?

Expected results

I have an idea:
Provide a function TaskRunner::RunSyncTask. In this function, mark blocked_queue_id = MessageLoop::GetCurrentTaskQueueId(). In DelayedTask, add a filed blocked_queue_id_. Tasks with blocked_queue_id_ have the highest priority. In MessageLoopTaskQueues::Merge, flush all bloking DelayedTasks of subsumed task queue.

Actual results

PlatformThread Deadlock

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectengineflutter/engine repository. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/flutter/flutter/issues/167889

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy