New issue
Advanced search Search tips

Issue 913629 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

TaskSchedulerServiceThread jank in AdjustMaxTasksFunction

Project Member Reported by etiennep@chromium.org, Dec 10

Issue description

From slow reports, we're seeing common jank on the service 
thread in AdjustMaxTasksFunction on windows and mac.

Example traces:
fb8677383d15d2df (16s)
233a4d5500d215f5
a7dd8628e5b33442
b8c0233183e9d874
dbd14213a264a50d
ca02bcf0611b131a

That might be related to thread creation, crbug/907119.

 
Components: Internals>TaskScheduler
Labels: Hotlist-Jank
Labels: Hotlist-SamplingProfilerInField Performance-Browser
Interesting, agreed it's most likely caused by thread creation. FWIW, if thread creation jank is unavoidable, the ServiceThread is a pretty good place to have it (as opposed to synchronously during PostTask).

We think we can reduce thread creation by introducing a better detach strategy however and etiennep will be working on that.
Cc: -fdoray@google.com fdoray@chromium.org
The fix to create threads outside the pool lock landed in 73.0.3627.0 (https://chromiumdash.appspot.com/commit/611b929334504e26de879b7ea240162ff06fd0b0).

As etiennep@ said, crash/fb8677383d15d2df contains a 16 seconds AdjustMaxTasks(). Just before the AdjustMaxTasksEnd(), a "PostLaunchOnLauncherThread" task ends on the main thread. This task stays stuck in the following stack for a long time:

 NtSetValueKey
 kernelbase.pdb
 kernelbase.pdb
 base::win::RegKey::WriteValue(wchar_t const *,wchar_t const *)
 `anonymous namespace\'::WriteUserGoogleUpdateStrKey
 GoogleUpdateSettings::UpdateDidRunState(bool)
 content::NotificationServiceImpl::Notify(int,content::NotificationSource const &,content::NotificationDetails const &)
 content::RenderProcessHostImpl::OnProcessLaunched()
 content::ChildProcessLauncher::Notify(content::internal::ChildProcessLauncherHelper::Process,int)
 content::internal::ChildProcessLauncherHelper::PostLaunchOnClientThread(content::internal::ChildProcessLauncherHelper::Process,int)

What could make a write in the registry take so much time?
Interesting, I don't have symbolized stacks in this trace though? (How do I see the post-processed traces?)

I notice that
src_file	"../../net/disk_cache/blockfile/in_flight_backend_io.cc"
src_func	"OpenNextEntry"
also runs long and completes at the same time on CacheThread_BlockFile.
Status: Assigned (was: Untriaged)
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this.

Sign in to add a comment