HP-UX Fork Error

 
Tyates27
Occasional Contributor

HP-UX Fork Error

I am seeing a fork error in the system log that indicates not enough space.

The error is: 'error: fork: Not enough space'

Can someone please hel me shead some light on this?

Thanks

Tom

 

6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: HP-UX Fork Error

Check if one of the file systems is full.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven Schweda
Honored Contributor

Re: HP-UX Fork Error

> Check if one of the file systems is full.

   I doubt that this error message refers to file storage space.

   A Web search for the error message text should find better advice.

Patrick Wallek
Honored Contributor

Re: HP-UX Fork Error

A couple of things I would check:

1)  What does 'swapinfo -tam' show?  Do you have sufficient swap space to allow more processes to start?

2) What does the 'nproc' kernel parameter usage look like?  On 11.31 you can do 'kcusage nproc' to see what the usage vs configured value is.

Tyates27
Occasional Contributor

Re: HP-UX Fork Error

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 51200 0 51200 0% 0 - 1 /dev/vg00/lvol2
dev 51008 0 51008 0% 0 - 1 /dev/vgswap/lvsapswap
reserve - 102208 -102208
memory 155730 135511 20219 87%
total 257938 237719 20219 92% - 0 -
# kcusage nproc
Tunable Usage / Setting
=============================================
nproc 508 / 4200

 

 

Tyates27
Occasional Contributor

Re: HP-UX Fork Error

No file systems are full currently.

Re: HP-UX Fork Error

It may be difficult to track down which process failed to fork.

Technically, in Unix, if a process wants to start a new process, then it does this by doing "fork-and-exec".

The fork-system call may copy/double the entire memory that the starting (called parent) process has. And the exec will load the new binary and run it under child context.

So if you have a process that had already 20gig of resident memory, your new started process may fail during fork with the reported memory problem, even though the started process itself does not need this memory.

As far as i remember there are flags to control this behaviour and also different flavors of the system call, like "vfork" that do not need the entire memory footprint of the parent-process. However as a normal user, you do not know what kind of fork() system-call the developer has used.

What you should do is to try to figure out, which process has initiated the failed fork.

Do you have time-stamp of the error? Check if you can find some specific activity during that time. Eg. a startup of SAP, or something else. If you suspect a specific operation, check if there are logfiles. The error is usually printed twices, globally, and locally in the process-context. It is possible that the local-process-context-exrror message is deleted (redirected to /dev/null), in which case you will be unalbe to find it.

So at the end it may not be possible to find this, in which case i would say, "don´t mind" as long as you do not see any specific operation failing. It is possible that the failing parent process gets the error, and then decides to do it right, or different, so that there is no impact.

Hope that helps.

I am an HPE Employee

Accept or Kudo