JDK-6483406 : new ServerSocket() sometimes takes more than 3 minutes on Suse Linux
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-10-18
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b30Fixed
Description
Sometimes on Suse Linux machines, call to ServerSocket default constructor can take more than 3 minutes.

Here is the stack trace:
        at java.net.PlainSocketImpl.initProto(Native Method)
        at java.net.PlainSocketImpl.<clinit>(PlainSocketImpl.java:84)
        at java.net.ServerSocket.setImpl(ServerSocket.java:236)
        at java.net.ServerSocket.<init>(ServerSocket.java:61)
        at ServerSocketCreateTest.main(ServerSocketCreateTest.java:9)

Attached program and script can be used to reproduce this.

It seems that it is waiting for some timeout.

Comments
EVALUATION I've raised the priority as the problem seems to be more widespread than initially thought. Will also consider a backport to JDK 6.
2008-05-08

EVALUATION The only thing that can block for such a long time in initProto() is the creation of the markerFD. Switching to socketpair() calls, as we are planning to do, should solve this.
2006-10-27