bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #22351] GDNC not starting properly on some systems.


From: Richard Frith-Macdonald
Subject: [bug #22351] GDNC not starting properly on some systems.
Date: Mon, 18 Feb 2008 16:41:51 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/523.15.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.15

Follow-up Comment #12, bug #22351 (project gnustep):

> "If there is a problem running out of file descriptors,
> then a fix would be to use fewer of them" 

Sure ... but it turns out that the problem was nothing to do with running out
of file descriptors. 

> The root of the problem is that the polling in that method for a
connection
>is causing the process to block because the file descriptors allowed for
that
>process are quickly used up. This happens because, at least on linux, the
> send and receive ports are created by making special files in /tmp.

But ensuring that those descriptors are closed immediately (ie so that the
process cannot possibly run out of descriptors) did not cure the problem, and
of course the use of a large number of descriptors in one client cannot
explain why other clients could then not contact the server ... so the
descriptors were a red herring.

> Giving the server time to come up and register itself means that
> we'll do less polling

Yes ... good to poll less frequently ... I put a 0.05 of a second delay
between each poll.  Enough to cut down significantly on cpu usage without
causing a discernable delay in application startup.

> and, thus, use fewer file descriptors.

Each time we poll we we re-use the same file descriptors, so frequency of
polling doesn't affect that.

Hopefully the changes to NSPortMessageNameServer.m to implement locking will
have cureed this issue by preventing two processes from interfering with each
other (your long sleep on startup would have reduced, but not eliminated, the
chance of the two processes both trying to access the port name at the same
time).


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22351>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]