LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 10-06-2011, 03:07 AM   #1
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Rep: Reputation: 15
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!
 
Old 10-06-2011, 10:29 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
How big is your swap space? Apparently it can be caused by having insufficient swap available...
 
Old 10-06-2011, 08:51 PM   #3
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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...
 
Old 10-09-2011, 02:31 AM   #4
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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.
 
Old 10-09-2011, 03:56 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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?
 
Old 10-09-2011, 10:06 PM   #6
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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!
 
Old 10-10-2011, 04:30 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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?
 
Old 10-10-2011, 04:34 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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.
 
Old 10-10-2011, 05:32 AM   #9
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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.
 
Old 10-10-2011, 09:07 PM   #10
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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.
 
Old 10-10-2011, 09:56 PM   #11
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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.
 
Old 10-11-2011, 01:31 AM   #12
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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.
 
Old 10-11-2011, 04:42 AM   #13
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

Original Poster
Rep: Reputation: 15
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.
 
Old 10-11-2011, 01:19 PM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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
 
Old 10-11-2011, 09:25 PM   #15
phoenixfire
Member
 
Registered: Nov 2006
Location: Australia
Distribution: Gentoo
Posts: 86

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Stick a Fork in Flock: Why it Failed LXer Syndicated Linux News 0 04-21-2011 11:40 AM
zsh: fork failed: not enough space malli42108 Linux - Newbie 4 10-05-2009 03:19 AM
Problem with GIMP: error "failed to fork - cannot allocate memory" heffo_j Linux - Software 5 05-24-2009 12:19 AM
slcakware 11 won't boot - request_module[ppp0]: fork failed, errno 1 dmv_andy Slackware 0 11-14-2006 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration