There is a race condition in ServerSocket.accept() as noted in comment #11 of PR15430: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15430#c11
As well as here: http://developer.classpath.org/pipermail/classpath/2006-October/001583.html The same problem probably exists in classpath, but there are seperate low level implementations in classpath and libgcj so it would have to be fixed in both places. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15430#c11 -- Summary: Race condition in ServerSocket.accept() Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: daney at gcc dot gnu dot org GCC build triplet: *-*-* GCC host triplet: *-*-* GCC target triplet: *-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29604