fork() failed with ENOMEM, free indicates enough, tune what kernel parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are having issues with fork() failing sporadically -- but we can't
figure what resource is short supply.

This shows we still have 45 meg of ram available.

rhd </home/tms/src/systest>$ free -m
             total       used       free     shared    buffers     cached
Mem:           123        113          9          0          4         30
-/+ buffers/cache:         78         45
Swap:          250         19        231

This is the strace output from a test program.  Can anybody suggest how
to tell which kernel parameter is in short supply?

rhd </home/tms/src/systest>$ strace -f  -ores forktest 3
fork failed, errno 12
rhd </home/tms/src/systest>$ 
rhd </home/tms/src/systest>$ cat res
4042  execve("./forktest", ["forktest", "3"], [/* 26 vars */]) = 0
4042  uname({sys="Linux", node="rhd", ...}) = 0
4042  brk(0)                            = 0x80497dc
4042  open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
4042  open("/etc/ld.so.cache", O_RDONLY) = 3
4042  fstat64(3, {st_mode=S_IFREG|0644, st_size=48658, ...}) = 0
4042  old_mmap(NULL, 48658, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
4042  close(3)                          = 0
4042  open("/lib/i686/libc.so.6", O_RDONLY) = 3
4042  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260Y\1"..., 512) = 512
4042  fstat64(3, {st_mode=S_IFREG|0755, st_size=1452984, ...}) = 0
4042  old_mmap(0x42000000, 1290052, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x42000000
4042  old_mmap(0x42134000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x134000) = 0x42134000
4042  old_mmap(0x42139000, 8004, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42139000
4042  close(3)                          = 0
4042  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40020000
4042  munmap(0x40014000, 48658)         = 0
4042  mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40021000
4042  fork()                            = -1 ENOMEM (Cannot allocate memory)
4042  fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
4042  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
4042  write(1, "fork failed, errno 12\n", 22) = 22
4042  munmap(0x40014000, 4096)          = 0
4042  _exit(22)                         = ?
rhd </home/tms/src/systest>$ 

Thanks - Tom

-----Tom Stevelt--------------------Victory Wholesale Grocers-----------
     tms@xxxxxxx                    400 Victory Drive
     513-746-1742 ext 1224          Springboro, OH 45066
------------------------------------------------------------------------


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux