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]

Re: "fork problem" debugging

<heavily snipped content>

Igor Peshansky <pechtcha <at>> writes:
> On Wed, 17 May 2006, Bryan D. Thomas wrote:
> > I'm taking the risk of conflating several different
> > issues into one.  On the other hand, this might be a
> > useful synthesis to help us bottom out on "fork
> > problems" so that we can turn a snapshot into a stable
> > release[1]?
> I've been plagued by these problems for a while (since you didn't provide
> full links in your message, I don't know whether you cited my message
> among them without a lot of cutting-and-pasting).  I would like to help,
> but all information I have at this point is rather negative...  One
> definite data point is that unloading and reloading just Cygwin1.dll (by
> exiting all Cygwin processes) fixes the problem for me (until the next
> time I run that resource-intensive script that reproduces the problem).

> > In [2] Torfinn Ottesen wrote:
> > > I find that my loops are OK until after about 80
> > > cases, each loop increases my memory usage by about
> > > 3.2 MB
> > > I am aware of the following information:
> > [3],[4],[5]
> > > I have strace but do not know what to do with it
> >
> > I wonder if some strace like [6] would help?
> >

> > In [2], Larry Hall wrote:
> > > Sounds to me like the situation you found closely mirrors the behavior
> > > the MS KB article describes. I think it's worthwhile for you to
> > > experiment with the workaround proposed to see if it helps. It would
> > > be beneficial if you reported any results you saw back to this list.
> >
> > Torfinn, any luck on SharedSection parameter tweaking
> > per the MS KB?

I (Torfinn, using MS Win XP Pro, service pack 1) have not tried Microsofts
claimed fix for the unexpected behaviour when running many processes, more 
than 50 (sic - counting more than 50 even before serious number crunching
work). Reason, see:;en-us;824422

<Quote Microsoft>
Warning If you use Registry Editor incorrectly, you may cause serious problems
that may require you to reinstall your operating system. Microsoft cannot
guarantee that you can solve problems that result from using Registry Editor
incorrectly. Use Registry Editor at your own risk.
<End quote>

     a) Silly fix, doubled amount RAM to allow about 9 hours between reboots
        of operative system. 
     b) Updated my Cygwin on May 16, suspect that the memory loss of about 3.2
        MB for each cycle was reduced to about 2.3 MB (not paying to much 
        attention because of the described silly fix). Note: reading off 
        memory usage using Task Manager.
     c) Did some *trials* on simplied problem (for speed), in principle like: 
            for i in 1 2 3 .... 1000

         I did this for three programs, prog1 (commercial, external),
         prog2 (inhouse, compiled on Cygwin) and native cygwin prog3:
         "echo". I claim that I saw increased increase memory usage 
         for prog1 and prog2 - but not for the "echo" program.

     d) A collegue of mine, doing same type of analysis (same bash scripts,
        programs ....) did by chance similar analysis for another project.
        He could not see any memory leak at all, admittedly reading off 
        memory usage using "Task Manager" - but - loosing more than 2 MB 
        for each cycle should be significant and seen because of the
        number of cycles involved.
        I believe that there is some significance in the fact that he is
        using MS Win XP Pro, service pack 2 whereas I have service pack 1.
        For completeness, his Cygwin was fresh of April 2006 whereas 
        I have now tried both of February and May 2006.

     e) Make a benmark test (like item c) for my machine and my collegue's 
        and run this test on both machines. By this we will measure effect 
        between Microsoft Windows service pack 1 and 2 and some small
        effect of different Cygwin version. Of course, we may also check
        the effect of Cygwin version by both updating. 

The above are my current findings on this issue.

Torfinn Ottesen


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]