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

Re: Moab Channels



> Date: Sun, 6 May 2001 15:53:49 -0500 (CDT)
> From: Ravi Chamarty <ravi@ittc.ukans.edu>
> To: janos-discuss@fast.cs.utah.edu
> Subject: Moab Channels
> 
> Hi,
> 
>  I am trying to run a socktest type in-channel in Moab. I am encountering
> the following problem while creating the in-channel. When a new
> thread(chan_socketdata_intr) is created, the parent thread does not run
> any further. The 'chan_socketdata_intr' thread creates a socket and blocks
> on 'recvfrom'. Hence, when a packet arrives it is received correctly, but
> encounters an error when executing the function 'ani_demuxkeylist_apply'.
> This is probably because the parent thread has not yet enabled the channel
> in ani_chan_enable which would have added the demuxkey to the
> demuxkeylist.
> 
>  Is there a race condition wherein we may be required to do cond_wait
> before recvfrom ? Or could there be any other problem with the threads.
> Any help would be appreciated.
> 

When you say it "encounters an error", what exactly does it do?  Does
Moab blow up?  What I would expect would happen is that the received
packets would be dropped until the parent finally ran and registered
the demuxkey.  Note that this isn't necessarily the correct behavior,
just what I would expect in the current implementation.  It may be that
we need to export the enable function so that an EE can do:

	chan = an_inchan_create(...);
	<do some more initialization>
	an_inchan_enable(chan);
	...

Would this help in your situation?

Sorry about all these problems.  As you can tell, most of our testing has
been using "raw" ethernet channels and we haven't done much with socket
channels.  I will work on testing these better...





[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah