# Cannot fork when opening shell?



## kenny (Jan 29, 2003)

I've seen this before, and I think rebooting (or logout/login) fixes it, but it's happening again, and I'm hoping that someone has some insight as to how to prevent it in the first place. This is 10.2.3, BTW...

On my iBook, I had Terminal open and tried to open a connection via ssh to my desktop machine. ksh complained (after a 1 minute or so timeout) that it couldn't fork, and returned me to a prompt. So, I tried to open a new window (CMD-N), which never gets a prompt; it's just blank, and the window title is "Completed Command". I'm assuming that behind the scenes, the fork failed again and terminal just gives up.

Then, I VNC'ed over to my desktop and tried to ssh back to my iBook: 


> Last login: Mon Jan 27 22:41:34 from 192.168.1.65
> Welcome to Darwin!
> 
> 
> ...



This attempt is also seen in slick's (the iBook's) system.log: 



> Jan 29 08:33:52 Slick sshd[2608]: Accepted password for kenkl from 192.168.1.155 port 50134 ssh2
> Jan 29 08:33:52 Slick sshd[2610]: Disconnecting: fork failed: Resource temporarily unavailable



So... anyone have a clue about what 'resource' has gone missing that would prevent me opening my shell?

I know  a reboot will fix this, and I'll go do that after posting this thread, but....


----------



## lurk (Jan 29, 2003)

It looks like the system has been fork bombed.  That can happen by accident so it may not be malicious.  Start a terminal and run top in it then on the first line look at the number of processes running right now I have 57 on my powerbook and even up to around a hundred would be normal for a single user machine.  Now leave that in the background and look at it now and again.  When that machine locks up there should be lots of processes, look at what they are the culprit should be obvious.


-Eric


----------

