Connection Problems

Dvořák Martin MaDvorak at csas.cz
Mon Jun 24 09:47:47 CEST 2002


Hello,

this reminds me a problem I had several months ago. I installed Mozart on
Linux box with a cheap Realtek ethernet card and the infamous RedHat 7.0.
Taking a connection offered on local loopback was OK. The same on the
ethernet interface locked up the connection offering process exactly as
described in your message. There was no difference between trying to take
connection locally or from another system. Unfortunately I am not an expert
so I did not too much investigation. A debugger attached to the locked
process reported SIGSEGV signals in some library outside of Mozart source.
The process itself, however, was not aborted. Is it possible that Mozart
masks SIGSEGV signal for some reason? And if yes, is it a bug or a feature?

My solution was rather radical - I got rid of RH 7.0 and installed LFS
instead with different Realtek driver. Everything works fine now.

Regards,

Martin Dvorak

-----Original Message-----
From: Tom Hawkins [mailto:thawkins at dilloneng.com]
Sent: Saturday, June 22, 2002 4:33 PM
To: users at mozart-oz.org
Subject: Connection Problems


Hello,

I just started getting familiar with Mozart distributed programming
and I have come across a problem using the Connection module.

First, here is what I have gotten to work.  I created a server
and client in a single file.  The server uses Connection.offer
to create a ticket of some value, in this case the integer 22,
it whats to share with the client.  The server then pickles the ticket 
to a file.  The client simply unpickles the ticket and uses
Connection.take to get the value.  I send the value and the
ticket to the Browser for both the server and the client to check
they are the same.  Here is the code:

functor
import
  Connection
  Pickle
  Browser(browse:Br)
define
  Ticket
  Val
  Ticket2
  Val2
in
  %% Server side.
  Val = 22
  {Connection.offer Val Ticket }
  {Pickle.save Ticket  '/home/thawkins/public_html/ticketfile'}
  {Br ['Server' Ticket]}
  {Br ['Server' Val]}

  %% Client side.
  {Pickle.load 'http://192.168.0.3/~thawkins/ticketfile' Ticket2}
  {Br ['Client' Ticket2]}
  {Connection.take Ticket2 Val2}
  {Br ['Client' Val2]}
end

But when I move the client code to a seperate file and compile and
run the server and client independently, the server appears to lock
up.  Here are the two independent files:

functor
import
  Connection
  Pickle
  Browser(browse:Br)
define
  Ticket
  Val
in
  %% Server side.
  Val = 22
  {Connection.offer Val Ticket }
  {Pickle.save Ticket  '/home/thawkins/public_html/ticketfile'}
  {Br ['Server' Ticket]}
  {Br ['Server' Val]}
end

functor
import
  Connection
  Pickle
  Browser(browse:Br)
define
  Ticket2
  Val2
in
  %% Client side.
  {Pickle.load 'http://192.168.0.3/~thawkins/ticketfile' Ticket2}
  {Br ['Client' Ticket2]}
  {Connection.take Ticket2 Val2}
  {Br ['Client' Val2]}
end


I have used the debugger to step through both programs at the same time
to see what is happening.
The server is able to create the ticket and pickle it to the file.
The client is able to resolve the URL and unpikle the ticket.
Both browsers do show the same ticket atom.

The problem happens as soon as the client performs Connection.take.
The client never gets the value and eventually errors out with a timeout.
I think the server actually locks up because when I do a ctrl-C to 
end the server it takes some time for the command line to come back.
I have also tried threading various statements in the server.
In this case after the client calls Connection.take, the debugger
on the server side becomes unresponsive: it no longer lets me
select between various threads.

What could I be doing wrong?  Is there anything special I need
to set up in the OS?  I'm running the basic install of Mandrake-8.2.

I should note that I did actually get it to work once for a brief
period.  I even had the server and client running to two seperate 
machines.  But after I restarted the server machine I haven't 
been able to get it running again.

Thanks for any help.

Regards,
Tom


 
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list