[erlang-questions] Jinterface hanging on send

Francis Stephens francisstephens@REDACTED
Wed Dec 8 23:20:40 CET 2010


Alright, I have reproduced it on linux.  It seems that I am probably
making inappropriate use of the sockets jinterface uses to communicate with
epmd.  But I am surprised that having multiple JVMs running on one machine
breaks it like that.  Keep digging.

On Mon, Dec 6, 2010 at 3:44 PM, Alain O'Dea <alain.odea@REDACTED> wrote:

> On Monday, December 6, 2010, Francis Stephens <francisstephens@REDACTED>
> wrote:
> > I have a number of Jinterface nodes running on separate JVMs.  With fair
> > regularity () they are blocking on calls to
> > OtpMbox.send(OtpPid,OtpErlangObject).
> >
> >
> > Debugging has shown that each of them is blocking on a call to
> > SocketInputStream.read(byte, int, int).
>
> I'm trying to imagine why OtpMbox.send(OtpPid,OtpErlangObject) would
> ever need to read a socket.  Perhaps it needs to consult EPMB to find
> where lookup the receiver for the OtpPid you are sending to.
>
> Interesting problem. I have been considering Java/Erlang interop for
> several years on and off. I am very I interested to learn the cause of
> the problem you are seeing and how to solve it.
>
> >
> >
> > It often appears that the hanging processes are trying to send a message
> to
> > each other at the same time.  Often killing one of the JVMs that is
> blocked
> > on a send will release the other one.
> >
> >
> > I am running Erlang version 5.8.1.1 with jinterface 1.5.3.1 running on
> > windows.
> >
> >
> > Has anyone seen this behaviour before?  Is it expected behaviour, I was
> > expecting to be able to run several communicating JVMs concurrently.
> > Right-ho, off to read up on socket programming.
> >
>


More information about the erlang-questions mailing list