2

I had a terminal session open and after I woke my laptop up I cannot use the terminal nor create new sessions.

The error I get on the opened session is:

-bash: fork: Resource temporary unavailable

The error when trying to open new terminal:

[forkpty: Resource temporary unavailable]
[Could not create a new process and open a pseudo-tty.]

Looking deeper, I was able to open the Activity Monitor and I found that there was a very large number (thousands) of processes linked to the same application, VShildScanner. From here, I wasn't able to kill those processes.

I tried to restart or shutdown the system, since I wasn't able to do anything else, but those also failed. I was only able to power cycle.

My thought was to run a killall from the terminal but I can not get a functioning shell / terminal window once the system is blocked.

Are there better ways to handle such a situation when processes grow out of proportions?

  • 2
    Wonderful edit and getting Activity Monitor to confirm resource exhaustion as the cause. – bmike Feb 2 at 23:49
2

Your machine definately has too many processes running which is the typical reason for that error message and aligns with Activity monitor. Since you can't restart or shut down, I would have only the following:

  • quit any / all apps you can and very quickly get a new terminal / shell running. There's small chance you will get a process before the runaway one uses up any freed resources, but you might get lucky: you only need one fork/exec/thread to get a shell.

If not, you will likely need to try escalating steps like log out of the user session and then back in. (or restart or shut down or pulling the power or holding the power button to disrupt all power and hard halt the machine.)

Maybe sshd is running and you could attempt that or Remote Desktop to connect as a second user if you have both screen sharing and another account set up. Again, it's not likely the system stat will allow new processes, but it's worth trying.

Sorry the VShildScanner process is misbehaving. This is a case where the "virus software" is worse than the protection it offers.

  • It's also possible there's something in ~/.bashrc (or another shell startup file) that's spawning infinite processes (or ttys). – Gordon Davisson Feb 2 at 1:58
  • Yes indeed @GordonDavisson that looping would surely do the deed and block up all the ulimit type controls to prevent resource exhaustion. – bmike Feb 2 at 2:11
  • Please see my updated question. – slybloty Feb 2 at 23:39
  • 1
    @slybloty Very nice improvement - it's clear the virus / macafee has run amok and blocked you. Since that runs as root / elevated, it will lock the entire system. You'd have more luck with my suggestions if the program that blocked you ran as your user and not as elevated / kernel permissions. – bmike Feb 2 at 23:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .