make == fork bomb ???

Andreas Maus maus at badphish.dyndns.org
Tue Mar 29 06:43:18 PST 2005


Hi!

After accidently trashing my system (don't drink and root ... :/ ) I
had to reinstall this system. Getting the "latest stable" ISO
(dated 27-Mar-2005) and build a fresh system.

Getting the ports tree ... And started to install programs as usual
(cd /usr/ports/ ... ; make ; make install ).

And then strange things happen ...

Almost all installations failed because they exceeded the maxproc limit.
make starts complaining about unavailable resources and that it can't fork.
Looking through dmesg lots of errors appeared:

vectra# dmesg
[... snipp ...]
maxproc limit exceeded by uid 0, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 0, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 0, please see tuning(7) and login.conf(5).

Strange enough during a make the number of running make processes increases rapidly:

vectra# ps auxwww | grep make | grep -v grep | wc -l
       3
vectra# ps auxwww | grep make | grep -v grep | wc -l
       6
vectra# ps auxwww | grep make | grep -v grep | wc -l
       8
vectra# ps auxwww | grep make | grep -v grep | wc -l
      47
vectra# ps auxwww | grep make | grep -v grep | wc -l
      66
vectra# ps auxwww | grep make | grep -v grep | wc -l
      94
vectra# ps auxwww | grep make | grep -v grep | wc -l
     104
vectra# ps auxwww | grep make | grep -v grep | wc -l
     196
vectra# ps auxwww | grep make | grep -v grep | wc -l
     221
vectra# ps auxwww | grep make | grep -v grep | wc -l
     290
vectra# ps auxwww | grep make | grep -v grep | wc -l
     340
vectra# ps auxwww | grep make | grep -v grep | wc -l
     368
vectra# ps auxwww | grep make | grep -v grep | wc -l
     389
vectra# ps auxwww | grep make | grep -v grep | wc -l
     453
vectra# ps auxwww | grep make | grep -v grep | wc -l
No more processes.

(time difference between each ps command is nearly 30 sec.)

Hmmm ... over 400 make processes for a simple "make install" ...
I don't think that this should be the normal behaviour.

Never seen this problem before on any other of my BSD baased (Net- and OpenBSD) systems.

It seems that this occurs when registering the packet.
Compilation (simple make) works as expected.
Odd enough the program _is_ installed and registered.

The system is a Pentium3/500 MHz with 128MB RAM+1GB swap runnung:
vectra# uname -a
DragonFly vectra.badphish.dyndns.org 1.1-Stable DragonFly 1.1-Stable #0: Sun Mar 27 14:04:16 CEST 2005     root at xxxxxxxxxxxxxxxxxxxxxx:/usr/obj/usr/src/sys/GENERIC  i386

System time is synchronized:

vectra# ntpq -p
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+studver0224uns4 129.132.2.21     2 u   55  128  377   75.696  -35.579  41.769
+cctld.tix.ch    192.53.103.104   2 u  114  128  377   74.971  -43.926  23.569
*hetzner.corvent 213.144.140.154  3 u   58  128  377   82.003  -35.455  98.836
 
Maximum numbers of processes allowed for this system is:

vectra# sysctl kern.maxproc 
kern.maxproc: 980

(Should be enough)

An example for the errors during the make process is givem below:

vectra # cd /usr/ports/shells/bash-completion
vectra # make install
[... snipp ...]
===>   Registering installation for bash-2.05b.007_2
Cannot fork: Resource temporarily unavailable
"/usr/ports/Mk/bsd.port.mk", line 2644: warning: "echo 'ldapmodify.1 ldapadd.1 [... snipp ...]
Cannot fork: Resource temporarily unavailable
"/usr/ports/Mk/bsd.port.mk", line 2725: warning: "echo %%PREFIX%%/lib | /usr/bin/sed -e s!%%LDAP_RUN_DIR%%!/var/run/openldap!g -e s!%%DATABASEDIR%%!/var/db/openldap-data!g -e s!%%SLURPDIR%%!/var/db/openldap-slurp!g -e s!%%OSREL%%!4.8!g -e s!%%PREFIX%%!%D!g -e s!%%LOCALBASE%%!/usr/local!g -e s!%%X11BASE%%!/usr/X11R6!g -e s!%%PORTDOCS%%!""!g -e s!%%PORTOBJFORMAT%%!elf!g -e s!%%XAWVER%%!7!g -e s!%%PERL_VERSION%%!5.8.6!g -e s!%%PERL_VER%%!5.8.6!g -e s!%%PERL_ARCH%%!mach!g -e s!%%SITE_PERL%%!lib/perl5/site_perl/5.8.6!g -e s!%%DOCSDIR%%!"share/doc/openldap"!g -e s!%%EXAMPLESDIR%%!"share/examples/openldap"!g -e s!%%DATADIR%%!"share/openldap"!g" returned non-zero status
"/usr/ports/Mk/bsd.port.mk", line 4757: Malformed conditional (${_TMLINKS:M/usr/local*}x != x)
"/usr/ports/Mk/bsd.port.mk", line 4762: Malformed conditional (${_TMLINKS:N/usr/local*}x != x)
"/usr/ports/Mk/bsd.port.mk", line 4763: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4763: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4766: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4766: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4767: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4767: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4771: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4771: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4775: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4775: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4780: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4780: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4781: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4781: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4790: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4790: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4792: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4792: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 5144: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 5144: Need an operator
"/usr/share/mk/bsd.port.mk", line 46: if-less else
"/usr/share/mk/bsd.port.mk", line 46: Need an operator
cd: can't cd to /usr/dfports/net/openldap22-client
Cannot fork: Resource temporarily unavailable
"/usr/share/mk/bsd.port.mk", line 6: warning: "/usr/bin/relpath /usr/ports /usr/ports/net/openldap22-client" returned non-zero status
Cannot fork: Resource temporarily unavailable
"/usr/share/mk/bsd.port.mk", line 9: warning: "/sbin/sysctl -n kern.osreldate" returned non-zero status
Cannot fork: Resource temporarily unavailable
"/usr/ports/Mk/bsd.openssl.mk", line 55: warning: "/usr/bin/awk '/OPENSSL_VERSION_TEXT/ { sub(/-fips/, ""); print $4; exit }'  /usr/include/openssl/opensslv.h" returned non-zero status
Cannot fork: Resource temporarily unavailable
"/usr/share/mk/bsd.port.mk", line 6: warning: "/usr/bin/relpath /usr/ports /usr/ports/net/openldap22-client" returned non-zero status
"/usr/ports/Mk/bsd.port.mk", line 2726: warning: "echo  | /usr/bin/sed -e "s!%D!/usr/local!g"" returned non-zero status
"/usr/ports/Mk/bsd.port.mk", line 4757: Malformed conditional (${_TMLINKS:M/usr/local*}x != x)
"/usr/ports/Mk/bsd.port.mk", line 4762: Malformed conditional (${_TMLINKS:N/usr/local*}x != x)
"/usr/ports/Mk/bsd.port.mk", line 4763: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4763: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4766: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4766: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4767: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4767: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4771: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4771: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4775: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4775: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4780: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4780: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4781: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4781: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4790: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4790: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 4792: warning: duplicate script for target ".if" ignored
"/usr/ports/Mk/bsd.port.mk", line 4792: warning: duplicate script for target "x" ignored
"/usr/ports/Mk/bsd.port.mk", line 5144: if-less endif
"/usr/ports/Mk/bsd.port.mk", line 5144: Need an operator
"/usr/share/mk/bsd.port.mk", line 46: if-less else
"/usr/share/mk/bsd.port.mk", line 46: Need an operator
Cannot fork: Resource temporarily unavailable
"/usr/share/mk/bsd.port.mk", line 131: warning: "cd /usr/dfports/; make -V PKGNAME" returned non-zero status
"/usr/share/mk/bsd.port.mk", line 147: if-less endif
"/usr/share/mk/bsd.port.mk", line 147: Need an operator
make: fatal errors encountered -- cannot continue
"/usr/share/mk/bsd.port.mk", line 131: warning: "cd /usr/dfports/net/openldap22-client; make -V PKGNAME" returned non-zero status
"/usr/share/mk/bsd.port.mk", line 147: if-less endif
"/usr/share/mk/bsd.port.mk", line 147: Need an operator
make: fatal errors encountered -- cannot continue

===>   Returning to build of bash-completion-20050112
===>   bash-completion-20050112 depends on shared library: ldap-2.2.7 - found
===>   Generating temporary packing list

[... snipp ...]

Does anybody seen this problem?
Is it a make bug? A bug in the ports system?
How should I solve this?

Many thanks in advance,

Andreas.

-- 
Out of the darkness a voice spoke unto me, saying "smile, things could
be worse". So I smiled, and so, things became worse.
Attachment:
pgp00024.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00024.pgp
Type: application/octet-stream
Size: 481 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20050329/cd74fe2c/attachment-0020.obj>


More information about the Users mailing list