LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Failed to fork - Need help! (https://www.linuxquestions.org/questions/gentoo-87/failed-to-fork-need-help-906698/)

phoenixfire 10-06-2011 03:07 AM

Failed to fork - Need help!
 
Hi there! I've finished a fresh install of Gentoo and have just finished up configuring and installing gnome. After jumping into my new fresh gui i tried to open up an app. When doing this i got the error
Code:

Failed to fork (Resource temporarily unavailable)
This happens to almost any app i try to open.
Logging in as root however has no such problems, everything is working fine. Any help would be appreciated. Thanks!

Snark1994 10-06-2011 10:29 AM

How big is your swap space? Apparently it can be caused by having insufficient swap available...

phoenixfire 10-06-2011 08:51 PM

I was thinking that may be the problem. My swap is only 1G compared to my 6G of RAM. I was wondering if it was still relevant to have so much these days. But what makes me think that's not the problem is that the root user has none of these problems whatsoever.
I'll try to resize my swap an / partitions and give it a test but in the meantime any more suggestions would be much appreciated.



Also, why has this been moved to the gentoo forum? This is not a gentoo specific problem...

phoenixfire 10-09-2011 02:31 AM

I've increased the swap space to 12G and am still getting the same error. I've also tried creating a new user but that user also gets the same error.

i92guboj 10-09-2011 03:56 AM

Swap shouldn't be an issue for small command line tools. Much less taking into account that you have 6GB of ram.

This is probably more due to some overly restrictive setting in /etc/security/limits.conf, do you remember changing anything in there lately?

phoenixfire 10-09-2011 10:06 PM

I haven't touched it at all since it's a fresh install. There is nothing set in it, just all the default comments. Is there something i can add to it? This sounds like we're heading more in the right direction since root doesn't have this problem at all. Thanks!

i92guboj 10-10-2011 04:30 AM

Then, do you have anything under /etc/security/limits.d/?

Do you remember putting some ulimit command on /etc/profile, or some other shell initialization file(s)?

What does "ulimit" on command line report?

i92guboj 10-10-2011 04:34 AM

There's also the slight chance that your machine was compromised and there's a fork-bomb running in the background. Are you able to run top or htop? If so, look at the number of running processes and the cpu that's being used, report back if you see something unusual.

phoenixfire 10-10-2011 05:32 AM

There is nothing in /etc/security/limits.d/, top shows nothing strange at all, and ulimit is unlimited.

However, i am finding it very hard to get this error when i'm not in a gui. If i log in as a user not in X there are no problems. I've tested this with nano and links since i assume they'd be the most likely to give me this error. Perhaps it's something within gnome. I'm going to emerge xfce now and see if the error occurs within that environment.

phoenixfire 10-10-2011 09:07 PM

The same thing is happening within xfce too. However i managed to get firefox to launch, something i haven't been able to do yet.

phoenixfire 10-10-2011 09:56 PM

Just mucking around a bit more in xfce. I can open both firefox and banshee but not both at the same time. If i open one it works fine but when i try the other i get the failed to fork error. I can't run top when one is open since i get the failed to fork error when trying to open a terminal.

i92guboj 10-11-2011 01:31 AM

What if you disable GUI login (remove xdm from the default runlevel), launch top or htop in VT1 and then you run startx in VT2?

Before that be sure to add gnome-session or xfce4-session (or whatever it's called) to your ~/.xinitrc.

Then you can switch to VT1 (control-alt-f1) to see if there's anything exhausting your system in the background.

phoenixfire 10-11-2011 04:42 AM

Great idea! I've done that and it seems that running out of resources is not the problem. I'm still getting the same error but the resources show only 0.1% cpu used, around 200,000K of memory and 0K of swap.

i92guboj 10-11-2011 01:19 PM

And how many processes can you see running when the fork problem happens?

It's on the first lines of the top output.

Code:

top - 20:18:43 up 7 days, 12:30,  2 users,  load average: 0.12, 0.05, 0.01
Tasks: 123 total,  1 running, 122 sleeping,  0 stopped,  0 zombie


phoenixfire 10-11-2011 09:25 PM

Quote:

62 total, 1 running, 61 sleeping.
About 50% of the processes i can see are 'kworker'. Are there supposed to be that many?


All times are GMT -5. The time now is 12:56 PM.