Fatal processes often hang for a long time

After reinstalling Windows 7 Ultimate 64-bit SP1, sometimes processes take a long time to shut down. This happens most often when you start them from VS2010, but this is not limited to this. A common case is a Windows application with a console (/ SUBSYSTEM: console), which seems to close properly, but the console remains open for seconds or minutes. In the end, the message β€œpress any key to close” appears on the console, and the process can be completed.

How can I diagnose this problem?

  • I installed Windows 7 Ultimate 64-bit SP1, but this time the version of vanilla (and not N)
  • The only driver I installed manually was the NVIDIA display driver, but I tried several versions of WHQL
  • Symptoms closely match. Visual Studio debugging console sometimes remains open and cannot be closed. However, even non-connected applications will be affected.
  • Both native and managed applications suffer from this.
  • WRONG: I believed that only 32-bit processes were affected, but 64-bit were also affected.
  • if the debugger is already connected and I interrupt during the process, the debugger says:

The process seems to be at a standstill (or not a single user-mode code is running). All threads are stopped.

  • I cannot connect the debugger to the process while it is in this state
  • I cannot kill these zombie processes from the task manager or ProcessExplorer, even when closing all the handles that belong to the specified processes. (I can't close lsass.exe with handles, though)

  • ProcessExplorer says the single-thread freeze function is that every hanging process has ntdll! RtlDosSearchPath_Ustr.

  • In most cases, I have to close Visual Studio completely so that the zombie processes close.
  • The last event that Process Monitor sees during a hang in each case is the exit from the thread, which succeeds, and it looks like the exit takes normal time. When the process finally closes, no events show.
  • LiveKd shows nothing when I follow the steps described at http://blogs.technet.com/b/markrussinovich/archive/2005/08/17/unkillable-processes.aspx

It seems that a bad driver is the culprit, so I will reinstall Windows soon.

+4
source share

Source: https://habr.com/ru/post/1389558/


All Articles