Closed Bug 1727975 Opened 3 years ago Closed 3 years ago

is Schedule code can make infinite loop?

Categories

(Core :: IPC, defect)

Firefox 93
defect

Tracking

()

RESOLVED DUPLICATE of bug 1724980

People

(Reporter: mix5003, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

i just try to figure out why firefox use too much cpu from this profiler https://share.firefox.dev/3mGErqk

and form some code that i think it may make an infinite loop but i still not sure.
from this https://searchfox.org/mozilla-central/source/ipc/glue/IdleSchedulerParent.cpp#409.

if idleRequester->IsWaitingForIdle() and idleRequester->mRequestingGC is true at the same time idleRequester->remove(); will never call isn't it?

i am not good at C and firefox architecture so i don't known that idleRequester->IsWaitingForIdle() and idleRequester->mRequestingGC can be true at the sametime or not, or it may be change at next Schedule so it may not cause any problem at all

Component: Untriaged → IPC
Product: Firefox → Core

(In reply to mix5003 from comment #0)

i just try to figure out why firefox use too much cpu from this profiler https://share.firefox.dev/3mGErqk

This profile contains mostly profiler overhead. If you are trying to understand CPU use, you should not enable the memory allocation recording features. I would suggest keeping the default profiler settings unless you have a specific need for one of the non-default features.

As a first step, you can use about:processes (after setting toolkit.aboutProcesses.showThreads to true in about:config) to identify the threads that are using CPU. Then profile only these threads.

actually i try default setting but found nothing. it report that cpu usage at most 10 percent at peak.
but my task manager said that process (PID 4504 in profiler) has use 100% of 1 core.
so i try to enable everything to see what thread that usage my cpu.
next time i will try to focus some thread from info in about:processes. after set toolkit.aboutProcesses.showThreads = true.

but i open this bug because i found that some process in that profiler.
if you show only IPC Web Content and IPC I/O Child in PID 4504 (Web Content 8/8) you can see that it send Msg_IdleTime and Msg_RequestIdleTime too much. and other process not send that much.
you can see at this link https://share.firefox.dev/3DvMmg1 (same profiler just focus on IPC I/O Child in PID 4504 and compare with PID 18792 that has nothing about IPC I/O Child)

(In reply to mix5003 from comment #2)

if you show only IPC Web Content and IPC I/O Child in PID 4504 (Web Content 8/8) you can see that it send Msg_IdleTime and Msg_RequestIdleTime too much. and other process not send that much.

This looks like a duplicate of bug 1724980.

As a side note I landed bug 1727137 today that will ensure the idle runnables have a name, so we will know for sure what is running.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.