JetBrains / JetBrainsRuntime

Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux
GNU General Public License v2.0
1.3k stars 193 forks source link

jbrsdk-21.0.3-windows-x64-fastdebug-b458.1 java.exe run failed #392

Open xuMingHai1 opened 4 months ago

xuMingHai1 commented 4 months ago

jbrsdk-21.0.3-windows-x64-fastdebug-b458.1

command: \jbrsdk-21.0.3-windows-x64-fastdebug-b458.1\bin> .\java.exe

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (s\src\hotspot\share\runtime\statSampler.cpp:204), pid=16368, tid=6816
#  assert(strcmp(value, system_value) == 0) failed: property value mustn't differ from System.getProperty
#
# JRE version: OpenJDK Runtime Environment JBR-21.0.3+13-458.1-fd (21.0.3+13) (fastdebug build 21.0.3+13-b458.1)
# Java VM: OpenJDK 64-Bit Server VM JBR-21.0.3+13-458.1-fd (fastdebug 21.0.3+13-b458.1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
NikitkoCent commented 4 months ago

Can't reproduce on Windows 11 x64. Running java.exe just gives the usage help

xuMingHai1 commented 4 months ago

无法在 Windows 11 x64 上重现。运行 java.exe 只会提供使用帮助

There are some log files, hope they help

log file hs_err_pid16368.log

mdmp file https://1drv.ms/u/s!AuFkUF-PUdh7hTTBtWoYEHBkL_1W?e=fx0SGx

NikitkoCent commented 4 months ago

@xuMingHai1, seems like the cause is the path where the JBR is placed. Will it help if you move it in a way so that the full path contains only ASCII symbols? E.g. C:\Test\jbrsdk-21.0.3-windows-x64-fastdebug-b458.1?

xuMingHai1 commented 4 months ago

@xuMingHai1, seems like the cause is the path where the JBR is placed. Will it help if you move it in a way so that the full path contains only ASCII symbols? E.g. C:\Test\jbrsdk-21.0.3-windows-x64-fastdebug-b458.1?

@NikitkoCent I tried it, but it still doesn't work

PS D:\jbrsdk-21.0.3-windows-x64-fastdebug-b458.1\bin> .\java.exe
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (s\src\hotspot\share\runtime\statSampler.cpp:204), pid=10784, tid=4540
#  assert(strcmp(value, system_value) == 0) failed: property value mustn't differ from System.getProperty
#
# JRE version: OpenJDK Runtime Environment JBR-21.0.3+13-458.1-fd (21.0.3+13) (fastdebug build 21.0.3+13-b458.1)
# Java VM: OpenJDK 64-Bit Server VM JBR-21.0.3+13-458.1-fd (fastdebug 21.0.3+13-b458.1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Core dump will be written. Default location: D:\jbrsdk-21.0.3-windows-x64-fastdebug-b458.1\bin\hs_err_pid10784.mdmp
#
JNI global refs:
JNI global refs: 14, weak refs: 0

JNI global refs memory usage: 843, weak refs: 209

OOME stack traces (most recent first):
Classloader memory used:
Loader bootstrap                                                                       : 180K

# An error report file with more information is saved as:
# D:\jbrsdk-21.0.3-windows-x64-fastdebug-b458.1\bin\hs_err_pid10784.log
#
# If you would like to submit a bug report, please visit:
#   https://youtrack.jetbrains.com/issues/JBR
#
PS D:\jbrsdk-21.0.3-windows-x64-fastdebug-b458.1\bin>
NikitkoCent commented 4 months ago

@xuMingHai1, I'll make a custom build with a bit more verbose logging for you, so we could gather more info.

xuMingHai1 commented 4 months ago

@xuMingHai1,我将为您定制一个带有更详细日志记录的版本,以便我们可以收集更多信息。

Thanks, I'll be happy to test it for you

NikitkoCent commented 4 months ago

@xuMingHai1, hello! Can I ask you to try this build: https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-windows-x64-fastdebug-b458.2.tar.gz? Just run it in the same way you did and send the console output and the hs_err log file here, please.

xuMingHai1 commented 4 months ago

@NikitkoCent

console output

