harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hindess <mark.hind...@googlemail.com>
Subject Re: [classlib] Network changes causing linux hang in HttpURLConnectionTest
Date Thu, 11 Dec 2008 11:28:57 GMT

In message <200812110854.mBB8shW9030452@d06av02.portsmouth.uk.ibm.com>,
"Mark Hindess" writes:
>
> When running 
> org.apache.harmony.luni.tests...protocol.http.HttpURLConnectionTest
> I am seeing a hang in testConnectionPersistence method on linux
> (x86-64 and x86).
> [snip]

Ok.  It looks like there is a problem with the selectRead implementation on
unix.  The use of this function in:

  Java_org_apache_harmony_luni_platform_OSNetworkSystem_readDirect

compares the result of the selectRead call using portlib constants.  This
is valid for the windows implementation of selectRead - because it uses
hysock_select.  However, the unix implementation uses poll which is returning:

  On success, a positive number is returned; [snip].  A value of 0
  indicates that the call timed out and no file descriptors were ready.
  On error, -1 is returned, and errno is set appropriately.

I think the fix is:

1) Check for other uses of selectRead and make sure they all use portlib 
constants.

2) Fix selectRead on unix to map the poll return codes to portlib constants.

I'll take a look at doing this.  Shout if you don't think this is a good
approach.

-Mark.



Mime
View raw message