I'm running Ubuntu 12.04, and I am having a major problem. Two separate times today, one of my open gnome-terminal sessions locked up and printed the error
pipe: too many open files
I realize that is likely related to my user limit shown with
ulimit -n which, by the way, is 1024. The problem is that once this happens, I can force quit the offending terminal, but then I cannot open anything that will generate a new PID. For example, I can't use
xkill to kill anything, I cannot open another terminal to look at top, I cannot run shutdown, I cannot drop to a console only and login. Clicking on any link that should open an X window yields a new window that says:
There was an error launching the application. Details: Failed to fork (Cannot allocate memory)
This is the same error I get when I try to login after pressing Ctrl+Alt+F1. Because I get completely stuck at this point, I am forced to hardboot my machine. This is making it extremely difficult to debug.
Is there anything I can do to recover once this error is encountered? How should I go about tracking down the error?
As a final note, I have not been running a ridiculous number of things: two terminals, one with a byobu session with 2 tabs, one with a python session; a single instance of emacs, a single google chrome, and several ROS (robot operating system) nodes.
Pressing Ctrl+Alt+Backspace to restart my display manager just allowed me to log back in, and start opening a terminal. Using
ps revealed that there were still many processes running that had been running with the lockup happened. At the very least, this allows me to reboot my machine from software. How should I proceed to determine what is causing this problem?
I just opened two terminals that I just set aside, and waited for the crash to happen. Once it happened, I was able to capture a screenshot from the output of
top. Don't know if the output will be particularly useful, but I have attached it. The only thing I noticed that was particularly odd was that there were 5 zombie processes.