hashcat Forum
Already an instance running on pid 5 - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Already an instance running on pid 5 (/thread-7273.html)



Already an instance running on pid 5 - tea-er - 02-06-2018

Dear All,

I make a mistke that ctrl + C when i doing a hashing. That is always show me the message "Already an instance running on pid 5" so i can not do another hashing.
i am new to Hashcat and linux, any one can help me on this?

thanks a lot!


RE: Already an instance running on pid 5 - philsmd - 02-06-2018

I'm not sure exactly what the problem is and why a second instance is still running.

Anyways, to solve it you just need to stop the second instance (either via job control - or "task manager"-like - or by killing the process).

e.g. something like:
Code:
pkill hashcat

You could also just restart the system (if that is doable/possible on your system).

Of course if this happens very often you might need to check what exactly is causing this problem.
BTW: with --sessions you might be able to run multiple instances, but it's not a good idea to run multiple long/heavy cracking jobs simultaneously on the same system.



if the problem persist across reboots, it might be possible to just remove the .pid file (or download a fresh copy of hashcat and run that new/clean version instead).


RE: Already an instance running on pid 5 - tea-er - 02-06-2018

hi phlismd,

thanks for your reply.

i am doing another hashing with --session right now. reboot system and pkill hashcat is not working for me.

i dont know what problem is, but still thanks!

have a good day !


RE: Already an instance running on pid 5 - philsmd - 02-06-2018

Please do one of the following actions:
1. after stopping your current running hashcat instance (the one with --session etc), delete the file "hashcat.pid" from the main hashcat folder
2. copy all your important files (including the pot file if you cracked some hashes, dictionaries, hash files etc) from your hashcat folder into a save place, delete the whole hashcat folder, download a fresh copy of hashcat from https://hashcat.net/hashcat , extract the 7-Zip file and copy your important files back to the new extracted folder

This problem could occur if hashcat was unable to safetly remove the hashcat.pid file when it was killed/quit


RE: Already an instance running on pid 5 - undeath - 02-06-2018

Shouldn't hashcat check if the pid from hashcat.pid does actually belong to a running process?


RE: Already an instance running on pid 5 - philsmd - 02-06-2018

It does. It looks if that specific process id found within the hashcat.pid file is still running.
Since tea-er's pid is strangely pid 5 (wtf ?) it might be the case that it always finds a pid with pid 5. not sure why it is pid 5.
Still, by deleting the hashcat.pid file the problem should be kind of "bypassed". In theory we should check if the "cmdline" file under /proc/$pid/cmdline also says that this PID is a "hashcat" command, otherwise this could be kind of misused as a dos (denial of service, e.g. with pid 1).
In theory, we could also check that the pid is not too low (e.g. 0, 1 etc)


RE: Already an instance running on pid 5 - atom - 02-07-2018

I think once the pid > 64k it goes back to 0. In that case the user can have hashcat running on 5.


RE: Already an instance running on pid 5 - tea-er - 02-09-2018

hi philsmd,

I reinstalled the system to resolve this issue.
I will follow your guide when I face same issue next time.

Thanks for your reply and sorry for reply you later.

have a nice day!