-
Bug
-
Resolution: Fixed
-
P4
-
9.0.4, 11.0.1, 12.0.1, 17
-
b05
-
x86_64
-
windows_10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8260357 | 16.0.1 | Evan Whelan | P4 | Resolved | Fixed | b03 |
JDK-8278481 | 15.0.6 | Yuri Nesterenko | P4 | Resolved | Fixed | b04 |
JDK-8260500 | 13.0.7 | Ekaterina Vergizova | P4 | Resolved | Fixed | b01 |
JDK-8261057 | 13.0.6 | Ekaterina Vergizova | P4 | Resolved | Fixed | b01 |
JDK-8259705 | 11.0.11-oracle | Dukebot | P4 | Resolved | Fixed | b02 |
JDK-8259829 | 11.0.11 | Evan Whelan | P4 | Resolved | Fixed | b01 |
JDK-8261889 | 11.0.10.0.2-oracle | Dukebot | P4 | Closed | Fixed | b01 |
OS: Windows10 1607 (internal version 14393.2430)
Java: 12.0.1, extracted from the official release package jdk-12.0.1_windows-x64_bin.zip.
A DESCRIPTION OF THE PROBLEM :
Try to launch the JVM on windows10, with command line "java -version"; and it failed due to NullPointerException on java.base/java.lang.System.props, with the following stacks:
Error occurred during initialization of VM
java.lang.NullPointerException
at java.lang.System.getProperty(java.base/System.java:848)
at sun.security.action.GetPropertyAction.privilegedGetProperty(java.base/GetPropertyAction.java:105)
at java.nio.charset.Charset.defaultCharset(java.base/Charset.java:607)
at java.lang.StringCoding.decode(java.base/StringCoding.java:316)
at java.lang.String.<init>(java.base/String.java:601)
at java.lang.String.<init>(java.base/String.java:623)
at jdk.internal.util.SystemProps$Raw.vmProperties(java.base/Native Method)
at jdk.internal.util.SystemProps$Raw.cmdProperties(java.base/SystemProps.java:261)
at jdk.internal.util.SystemProps.initProperties(java.base/SystemProps.java:55)
at java.lang.System.initPhase1(java.base/System.java:1997)
I've checked the source of System.java. It seems that the implementation is not accordant with the following comments:
/**
* Initialize the system class. Called after thread initialization.
*/
private static void initPhase1() {
// VM might invoke JNU_NewStringPlatform() to set those encoding
// sensitive properties (user.home, user.name, boot.class.path, etc.)
// during "props" initialization.
// The charset is initialized in System.c and does not depend on the Properties.
Map<String, String> tempProps = SystemProps.initProperties();
VersionProps.init(tempProps);
// There are certain system configurations that may be controlled by
// VM options such as the maximum amount of direct memory and
// Integer cache size used to support the object identity semantics
// of autoboxing. Typically, the library will obtain these values
// from the properties set by the VM. If the properties are for
// internal implementation use only, these properties should be
// masked from the system properties.
//
// Save a private copy of the system properties object that
// can only be accessed by the internal implementation.
VM.saveProperties(tempProps);
props = createProperties(tempProps);
........
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
executing cmd: java -version
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JVM launched, and show the correct version info.
ACTUAL -
NullPointException occured.
FREQUENCY : always
- backported by
-
JDK-8259705 Failed to launch JVM because of NullPointerException occured on System.props
- Resolved
-
JDK-8259829 Failed to launch JVM because of NullPointerException occured on System.props
- Resolved
-
JDK-8260357 Failed to launch JVM because of NullPointerException occured on System.props
- Resolved
-
JDK-8260500 Failed to launch JVM because of NullPointerException occured on System.props
- Resolved
-
JDK-8261057 Failed to launch JVM because of NullPointerException occured on System.props
- Resolved
-
JDK-8278481 Failed to launch JVM because of NullPointerException occured on System.props
- Resolved
-
JDK-8261889 Failed to launch JVM because of NullPointerException occured on System.props
- Closed
- links to
-
Commit openjdk/jdk13u-dev/ad28e4fe
-
Commit openjdk/jdk15u-dev/d28c7d7e
-
Commit openjdk/jdk16u/e9dae4dd
-
Commit openjdk/jdk/5f7ccce0
-
Review openjdk/jdk13u-dev/90
-
Review openjdk/jdk15u-dev/152
-
Review openjdk/jdk16u/4
-
Review openjdk/jdk/2053