Wdindows 2012r2 Taskkill not working

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
friagram
New to forums
New to forums
Posts: 10
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Feb 15, 2014 2:32 am

Wdindows 2012r2 Taskkill not working

Post by friagram »

Using taskkill sometimes fails to end certain proccesses. This has never been a problem on 2008r2.
This is annoying with SRCDS.exe hanging as it not only uses memory, but hogs the port.

There's a KB article for it here: http://support.microsoft.com/kb/2798040
However, the update does not seem to fix the problem, which usually happens when the server is under a lot of load.

I run the task as a seperate user, and using taskkill to kill all of that user's proccesses used to ensure that the proccess would end. If I use proccess explorer (http://technet.microsoft.com/en-us/sysi ... 96653.aspx) I am able to end the task manually. However, I use a batch script that queries the server and issues a taskkill to restart it, which obviously won't work in this case. Is there a fix for this, or some command line application that will work to replace taskkill, which I can use to kill all of a user's proccesses?
friagram
New to forums
New to forums
Posts: 10
Joined: Sat Feb 15, 2014 2:32 am

Re: Wdindows 2012r2 Taskkill not working

Post by friagram »

Also, it seems to crash often after updates/restarts. I don't know if this is due to the hypervisor, but it's pretty much just a stock install with updates. Never had this problem with 2008r2 on my other VDS.
User avatar
Spray
Former staff
Former staff
Posts: 630
Joined: Wed Dec 28, 2011 10:41 pm
Location: Oregon

Re: Wdindows 2012r2 Taskkill not working

Post by Spray »

Please right-click on the Windows start icon then choose System. Select the Advanced tab and then click Environment Variables. At the system variables panel, choose Path then click the Edit button. Ensure that the following is listed:

%SystemRoot%\system32;
friagram
New to forums
New to forums
Posts: 10
Joined: Sat Feb 15, 2014 2:32 am

Re: Wdindows 2012r2 Taskkill not working

Post by friagram »

Spray wrote:Please right-click on the Windows start icon then choose System. Select the Advanced tab and then click Environment Variables. At the system variables panel, choose Path then click the Edit button. Ensure that the following is listed:

%SystemRoot%\system32;
That was one of the things I checked first, my path is set to:

Code: Select all

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
User avatar
Spray
Former staff
Former staff
Posts: 630
Joined: Wed Dec 28, 2011 10:41 pm
Location: Oregon

Re: Wdindows 2012r2 Taskkill not working

Post by Spray »

Do you get any error output from the script when you run it?
friagram
New to forums
New to forums
Posts: 10
Joined: Sat Feb 15, 2014 2:32 am

Re: Wdindows 2012r2 Taskkill not working

Post by friagram »

When I use taskkill, it doesn't find anything or the image name filter (using user /im * to kill all of that users proccesses), or it says the PID doesn't exist.

I could try like PSKILL or something, but most of those utilities don't let me specify the user, so it will just kill all of my SRCDS instances.
friagram
New to forums
New to forums
Posts: 10
Joined: Sat Feb 15, 2014 2:32 am

Re: Wdindows 2012r2 Taskkill not working

Post by friagram »

Seems this is still happening. I can use PSkill on all the image names, but it nukes all of the srcds processes, which isn't good since I have multiple. I tried to use a limited account to execute the kill command with runas, and also with the command switches, but it still kills all of them.

Would you guys happen to know another command line utility that can kill proccesses owned by a specific user?
I don't know why taskkill is failing here, but it's still killing all of the user's tasks except for SRCDS.EXE, and it will sit there trying for hours to kill it, but cannot. I'm pretty sure it's a bug with windows 2012, since other people have reported it on the MS forums, and they have a patch for it (which doesn't work). It might be some service that's enabled that shouldn't be or something with error reporting that is causing it to lock up and not accept normal kill signals. I don't know. Seems like a bad solution to just switch to 2008r2.
User avatar
Edge100x
Founder
Founder
Posts: 13117
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Wdindows 2012r2 Taskkill not working

Post by Edge100x »

Does using the /F option for taskkill make any difference?

Does it work when you specify the specific PID using /PID?
friagram
New to forums
New to forums
Posts: 10
Joined: Sat Feb 15, 2014 2:32 am

Re: Wdindows 2012r2 Taskkill not working

Post by friagram »

I've always used:
taskkill /t /f /fi "USERNAME eq DOMAIN\USER" /im *

The only thing that user account does is run a batch file via runas that launches /restarts SRCDS. There's an administrator account that issues that taskkill command, and checks if the instance is hung or not.

if I specify the PID using taskkill, it says no proccess with that PID exists if I recall correctly. It will not end it, or even try to. It also dissapears from the task bar, and stops having any kind of visible window. It still uses some 400 megs of memory, but no CPU/Disk activity, and it doesn't respond to anything.
If I go into sysinternals process explorer, I can see the instance of SRCDS.EXE running, i'ts parent/hierarchy cmd.exe, the batch that runs it, etc are all gone. I can end it from there just fine, or from task manager, but not with taskkill.
friagram
New to forums
New to forums
Posts: 10
Joined: Sat Feb 15, 2014 2:32 am

Re: Wdindows 2012r2 Taskkill not working

Post by friagram »

Ok, this has been happening for a while, and this is what happens each time:

taskkill /t /f /fi "USERNAME eq xx\yy" /im *
ERROR: The process with PID 2088 (child process of PID 1088) could not be terminated.
Reason: There is no running instance of the task.

When I look at the image, for parent it says: <Non-existant Process>(1088)

if I leave out the /f switch, I just get
SUCCESS: Sent termination signal to process with PID 2088, child of PID 1088.

Either way, the process doesn't end.
Post Reply