How can I kill an unkillable process?

12

6

I closed an application, but the process remained in the list. I try to stop in from the task manager, but nothing happens. No error messages, process just stays in the list. I try to debug it, but the debugger says:

Unable to attach to the crashing process. The requested operation is not supported.

This happens with VS2008 and some other programs, sometimes.

How to terminate it?

skevar7

Posted 2010-04-30T06:56:59.263

Reputation: 925

That's one of the reasons I switched to Linux. Though I experienced this problem under Win XP, it seems that it hasn't changet since then. – petersohn – 2010-04-30T07:07:39.450

Mark Russinovich's article "Unkillable Processes" says that you can use a local-kernel-debugging tool to find out why a process is unkillable. The article gives you instructions on what to do. You'll need the freeware Debugging Tools for Windows. – unforgettableidSupportsMonica – 2017-03-20T12:11:52.620

4

According to http://samba.2283325.n4.nabble.com/What-causes-an-unkillable-process-td2494666.html there's exactly the same situation in Linux - processes waiting on the kernel are unkillable. This is one of the reasons I switched to Windows.

– ta.speot.is – 2011-06-12T02:25:38.947

Answers

11

Unfortunately, the only real recourse is to reboot.

I've had this problem too, and I could find absolutely no way to successfully kill the crashed process. I tried just about every pskill/similar app I could find, and they all fail.

As I understand it, the most common cause of this problem is when the offending process loads a system driver, and then sends it an request that it fails to complete. Apparently the kernel can't properly deallocate the memory from the process when it closes because the crashed driver is in a IO wait state that requires access to the process address space.

(Mostly cribbed from) http://blogs.technet.com/markrussinovich/archive/2005/08/17/unkillable-processes.aspx

Fake Name

Posted 2010-04-30T06:56:59.263

Reputation: 2 134

2Yup, that is certainly the most common cause of this sort of thing. Most of the unkillable processes I have seen were either related to the CD-drive (eg EAC.EXE) or the TV tuner/video card (eg ATIMMC.EXE). In both cases, it comes down to a driver fault, and anyone who’s learned and done driver work will know how problematic things can get at that level, and what kinds of seemingly “strange” effects they can have in userland (BSODs at least are definitive and clear). – Synetech – 2011-06-12T03:24:12.187

1@ Synetech inc. - All the problems I had were disk related, or in software that really had no need for a driver at all (I have NO idea why the decided they needed to run in the kernel). I don't think you can make any blanket statements about what kind of software has most often has un-killable crashes. – Fake Name – 2011-06-13T00:40:53.810

3

Process Hacker has a Miscellaneous → Terminator command that will try a bunch of different methods to kill your process:

failing on most attempts

full descriptions

In my tests, all this did was lock up Process Hacker and turn it into an unkillable process too, but maybe it will work in some cases.

endolith

Posted 2010-04-30T06:56:59.263

Reputation: 6 626

2

Terminator has been removed from Process Hacker and moved into a plugin. There was a forum thread about it. The maintainer claimed: "Terminator is useless ... because it isn't any more effective than the normal terminate functionality." Some people replied and disagreed.

– unforgettableidSupportsMonica – 2017-03-02T00:55:18.040

Later, dmex moved Terminator into a plugin. The source code is here. As of this writing, there's no binary yet. When the binary is released, it will be published to the dmex releases page.

– unforgettableidSupportsMonica – 2017-03-02T00:55:20.943

1

I filed a feature request just now, requesting a compiled version of Terminator. For now, I guess you could use any version of Process Hacker older than 2.39. For example, you could use version 2.38, which is available here.

– unforgettableidSupportsMonica – 2017-03-02T01:05:23.833

There is also the option that a debugger was attached and reason not to kill is that. Miscellaneous detects that and adds detach debugger – Ghita – 2017-03-22T18:56:40.573

2

Sometimes the process could be blocked on a resource or thread or something, and quitting or freeing that up, frees the process and lets it end. It is somewhat similar to how when you delete (to the recycle bin) a file in Explorer that is in use, it doesn’t actually go away and seems stuck (without immediately returning an in-use/locked error), but if you quit the program that has it locked within five seconds, the file suddenly disappears.

I have seen this happen on occasion, especially with programs that have a pop-up dialog or something that somehow gets hidden; finding a way to dismiss the dialog allows the thread to terminate, thus allowing the process to end.

I suspect that with the increase in, yet still relatively new practice of multi-threaded programming, things like this will become more common, at least for a while.

Synetech

Posted 2010-04-30T06:56:59.263

Reputation: 63 242

0

It is likely that the programs you are using were developed before Windows Vista/7 and are incompatible with the changes made.

Your best bet is to locate the executable for the programs which have this problem, right click, go to properties, then select compatiblity, finally select Windows XP as the compatibility mode.

Daisetsu

Posted 2010-04-30T06:56:59.263

Reputation: 5 195

0

launch CMD as admin, and use taskkill to force it off. Example:

taskkill /F yourprogram.exe

OR

taskkill /F /im yourprogram.exe

If you're stuck on the CMD taskkill syntax, type taskkill /?

Ethan J.

Posted 2010-04-30T06:56:59.263

Reputation: 9

1Welcome to Super User! Although this may help to solve the problem, it doesn't explain why and/or how it addresses the issue. Providing this additional context would significantly improve its long-term educational value. Please edit your answer to add explanation, including what the parameters do and what limitations and assumptions apply. Thanks. – fixer1234 – 2018-12-20T15:51:10.783

ERROR: The process "AutoHotkeyU64_UIA.exe" with PID 16872 could not be terminated. Reason: There is no running instance of the task. – Shayan – 2019-11-04T14:17:20.370