This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Synopsis: the "fork: resource temporarily unavailable" problem may be caused by a large number of obsolete process handles.
Attached to this e-mail: 1. cygcheck.out: the output from "cygcheck -s -v -r" 2. tempor.sh: A bash shell script that causes the "fork: resource temporarily unavailable" problem on my computer. This script searches for identical files by brute force: it launches cmp.exe many times.
First, I ran the standard Windows Task Manager with a non-standard column shown: handle count. I noticed something disturbing immediately. There is a process (pseudo process?) named "System." What I see on my computer is that for this process, the handle count rises slowly but continuously. This occurs when my computer is almost idle (I have several daemon type processes running, so the machine is never completely idle). If I launch any program, the handle count jumps up. After terminating the program, the handle count does NOT reduce.
First of all, on this Win2k SP4 I don't see that behavior. Even when I start several "normal" Windows programs that value doesn't increase. (It's at 132 here.)
I don't have them installed.Next, I launched "Process Explorer" which is distributed from http://www.sysinternals.com. This program allows me to examine the handles owned by the "System" process. What I found is that most of the handles are Process handles. These handles have names of the form <Non-existent Process> (nnnn) where nnnn is a three to five digit number.
Finally, I ran the attached shell script "tempor.sh." Specifically, I opened a Cygwin command window and, at the bash shell prompt, I typed cd C:/Windows/System32 tempor.sh *
This caused tempor.sh to process 2,302 files. This in turn caused tempor.sh to launch cmp.exe more than 2.5 million times.
q@lisi /cygdrive/c/WINNT/system32 $ ~/tempor.sh * Will process 1858 files...
No, no change in the handles value here. Constantly at 132.When tempor.sh started, the number of handles owned by the "System" process was less than 10,000. While tempor.sh was running, I watched the status of the "System" process in the Windows Task Manager. As expected, I saw the "handles" count for this process rise continuously and rather quickly: very roughly, 30 units per second. My computer's CPU was 50% to 75% busy at the time.
After many minutes, tempor.sh halted itself with the by-now familiar message "fork: resource temporarily unavailable." The number of handles owned by the "System" process was about 86,000.
It appears that Windows itself has a problem clearing out old Process handles from some operating system table. It looks like a problem not specific to Cygwin at all. I admit that the evidence I present is not conclusive. Nevertheless, the fact that there is a boundlessly increasing allocation of a resource (process handles) looks suspiciously like breakage to me.
Would someone please suggest a forum (or book) where I can pursue this further. I would like to try to clear out the old handles, the ones with names like <Non-existent Process> (nnnn) as referenced in "Process Explorer."
Thank you for any suggestions!
Try a current snapshot. That propably won't help for your problem but who knows?
-- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |