Subject: Win98, cygwin 1.3.10, and Cannot fork problems
From: Eric Blake <[email-masked]>
To: [email-masked]
Date: Tue, 12 Mar 2002 23:54:12 -0700

I am trying to configure libtool-1.4d on Win98.  Every time, the
configure script dies somewhere in the middle (but not always the same
location) with at least one failed fork, such as this failure:

checking dynamic linker characteristics... Win32 ld.exe
appending configuration tag "RC" to libtool
    208 [main] sh 680831 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4294284185, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
    192 [main] sh 683111 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4261344521, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
    282 [main] sh 681167 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4294264961, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
    219 [main] sh 664803 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4261344749, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
    334 [main] sh 33622775 fork_copy: user/cygwin data pass 2 failed,
0x980000..
0xC65000, done 0, windows pid 4261344497, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
    205 [main] sh 33622799 fork_copy: user/cygwin data pass 2 failed,
0x980000..
0xC65000, done 0, windows pid 4261344185, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
    201 [main] sh 681223 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4294302273, Win32 error 8
eval: Cannot fork: Resource temporarily unavailable
...
    221 [main] sh 701579 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C66000, done 0, windows pid 4294309841, Win32 error 8
./configure: Cannot fork: Resource temporarily unavailable
checking for ANSI C header files... yes
checking for dirent.h that defines DIR... yes
    289 [main] sh 659683 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C66000, done 0, windows pid 4294333081, Win32 error 8
./configure: Cannot fork: Resource temporarily unavailable
checking for opendir in -ldir... no
checking which extension is used for shared libraries... .dll.a
...
checking for error_t... no
checking for argz_append... no
    291 [main] sh 681167 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4294265741, Win32 error 8
./configure: Cannot fork: Resource temporarily unavailable
checking for argz_create_sep... eval: 1: Syntax error: Bad substitution
    200 [main] sh 701555 fork_copy: user/cygwin data pass 2 failed,
0x980000..0x
C65000, done 0, windows pid 4294279529, Win32 error 8
./configure: Cannot fork: Resource temporarily unavailable
configure: error: /bin/sh './configure' failed for libltdl
exit: Cannot fork: Resource temporarily unavailable    158 [main] sh
683111 fork
_copy: user/cygwin data pass 2 failed, 0x980000..0xC66000, done 0,
windows pid 4
294286465, Win32 error 8
exit: Cannot fork: Resource temporarily unavailable

I've done a fresh check of the cygwin sources, and the problem still
occurs. After a failed fork, any attempt to start a new DOS shell
complains that there is not enough memory, and the only recourse I have
is to reboot.  I was able to successfully configure and make other
projects, such as automake 1.6; but the libtool configure has yet to
succeed.

This is probably related to the recursive make bugs that I have seen
mentioned in the mailing lists - it seems to happen when a single
command from the bash prompt fires off a great deal of subprocesses. 
Also, the configure starts out fast, forking more than one process per
second; but as it progresses, process forking slows. Just before the
libtool configure fails, my entire computer tends to lock up from all
user input for 3 to 5 seconds or so each time another subprocess is
forked.  Even the Windows system clock stops ticking during a fork
(although the BIOS clock remains correct); in the past, I have been
compiling a large project, and over the course of 24 hours real time,
the Windows system clock lost more than 2 hours from the time it spent
paused during forks (although a reboot resets the clock back to the
correct BIOS time).  The mailing list only seems to mention forking
problems on Win NT or Win 2000; and I haven't seen any mention of
problems with the 1.3.10 cygwin.dll.  Am I doing something wrong?  Is
there a quick fix to the problem?  Or is there something that I could do
to help you debug this problem?

$ cygcheck -s

Cygwin Win95/NT Configuration Diagnostics
Current System Time: Tue Mar 12 23:16:20 2002

Windows 98 Ver 4.10 Build 1998

Path:   d:\cygwin\usr\local\bin
        d:\cygwin\bin
        d:\cygwin\bin
        c:\WINDOWS
        c:\WINDOWS\COMMAND
        c:\
        .
        c:\JDK1.4\BIN
        c:\EMACS-20.7\BIN
        c:\JAVACC\BIN
        c:\JTB\BIN
        c:\PROGRA~1\TCL\BIN

SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS

HOME = `d:\cygwin\home\eblake'
MAKE_MODE = `unix'
PWD = `/home/eblake'
USER = `eblake'

Use `-r' to scan registry

a:  fd           N/A    N/A
c:  hd  FAT32   6137Mb  66% CP    UN           HARD DRIVE
d:  hd  FAT32   6114Mb  31% CP    UN           DISK2PART04
e:  fd           N/A    N/A
f:  cd  CDFS     589Mb 100%                    Audio CD

.              /cygdrive  user    textmode,noumount
d:/cygwin      /          system  textmode
d:/cygwin/bin  /usr/bin   system  textmode
d:/cygwin/lib  /usr/lib   system  textmode

Found: d:\cygwin\bin\bash.exe
Found: d:\cygwin\bin\cat.exe
Found: d:\cygwin\bin\cpp.exe
Found: d:\cygwin\bin\find.exe
Found: c:\WINDOWS\COMMAND\find.exe
Found: d:\cygwin\bin\gcc.exe
Found: d:\cygwin\bin\gdb.exe
Found: d:\cygwin\bin\ld.exe
Found: d:\cygwin\bin\ls.exe
Found: d:\cygwin\bin\make.exe
Found: d:\cygwin\bin\sh.exe

  446k 1998/12/04 C:\WINDOWS\SYSTEM\cygwin1old.dll
    0k 1998/03/11 C:\WINDOWS\Cygwin.dll
   81k 2001/10/20 d:\cygwin\bin\cygitcl30.dll
   35k 2001/10/20 d:\cygwin\bin\cygitk30.dll
  390k 2001/10/20 d:\cygwin\bin\cygtcl80.dll
    5k 2001/10/20 d:\cygwin\bin\cygtclpip80.dll
   10k 2001/10/20 d:\cygwin\bin\cygtclreg80.dll
  623k 2001/10/20 d:\cygwin\bin\cygtk80.dll
  119k 2002/02/09 d:\cygwin\bin\cygjpeg6b.dll
  253k 2002/02/10 d:\cygwin\bin\cygtiff3.dll
   45k 2002/02/08 d:\cygwin\bin\cygjbig1.dll
   19k 2002/02/20 d:\cygwin\bin\cyggdbm.dll
   21k 2001/06/20 d:\cygwin\bin\cygintl.dll
   56k 2000/12/03 d:\cygwin\bin\cygbz21.0.dll
  170k 2002/01/21 d:\cygwin\bin\cygpng2.dll
   45k 2001/04/25 d:\cygwin\bin\cygform5.dll
   26k 2001/04/25 d:\cygwin\bin\cygmenu5.dll
  156k 2001/04/25 d:\cygwin\bin\cygncurses++5.dll
  226k 2001/04/25 d:\cygwin\bin\cygncurses5.dll
   15k 2001/04/25 d:\cygwin\bin\cygpanel5.dll
   35k 2002/01/09 d:\cygwin\bin\cygform6.dll
   20k 2002/01/09 d:\cygwin\bin\cygmenu6.dll
  175k 2002/01/09 d:\cygwin\bin\cygncurses++6.dll
  202k 2002/01/09 d:\cygwin\bin\cygncurses6.dll
   12k 2002/01/09 d:\cygwin\bin\cygpanel6.dll
  621k 2002/01/16 d:\cygwin\bin\cygcrypto.dll
  156k 2002/01/16 d:\cygwin\bin\cygssl.dll
   17k 2001/06/28 d:\cygwin\bin\cyghistory4.dll
   41k 2002/01/20 d:\cygwin\bin\cygXpm-noX4.dll
   46k 2002/01/20 d:\cygwin\bin\cygXpm-X4.dll
   40k 2001/11/21 d:\cygwin\bin\cygpcre.dll
  108k 2001/06/28 d:\cygwin\bin\cygreadline4.dll
   20k 2002/01/13 d:\cygwin\bin\cyghistory5.dll
   50k 2002/03/12 d:\cygwin\bin\cygz.dll
  107k 2002/01/23 d:\cygwin\bin\cygcurl-2.dll
   39k 2001/11/21 d:\cygwin\bin\cygpcreposix.dll
   66k 2001/11/20 d:\cygwin\bin\cygregex.dll
   22k 2001/12/13 d:\cygwin\bin\cygintl-1.dll
  612k 2002/01/16 d:\cygwin\bin\cygxml2-2.dll
   73k 2002/01/16 d:\cygwin\bin\cygexslt-0.dll
  202k 2002/01/16 d:\cygwin\bin\cygxslt-1.dll
   22k 2002/01/16 d:\cygwin\bin\cygxsltbreakpoint-1.dll
  121k 2002/01/13 d:\cygwin\bin\cygreadline5.dll
   35k 2002/02/04 d:\cygwin\bin\cygltdl-3.dll
  751k 2002/02/25 d:\cygwin\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.3.10
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 51
        Shared data: 3
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix:
        Build date: Mon Feb 25 11:14:34 EST 2002
        Shared id: cygwin1S3

Cygwin Package Information
Package             Version
ash                 20020131-1
autoconf            2.52a-1
autoconf-devel      2.52-4
autoconf-devel-src  2.52-4
autoconf-stable     2.13-4
automake            1.5b-1
automake-devel      1.5-5
automake-devel-src  1.5-5
automake-stable     1.4p5-5
bash                2.05a-3
bc                  1.06-1
binutils            20011002-1
bison               1.33-1
byacc               1.9-1
bzip2               1.0.1-6
bzip2               1.0.1-6
clear               1.0
compface            1.4-5
cpio                2.4.2
cron                3.0.1-6
crypt               1.0-1
ctags               5.2-1
curl                7.9.3-1
cvs                 1.11.0-1
cvs                 1.11.0-1
cygrunsrv           0.95-1
cygutils            0.9.9-1
cygwin              1.3.10-1
dejagnu             20010117-1
diff                0.0
ed                  0.2-1
expect              20010117-1
figlet              2.2-1
file                3.37-1
fileutils           4.1-1
findutils           4.1
flex                2.5.4-1
flex                2.5.4-1
fortune             1.8-2
gawk                3.0.4-1
gcc                 2.95.3-5
gdb                 20010428-3
gdbm                1.8.0-4
gettext             0.10.40-1
ghostscript         6.51-4
gperf               0.0
grep                2.5g
groff               1.17.2-1
gzip                1.3.2-1
indent              2.2.7-2
inetutils           1.3.2-17
irc                 20010101-1
jbigkit             1.2-6
jpeg                6b-7
less                358-3
libintl             0.10.38-3
libintl1            0.10.40-1
libncurses5         5.2-1
libncurses6         5.2-8
libpng              1.0.12-1
libpng2             1.0.12-1
libreadline4        4.1-2
libreadline5        4.2a-1
libtool             20010531a-1
libtool-devel       20020202-1
libtool-stable      1.4.2-2
libxml2             2.4.13-1
libxslt             1.0.10-1
links               0.96-1
login               1.4-3
lynx                2.8.4-1
m4                  0.0
make                3.79.1-5
man                 1.5g-2
mingw               20010917-1
mingw-runtime       1.2-1
mktemp              1.4-1
mt                  2.0.1-1
mutt                1.2.5i-6
nano                1.0.7-1
ncftp               3.1.2-1
ncurses             5.2-8
newlib-man          20001118-1
opengl              1.1.0-5
openssh             3.1p1-1
openssl             0.9.6c-3
openssl-devel       0.9.6c-2
patch               2.5-3
pcre                3.7-1
perl                5.6.1-2
pkgconfig           0.10.0-1
popt                1.6.2-1
postgresql          7.1.3-2
python              2.2-1
rcs                 5.7-2
readline            4.2a-1
regex               4.4-2
robots              2.0-1
rsync               2.5.2-1
rxvt                2.7.2-10
sed                 3.02-1
sh-utils            2.0-2
sharutils           4.2.1-2
shellutils          0.0
shutdown            1.2-2
squid               2.4-STABLE20010508
ssmtp               2.38.7-3
tar                 1.13.19-1
tcltk               20001125-1
tcsh                6.11.00-4
termcap             20010825-1
terminfo            5.2-1
tetex-beta          20001218-1
texinfo             4.0-5
texmf               20000804-2
texmf-base          20000804-2
texmf-doc           20000804-2
texmf-extra         20000804-2
texmf-tiny          20000804-2
textutils           2.0.21-1
tiff                3.5.7-1
time                1.7-1
ttcp                19980512-1
units               1.77-1
unzip               5.41-1
vim                 6.0.93-1
w32api              1.2-1
wget                1.8.1-1
which               1.5-1
whois               4.5.17-1
xpm                 4.0.0-2
xpm                 4.0.0-2
xpm-nox             4.2.0-1
zip                 2.3-1
zlib                1.1.4-1

Use -h to see help about each section

-- 
This signature intentionally left boring.

Eric Blake             [email-masked]
  BYU student, free software programmer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/