Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8013897

JRE crash when opening a ServerSocket

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 7u7
    • core-libs
    • Windows XP

      FULL PRODUCT VERSION :
      java version " 1.7.0_07 "
      Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
      Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      A sudden crash when opening a new ServerSocket. The system stuff popped up and said " java.exe has encountered a problem and needs to close. We are sorry for the inconvenience. "

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run this line of code:

      new java.net.ServerSocket(25565, 50);

      This particular line of code, at exactly the same spot every time, seems to be the culprit.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The program to open a new server socket on the system, allowing other computers to connect
      ACTUAL -
      Sudden crash in the middle of creating the ServerSocket

      No exception is thrown; just the exit code -1073741811, with the " java.exe encountered an exception and needs to close " dialog that comes from the system's built-in uncaught exception handler.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No hs_err_pid####.log files were generated :( but this is what the stack trace looked like when I froze it (Via the debugger, stepping into it a lot) at the call right before the crash (which occured on a return statement, no less):

      java.lang.ClassLoader.findNative(ClassLoader.java:1963)
      java.net.TwoStacksPlainSocketImpl.socketCreate(TwoStacksPlainSocketImpl.java)
      java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:103)
      java.net.TwoStacksPlainSocketImpl.create(TwoStacksPlainSocketImpl.java:86)
      java.net.PlainSocketImpl.create(PlainSocketImpl.java:140)
      java.net.ServerSocket.createImpl(ServerSocket.java:305)
      java.net.ServerSocket.getImpl(ServerSocket.java:257)
      java.net.ServerSocket.bind(ServerSocket.java:376)
      java.net.ServerSocket.<init>(ServerSocket.java:237)
      java.net.ServerSocket.<init>(ServerSocket.java:181)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class main{
          public static void main(String[] args) throws IOException{
              new java.net.ServerSocket(25565, 50);//crash here
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Not using the networking abilities of Java.

      SUPPORT :
      YES

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: