3

First off:

  • Windows 10 Professional build 17134
  • Intel i5-6500 3.2GHz
  • 8GB DDR4 RAM
  • MSI GeForce GTX1070 8GB

So for the past two weeks I've been having problems with my Windows 10 Pro machine:

  • Applications will start to give errors, usually memory related
  • Chrome won't work anymore
  • Task Manager won't open
  • Suddenly both my screens turn black
  • Computer is completely frozen on the black screen, I can't do anything and no sounds or anything play (Ctrl+Alt+Del, Ctrl+Shift+Esc, Alt+Tab don't work)

All that's left for me to do is to hard reboot my PC.

So I've been digging around, trying to find out what was going on. The Event View told me something was wrong with my memory. Still, there was nothing related to the crash, simply that my page file is full. There's some warning about applications timing out and memory running out, then nothing until I restart my PC. Here's a dump of the last few logs from the Event Viewer.

So here's what I tried

  • Ran a Windows Defender offline scan
  • Used MalwareBytes to scan my PC
  • Updated my GPU drivers
  • Updated my BIOS (as told by Microsoft support)
  • Increased the Pagefile from max 16GB to max 24GB (I have 8GB physically)
  • Ran "DISM.exe /Online /Cleanup-image /Restorehealth" and "sfc /scannow", found and fixed some errors, problems persist
  • Ran MemTest86, no errors found

I then decided to keep the Resource Monitor open and when I came back to my PC a while later I noticed it had pretty much frozen, but I could still see the Resource Monitor. Everything seemed to be normal but "taskhostw.exe" was using up 24GB of memory!

So that explains why I kept getting memory errors and why my pagefile was filling up. Any fix for this?

Edit:

I managed to find the process in Process Explorer, here's what it showed:

Screenshot of process

Any ideas on how to troubleshoot further?

s1h4d0w
  • 308

2 Answers2

2

taskhostw is the container that runs system services, of which there are dozens of instances running on your computer.

It does not help to update drivers and the operating system blindly. You need to analyze which system service is using the CPU.

This is complicated by the fact that each taskhostw instance may house several system services.

See this answer to see how to analyze which taskhostw instance is causing the problem, then how to separate all the system services it supports into separate taskhostw instances.

Once you know the exact system service that is the root of the problem, let us know for further advice.


If it's hard to find the cause once the system is paralyzed, in similar cases I have added to Task Manager Details view the column "Working set (memory)" and sorted the display by it, then left it on the screen.

Most times you will see memory usage climbing and be able to identify the process before the freeze, then right-click it and do "Go to service(s)". Remember that one such process may contain other services further down the list. If there is more than one, execute the above-linked procedure to separate them, until you find just the one service.

harrymc
  • 498,455
1

Possible answer:

Today I used Process Explorer again to check out the process that was eating up my memory. Because this problem has been going on for months I now have the habit to check my task manager everytime I start to use my PC. And what do you know, taskhostw.exe was up to it's old tricks, but was only using about 4GB of RAM instead of 22GB. It was also putting 25-30% load on my CPU, which was new.

This time I noticed the "Parent" of the process, which said svhost and a PID. I used that to find the corresponding service, which was "Schedule". I started googling some random stuff related to task scheduler and taskhostw and svhost. There I completely randomly stumbled upon a post on the Microsoft community about the StorageSense task.

That was something, but I wasn't sure if that was it. Looking at the threads in Process Explorer again I suddenly saw a 5th thread that I hadn't seen before. It was named StorageUsage.dll!GetStorageUsageInfo and was the exact thread the poster on the Microsoft community had.

My speculation is that the process keeps asking for more and more memory, which eventually gets the process itself in trouble and kills off the StorageUsage thread. My own tests seem to confirm this, because if I kill the StorageUsage thread and leave the other be the process stops using my CPU for 25-30% but the RAM usage stays the same. By killing the Storage thread the process suddenly looks exactly as when I find it when my PC is starting to freeze, no CPU usage and a load of RAM in use.

I've disabled the task, let's hope this works! If this does indeed help I'll be sending in a ticket to Microsoft as this seems like their doing.

s1h4d0w
  • 308