[Fresco-devel] Pinging stopped clients

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
I noticed today that if you C-z the demo, it _doesn't_ get killed by
the server, and I don't understand why.  Tracing confirms that it has
stopped responding to pings.  (Perhaps I should say it stops
responding to "ping", not "pings"; a single ping is sent, and no
response comes back; apparently the ping loop blocks entirely,
apparently without timeout -- at least, if there is a timeout, it's
more than a few hours long.)

Somehow the server ignores this and continues to work normally (but of
course freezes if you click "run" or "quit").

Well, not quite normally; I tried starting a second demo, and it was
unable to connect to the server.  If I start two demos and then C-z
one of them, and then kill the other, the server doesn't notice that
the other has died; if I then fg the stopped demo, the server then
notices the death of the other immediately.

I suspect that the reason clients can't connect while the ping loop is
blocked is a mutex somewhere (since during connect, the new client
handle has to be added to the list of pingable hosts); this is
probably a bug, since CORBA requests can take arbitrarily long to
handle.  The solution, I think, is to have the "accept loop"
communicate with the ping loop via a sort of queue; the accept loop 1)
acquires a lock, 2) puts things on this queue, 3) releases the lock;
and the ping loop 1) acquires the lock, 2) pulls everything on the
queue off and adds them to its private data structure, 3) releases the
lock, 4) does the actual CORBA calls.  This way the lock isn't held
over any remote calls.

More serious, though, is the fact that apparently, making a CORBA call
to a stopped process blocks indefinitely, with no timeout.  This is
kinda uncool, and I didn't expect omniORB to have this behaviour.  Any
ideas on why it does this?  Or is it the correct behaviour, and
someone can tell me why?  (And if it is, then how do you modify the
ping loop?)

(And a deeper question: how did we end up with killing off stopped
clients the _goal_ we wish to achieve by fixing these problems?)

-- Nathaniel

-- 
"...these, like all words, have single, decontextualized meanings: everyone
knows what each of these words means, everyone knows what constitutes an
instance of each of their referents.  Language is fixed.  Meaning is
certain.  Santa Claus comes down the chimney at midnight on December 24."
  -- The Language War, Robin Lakoff

This email may be read aloud.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.