Code Review 6935233: java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java fails with modules build

Alan Bateman Alan.Bateman at Sun.COM
Thu Mar 18 04:23:20 PDT 2010


Christopher Hegarty -Sun Microsystems Ireland wrote:
> Alan, Michael,
>
> java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java fails with 
> modules build because number of open file descriptors exceeds 20. 
> Instead of a hardcoded number, the test should check the number of 
> file descriptors does not increase much before and after its work.
>
> Also, run in othervm so that the file descriptors in the particular 
> process will be consistent.
>
> Webrev:
>   http://cr.openjdk.java.net/~chegar/6935233/webrev.00/webrev/
>
> -Chris.
It still seems very fragile and doesn't take into account that the 
number of file descriptors might legitimately increase.  How about 
changing the test to use ulimit on Solaris/Linux to set the hard limit 
to a smallish limit (say 1024) and then run and accept >1024 
connections.  If the original leak were to come back then it should fail 
reliably.

-Alan.



More information about the net-dev mailing list