After Windows 10 Fall Creators Update, a svchost.exe instance is constantly using CPU time

10

8

Since installing the Windows 10 Fall Creators Update, I have a svchost.exe process that is constantly using about 14​ % of CPU time:

graph of CPU utilization

This svchost.exe instance is responsible for hosting three services:

Base Filtering Engine, CoreMessaging, Windows Defender Firewall

The CPU time is consumed by a thread inside that process that Process Hacker cannot attribute to any of these three services:

screenshot from Process Hacker

Given that these three services are considered critical system services, it's hard to do anything about them. These services cannot be stopped or disabled by services.msc, and terminating the process triggers a bugcheck (CRITICAL_PROCESS_DIED). Disabling the Windows Defender Firewall through the settings UI does not reduce CPU usage.

I'm out of ideas. What could be causing this? How can I debug this further? Is there a workaround to stop these services?


Update: After some debugging with @HelpingHand, we've isolated this to the Windows Defender Firewall service. Process Monitor shows that it's constantly accessing the registry:

screenshot from Process Monitor

A CSV export of a Process Monitor capture, filtered to that process, is available here.

I’m still looking for a way to stop that behavior.


Update 2: Analysis with the Windows Performance Analyzer shows that most CPU time is consumed by code from rpcrt4.dll:

screenshot from Windows Performance Analyzer

fefrei

Posted 2017-10-19T17:46:44.070

Reputation: 347

1If you run the following 2 commands in an admin prompt and restart; if any, which svchost process is causing the high CPU then: Sc config BFE type= own then Sc config MpsSvc type= own – HelpingHand – 2017-10-19T18:56:40.090

Running any of these commands returns [SC] OpenService FAILED 5: Access is denied., despite running in an administrative command prompt. – fefrei – 2017-10-19T19:43:42.090

1As you have Process Hacker already, if you find the svchost process that is hosting BFE for example. If you double click on service name in the services tab, then view the security tab, I would have thought Administrators would have modify configuration rights. The above works for me. – HelpingHand – 2017-10-19T20:11:23.760

Interestingly, I able to grant Administrators the rights to modify the service configurations (I thought these were protected services that didn't allow that). After a reboot, the guilty party stood out: MpsSvc, a.k.a. the Windows Defender Firewall. One step closer, thank you!

– fefrei – 2017-10-19T20:22:23.793

1Maybe you can now run Process Monitor with it filtered to that PID. See what shows up. – HelpingHand – 2017-10-19T20:50:35.113

That also worked out, and looked pretty repetitive. I've edited the results into my question. – fefrei – 2017-10-19T21:09:17.947

1

It does on my computer as well. TBH, I think your best bet is to install the Windows Performance Toolkit tools - https://docs.microsoft.com/en-us/windows-hardware/test/wpt/. Essentially you'll be using Windows Performance Recorder to capture a trace file and Windows Performance Analyzer to analyze it. https://channel9.msdn.com/Shows/Defrag-Tools has some good shows on these.

– HelpingHand – 2017-10-19T21:39:58.407

@fefrei - Instead of including the resolution/answer into your question you should submit an answer. – Ramhound – 2017-10-19T22:21:21.323

@Ramhound This isn’t an answer, just some clues on the way to an answer. The process is still running and eating CPU time. I’ll try to clarify this. – fefrei – 2017-10-20T04:03:19.223

I realized that when the service is started manually, it doesn't start eating up CPU. As a workaround, I've not set the service to be started manually. It still starts automatically (probably because some other service starts it), but this way, it starts late enough not to cause problems. Weird! – fefrei – 2017-10-20T09:47:28.610

1

don't sort by module. remove this column. also trace the RPC events. download this file, run WPRUI.exe, click on add profile, select the downloaded WPRP, select CPU Usage Profile and Network Usage profile under Custom measurements. click on start and capture the usage for 30s. now look which PID has the high cpu usage and in generic events graph/table filter for the exe with the high usage and RPC events and look which rpc action are done

– magicandre1981 – 2017-10-20T14:13:33.073

1

More discussion about this high CPU with FCU problem can be found here, https://www.tenforums.com/general-support/95844-fall-update-v-1709-creates-problems-cpu-usage-desktop-wallpaper-4.html.

– Adrian – 2017-10-20T16:26:45.853

@Adrian: Thank you for this link! @magicandre1981: Thanks! If I interpret the output correctly, MpsSvc has thousands of Microsoft-Windows-RPC/RpcServerCall/win:Start and win:Stop events. The client side of these requests is an svchost.exe instance hosting the netsvcs service group, according to Process Hacker. Task Manager identifies this as Internet Connection Sharing, which indeed consumes CPU power and is stuck in Starting (hadn't noticed that before). – fefrei – 2017-10-20T17:25:31.803

1if you don't use Internet Sharing, set start type of ICS to "on demand" or disabled. – magicandre1981 – 2017-10-20T17:40:43.107

I set it to disabled. After a reboot, that had magically changed to Manual (Trigger Start), but things did calm down. Hooray! While this isn't the root cause, your hints absolutely answered my question what the service was doing and led to a workaround that works for me. Would you mind posting your hints as an answer so I can accept them? – fefrei – 2017-10-20T17:45:37.530

1you discovered 95% on your own. I only gave you a small hint. Post your own find as answer. – magicandre1981 – 2017-10-20T18:03:24.340

Answers

10

As it turns out, this was related to Internet Connection Sharing (ICS).

In the following, I'd like to describe how I got to this conclusion in hope it helps other people with similar problems.


The first step is to identify the service causing trouble. While Windows' own Task Manager has also learned to do this recently, I used Process Hacker which can also edit a service's configuration.

Double-clicking the offending svchost.exe instance and selecting the Service tab shows which services are running inside that process:

svchost.exe (1688) Properties

svchost.exe can host many Windows services at the same time, making it hard to identify which service is causing trouble. While recent versions of Windows 10 typically isolate services when enough RAM is available, some services still share a process.

This is such a case, and the easiest way to identify which service is causing problems is to separate them.

Process Hacker can do this. In its main windows' Service tab, we can configure whether a service can share a process:

MpsSvc Properties

At least two of the three suspect services need to be configured as Own Process to make sure they are separated in the future.

Apparently, Windows Defender doesn't like users meddling with its service's configuration, so to successfully change this setting, I needed to

  • grant the Administrators group Full Access on that service,
  • disable the service,
  • reboot so the service is stopped (it cannot be stopped separately),
  • change the service type to Own Process and re-enable the service (set it to Auto Start) and
  • reboot one last time to apply these changes.

After that, the offending svchost.exe only hosts a single service, so we do have a suspect:

Windows Defender Firewall (MpsSvc)

To analyse what's going inside the firewall service, we'll use the Windows Performance Recorder and Windows Performance Analyzer tool, part of the Windows ADK.

We'll begin by recording some data. While the suspect svchost.exe is chucking along in the background, download this file, add it as a profile, set up Windows Performance Recorder like this and start a recording:

Windows Performance Recorder: check First level triage and CPU Usage Profile

Let the recording run for 30 seconds or so, then save the recording. After saving, click Open in WPA to immediately open it for analysis.

This is where things start to become tricky. In my case, I needed a hint from @magicandre1981 to look in the right place, under System ActivityGeneric Events. There, the number of RPC events looked suspiciously high:

46.918 Microsoft-Windows-RPC events

Drilling down, the Windows Defender Firewall's svchost.exe was showing up a lot on the Server side of win:Start and win:Stop events:

RpcServerCall

The next step was finding out who sent these RPC calls. By looking in the client side, another svchost.exe instance was looking suspicious:

RpcClientCall

Indeed, Process Hacker couldn't detect a service running inside that process, which also was consistently causing CPU load:

Service group name: netsvcs

In this case, Windows' Task Manager succeeded in identifying the service:

Internet Connection Sharing (ICS)

Indeed, the service was stuck in the Starting state. I've disabled it since I don't need it, and CPU load has returned to normal after the next reboot.


I'd like to express my gratitude towards @HelpingHand and @magicandre1981 whose help in the comments made this possible.


As was later discovered in the TenForums post, resetting Windows Defender Firewall fixes this issue.

fefrei

Posted 2017-10-19T17:46:44.070

Reputation: 347

@HelpingHand: what happens if one disable the Internet Connection Sharing (ICS) services? Will WiFi Hotspot no longer be an option? – llinfeng – 2017-11-12T00:46:32.603

This is slightly easier within Process Explorer. If you right click the "svchost.exe" which is utilizing a constant processor amount (my case was 5% constant) and click the "Services" tab you'll see what service(s) are running under this svchost. I had only one in this case, ICS. Similarly my Internet connection sharing was stuck in a starting state.

Going to "Firewall & Network Protection" I was able to click "Restore firewalls to default" - this instantly fixed my problem. – Howard Lince III – 2018-04-03T13:49:44.420

@Howard: Consider yourself lucky – one mayor complication for me was three services sharing the problematic instance of svchost.exe, making it hard to identify the service causing this. I'm not sure why they didn't share a host process in your instance. – fefrei – 2018-04-03T17:09:10.973

2

It's more simple, I have had success by resetting their Windows Firewall settings (particularly if there's a related spike in CPU load) using this instructions :-

Resetting the Windows Defender Firewall to the default settings resolved the issue.

To do this open Settings -> Update and Security -> Windows Defender -> Open Windows Defender Security Center -> Firewall and Network Protection -> Restore Firewall default settings

Hope this helps and works for someone else... Seems like a fairly widespread issue.

Mohamad Osama

Posted 2017-10-19T17:46:44.070

Reputation: 21

1Indeed, this also worked for me, as I mentioned at the very bottom of my answer. Thanks for mirroring the steps here! – fefrei – 2018-03-11T13:50:51.147

0

In my case, after trying various unsuccessful fixes (including some of the above suggestions e.g. resetting Windows Firewall), I disabled the "Diagnostic Policy Service", and CPU hogging finally ceased. This may not be the ideal solution, but it doen't seem to be a critical service. Here's how to disable it :

  1. Open "System Configuration" ('msconfig.exe') as admin
  2. General tab : choose "Selective startup"
  3. Services tab : uncheck "Diagnostic Policy Service"
  4. Reboot Windows

Thanks to Ranga Rajesh Kumar's YouTube channel for pointing me toward this solution.

Philly Dee

Posted 2017-10-19T17:46:44.070

Reputation: 1