PS C:\Users\徐明海\Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin> .\java.exe
StatSampler::assert_system_property: name="sun.boot.library.path", value="C:\Users\徐明海\Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin", system_value="C:\Users\寰愭槑娴穃Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin".
         value bytes: [0x43, 0x3A, 0x5C, 0x55, 0x73, 0x65, 0x72, 0x73, 0x5C, 0xD0, 0xEC, 0xC3, 0xF7, 0xBA, 0xA3, 0x5C, 0x44, 0x6F, 0x77, 0x6E, 0x6C, 0x6F, 0x61, 0x64, 0x73, 0x5C, 0x6A, 0x62, 0x72, 0x73, 0x64, 0x6B, 0x2D, 0x32, 0x31, 0x2E, 0x30, 0x2E, 0x33, 0x2D, 0x77, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x2D, 0x78, 0x36, 0x34, 0x2D, 0x66, 0x61, 0x73, 0x74, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2D, 0x62, 0x34, 0x35, 0x38, 0x2E, 0x32, 0x5C, 0x62, 0x69, 0x6E]
  system_value bytes: [0x43, 0x3A, 0x5C, 0x55, 0x73, 0x65, 0x72, 0x73, 0x5C, 0xE5, 0xBE, 0x90, 0xE6, 0x98, 0x8E, 0xE6, 0xB5, 0xB7, 0x5C, 0x44, 0x6F, 0x77, 0x6E, 0x6C, 0x6F, 0x61, 0x64, 0x73, 0x5C, 0x6A, 0x62, 0x72, 0x73, 0x64, 0x6B, 0x2D, 0x32, 0x31, 0x2E, 0x30, 0x2E, 0x33, 0x2D, 0x77, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x2D, 0x78, 0x36, 0x34, 0x2D, 0x66, 0x61, 0x73, 0x74, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2D, 0x62, 0x34, 0x35, 0x38, 0x2E, 0x32, 0x5C, 0x62, 0x69, 0x6E]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (s\src\hotspot\share\runtime\statSampler.cpp:231), pid=19132, tid=18564
#  assert(strcmp(value, system_value) == 0) failed: property value mustn't differ from System.getProperty
#
# JRE version: OpenJDK Runtime Environment JBR-21.0.3+13-458.2-fd (21.0.3+13) (fastdebug build 21.0.3+13-b458.2)
# Java VM: OpenJDK 64-Bit Server VM JBR-21.0.3+13-458.2-fd (fastdebug 21.0.3+13-b458.2, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Core dump will be written. Default location: C:\Users\徐明海\Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin\hs_err_pid19132.mdmp
#
JNI global refs:
JNI global refs: 14, weak refs: 0

JNI global refs memory usage: 843, weak refs: 209

OOME stack traces (most recent first):
Classloader memory used:
Loader bootstrap                                                                       : 179K

# An error report file with more information is saved as:
# C:\Users\徐明海\Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin\hs_err_pid19132.log
#
# If you would like to submit a bug report, please visit:
#   https://youtrack.jetbrains.com/issues/JBR
#
PS C:\Users\徐明海\Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin>

hs_err

hs_err_pid19132.log

hs_err_pid191132.mdmp

NikitkoCent commented 3 months ago

Oh, it's indeed an encoding issue. We have here 2 strings - value and system_value. Their content is identical and equals to the string "C:\Users\徐明海\Downloads\jbrsdk-21.0.3-windows-x64-fastdebug-b458.2\bin", but the latter is encoded in UTF-8, while the former uses the GBK encoding. HotSpot expects both of them to be encoded in UTF-8 to be able to compare them correctly.

@xuMingHai1, can I ask you send the PowerShell output of the 6 following commands?

xuMingHai1 commented 3 months ago

@NikitkoCent

Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

PS C:\Users\徐明海> $OutputEncoding

IsSingleByte      : True
BodyName          : us-ascii
EncodingName      : US-ASCII
HeaderName        : us-ascii
WebName           : us-ascii
WindowsCodePage   : 1252
IsBrowserDisplay  : False
IsBrowserSave     : False
IsMailNewsDisplay : True
IsMailNewsSave    : True
EncoderFallback   : System.Text.EncoderReplacementFallback
DecoderFallback   : System.Text.DecoderReplacementFallback
IsReadOnly        : True
CodePage          : 20127

PS C:\Users\徐明海> $InputEncoding
PS C:\Users\徐明海> [Console]::OutputEncoding

BodyName          : gb2312
EncodingName      : 简体中文(GB2312)
HeaderName        : gb2312
WebName           : gb2312
WindowsCodePage   : 936
IsBrowserDisplay  : True
IsBrowserSave     : True
IsMailNewsDisplay : True
IsMailNewsSave    : True
IsSingleByte      : False
EncoderFallback   : System.Text.InternalEncoderBestFitFallback
DecoderFallback   : System.Text.InternalDecoderBestFitFallback
IsReadOnly        : False
CodePage          : 936

PS C:\Users\徐明海> [Console]::InputEncoding

BodyName          : gb2312
EncodingName      : 简体中文(GB2312)
HeaderName        : gb2312
WebName           : gb2312
WindowsCodePage   : 936
IsBrowserDisplay  : True
IsBrowserSave     : True
IsMailNewsDisplay : True
IsMailNewsSave    : True
IsSingleByte      : False
EncoderFallback   : System.Text.InternalEncoderBestFitFallback
DecoderFallback   : System.Text.InternalDecoderBestFitFallback
IsReadOnly        : True
CodePage          : 936

PS C:\Users\徐明海> [System.Text.Encoding]::Default

BodyName          : gb2312
EncodingName      : 简体中文(GB2312)
HeaderName        : gb2312
WebName           : gb2312
WindowsCodePage   : 936
IsBrowserDisplay  : True
IsBrowserSave     : True
IsMailNewsDisplay : True
IsMailNewsSave    : True
IsSingleByte      : False
EncoderFallback   : System.Text.InternalEncoderBestFitFallback
DecoderFallback   : System.Text.InternalDecoderBestFitFallback
IsReadOnly        : True
CodePage          : 936

PS C:\Users\徐明海>