delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/09/06:54:56

X-Authentication-Warning: new-smtp2.ihug.com.au: Host p240-tnt4.syd.ihug.com.au [203.173.134.240] claimed to be acceleron
Message-ID: <003b01c120c0$9e304de0$0a02a8c0@acceleron>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>,
"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: <djgpp-workers AT delorie DOT com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010809091937 DOT 7420J-100000 AT is>
Subject: Re: Selector Exhaustion
Date: Thu, 9 Aug 2001 20:46:55 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Reply-To: djgpp-workers AT delorie DOT com

> On Wed, 8 Aug 2001, Charles Sandmann wrote:
>
> > Using a modified version of our "spawn" test routine, I tried the
following:
> > 1) Allocate a selector before spawning.
> > 2) Spawn
> > 3) Allocate another selector.
> > 4) Free all selectors between the two selector values (inclusive).
> >
> > Guess what?  I can clean up the selectors, no problem.  I can loop
> > forever.  Where I would puke after 600 loops before, the current
> > version will loop forever (well, at least as long as I've run it...)
> >
> > This does have a few flaws - is assumes there won't be any selector
> > holes.
>
> It also assumes all the selectors in between belong to the child program,
> and thus are not used anymore.  Isn't that a dangerous assumption?
>
> > But this seems like an effective
> > way (at least on W2K) to get rid of the selector leakage.  Worth
> > investigation to put in libc?
>
> I'd say post the patch and lets ask people to patch their libraries,
> rebuild as many applications which spawn other programs, such as Make,
> GCC, Emacs, and Bash, and lets test how well does it work for some
> time.
I would love to try the patch as I will be re-building the apps (excluding
Emacs) as outlined in my Win 2000 status report at least once between now
and the end of the weekend and at least once per night on avergae for
incremental builds of LIBC on Win 98.

I also got the *&$%^ with the Win 2K leaking selectors when building LIBC,
tthe leaks are 10 x worse than on Win 98.

At least then I don't have to re-start the LIBC build every few minutes.

> > C:\djgpp\tests\libc\dos>showme
> > c:/djgpp/tests/libc/dos/showme.exe: tb=05390 ds=0587
> >
> > C:\djgpp\tests\libc\dos>kill ntvdm
> > process #1160 [ntvdm.exe] killed
> >
> > C:\djgpp\tests\libc\dos>showme
> > c:/djgpp/tests/libc/dos/showme.exe: tb=05390 ds=01af
> >
> > C:\djgpp\tests\libc\dos>showme
> > c:/djgpp/tests/libc/dos/showme.exe: tb=05390 ds=01af
> >
> > You can see I need to reset the NTVDM occasionally.
>
> This seems to be unlike what happens on Windows 9X, where exiting the
> parent application back to COMMAND.COM frees all the selectors.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019