JDK-8035653 : InetAddress.getLocalHost crash
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2014-02-24
  • Updated: 2017-11-29
  • Resolved: 2014-02-26
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 8 JDK 9
8u152Fixed 9 b04Fixed
Related Reports
Duplicate :  
Relates :  
Description
This happened in jdk9 nightly 02-22 and 02-21, when running UDP tests on Win 8 64 bit.
There is no such issue with JDK 9 b02 promotion build.

I can reproduce with following snippet of code:
       try (DatagramSocket ds = new DatagramSocket();){
            
            ds.getLocalAddress();
        } catch (SocketException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

When invoking getLocalAddress(), the vm is immediately crushed.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d97c813, pid=856, tid=4616
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-ea-langtools-nightly-h114-20140221-b04-b00)
# Java VM: Java HotSpot(TM) Client VM (25.0-b62 mixed mode windows-x86 )
# Problematic frame:
# V  [jvm.dll+0xcc813]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\aurora\sandbox\hs_err_pid856.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#


There is a similar issue JDK-8026245 on JDK 8.
Comments
Reproduced with JDK9/b03 and verified with JDK9/b04 with provided regression test /test/java/net/DatagramSocket/B8035653.java $ /cygdrive/s/jdk/re/9/promoted/all/b04/binaries/windows-i586/bin/java B8035653 aurora@sc11136372 ~/workspace $ /cygdrive/s/jdk/re/9/promoted/all/b03/binaries/windows-i586/bin/java B8035653 # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x728cc893, pid=5924, tid=5460 # # JRE version: Java(TM) SE Runtime Environment (9.0-b03) (build 1.9.0-ea-b03) # Java VM: Java HotSpot(TM) Client VM (25.0-b62 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0xcc893] alloc_object+0x3 # # Failed to write core dump. Minidumps are not enabled by default on client vers ions of Windows # # An error report file with more information is saved as: # C:\users\aurora\workspace\hs_err_pid5924.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp #
24-03-2014

The changes for JDK-8025306 caused this problem.
27-02-2014

Affected tests: udp/UdpClient01 udp/UdpClient02 udp/UdpClient03 udp/UdpClient04 udp/UdpClient05 udp/UdpClient06 udp/UdpClient07 udp/UdpClient08 udp/UdpClient09 udp/UdpClient10 udp/udpClient
25-02-2014

Sounds like some initialization code was missed in DualStackPlainDatagramSocketImpl.s There is an initIDs() native function declared, but not defined or called. Could be that DSPDSI has no JNI field access, and hence no need to call an initializer but it does invoke some NET_ functions that do need it.
24-02-2014