JDK-8207970 : jfr/startupargs/TestMemoryOptions.java fails intermittently on Linux-X64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 11,12,13
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_ubuntu
  • CPU: x86_64
  • Submitted: 2018-07-20
  • Updated: 2020-02-11
  • Resolved: 2019-08-23
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
The following test failed due to an exception on Linux X64
in the fastdebug config using jdk11+19 bits:

jdk/jfr/startupargs/TestMemoryOptions.java

The test only failed in 1 of 3 'fastdebug' bits runs so I'm
tagging this bug as intermittent. It did not fail at all in the
'release' or 'slowdebug' bits runs.

Here is a snippet from the log file: 

----------System.err:(26/1420)----------
 stdout: [[0.533s][error][arguments] Value specified for option "numglobalbuffers" is 1
[0.533s][error][arguments] This value is lower than the minimum required number 2
Error occurred during initialization of VM
Failure when starting JFR on_vm_start
];
 stderr: []
 exitValue = 139

java.lang.RuntimeException: Expected to get exit value of [1]

        at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:396)
        at jdk.jfr.startupargs.TestMemoryOptions$Driver.launchTestVM(TestMemoryOptions.java:514)
        at jdk.jfr.startupargs.TestMemoryOptions$Driver.runTestCase(TestMemoryOptions.java:519)
        at jdk.jfr.startupargs.TestMemoryOptions.main(TestMemoryOptions.java:649)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
        at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [1]

JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to get exit value of [1]
----------rerun:(31/3789)*----------


The test case is expected to fail with an exit code of "1", but instead failed
with an exit code of "139". That exit code make me wonder if the test crashed,
but the test run directories show no sign of that:

$ ls build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_jdk_jdk_svc/jdk/jfr/startupargs/TestMemoryOptions*
build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_jdk_jdk_svc/jdk/jfr/startupargs/TestMemoryOptions.jtr

build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_jdk_jdk_svc/jdk/jfr/startupargs/TestMemoryOptions:
environment.html  environment.log

build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_jdk_jdk_svc/jdk/jfr/startupargs/TestMemoryOptions.d:
compile.0.jta  main.1.jta

Comments
The failure for this bug looks very similar to JDK-8214685. I will make JDK-8214685 more generic, and will close this issue as a duplicate. However, the attachments contain useful information, hs_err files for further analysis.
23-08-2019

--------------- T H R E A D --------------- Current thread (0x00002b6d2001f000): JavaThread "main" [_thread_in_native, id=14869, stack(0x00002b6d1c9a5000,0x00002b6d1caa6000)] Stack: [0x00002b6d1c9a5000,0x00002b6d1caa6000], sp=0x00002b6d1caa4ae8, free space=1022k Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) C 0x00002b6d8400fb60 siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x00002b6d8400fb60 -------------- T H R E A D --------------- Current thread (0x00002afcc401f000): JavaThread "main" [_thread_in_native, id=14963, stack(0x00002afcc089e000,0x00002afcc099f000)] Stack: [0x00002afcc089e000,0x00002afcc099f000], sp=0x00002afcc099da60, free space=1022k Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.6+0x7c3d3] siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x0000000000000000 --------------- T H R E A D --------------- Current thread (0x00002b446001f800): JavaThread "main" [_thread_in_native, id=9412, stack(0x00002b445953a000,0x00002b445963b000)] Stack: [0x00002b445953a000,0x00002b445963b000], sp=0x00002b4459639b00, free space=1022k Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.6+0x7c3f4] siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x0000000000000000
23-08-2019

Based on included hs_err files: - SEGV (Segmentation fault) when passing the illegal/unaccepted values as JFR parameters - product bug, not a test bug - stack looks strange, possible stack corruption?
23-08-2019

Here are the logs for my jdk-13+13 Linux-X64 sightings: $ unzip -l jdk-13+13_linux.8207970.zip Archive: jdk-13+13_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 107597 2019-03-21 18:52 jdk-13+13_1/failures.linux-x86_64/hs_err_pid9410.log 27673 2019-03-21 18:52 jdk-13+13_1/failures.linux-x86_64/TestMemoryOptions.jtr.fastdebug --------- ------- 135270 2 files
24-03-2019

Here are the logs for my jdk-13+11 Linux-X64 sightings: $ unzip -l jdk-13+11_linux.8207970.zip Archive: jdk-13+11_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 27479 2019-03-08 16:54 jdk-13+11_1/failures.linux-x86_64/TestMemoryOptions.jtr.slowdebug 3885 2019-03-08 16:54 jdk-13+11_1/failures.linux-x86_64/hs_err_pid14962.log --------- ------- 31364 2 files
11-03-2019

Here are the logs for my jdk-13+9 Linux-X64 sightings: $ unzip -l jdk-13+9_linux.8207970.zip Archive: jdk-13+9_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 109644 2019-02-24 15:25 jdk-13+9_3/failures.linux-x86_64/hs_err_pid14867.log 24403 2019-02-24 15:25 jdk-13+9_3/failures.linux-x86_64/TestMemoryOptions.jtr.fastdebug --------- ------- 134047 2 files
25-02-2019

Here are the logs for my jdk-12+11 Linux-X64 sightings: $ unzip -l jdk-12+11_linux.8207970.zip Archive: jdk-12+11_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 27782 2018-09-14 00:34 jdk-12+11_1/TestMemoryOptions.jtr.fastdebug 26019 2018-09-15 03:00 jdk-12+11_2/TestMemoryOptions.jtr.fastdebug --------- ------- 53801 2 files
17-09-2018

Here are the logs for my jdk-12+10 Linux-X64 sightings: $ unzip -l jdk-12+10_linux.8207970.zip Archive: jdk-12+10_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 29577 2018-09-08 04:20 jdk-12+10_2/TestMemoryOptions.jtr.fastdebug --------- ------- 29577 1 file
09-09-2018

Same test failed in my jdk-12+10 Thread-SMR stress testing on Linux-X64 with the same failure mode of exit code 139, but with a different test case. Here's a snippet of the error log: Parameter name: threadbuffersize threadbuffersize=4095 Input value: 4095 Predicted to start VM: false ----------System.err:(26/1424)---------- stdout: [[0.661s][error][arguments] Value specified for option "threadbuffersize" is 4095 [0.661s][error][arguments] This value is lower than the minimum size required 4096 Error occurred during initialization of VM Failure when starting JFR on_vm_start ]; stderr: [] exitValue = 139 java.lang.RuntimeException: Expected to get exit value of [1] at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:396) at jdk.jfr.startupargs.TestMemoryOptions$Driver.launchTestVM(TestMemoryOptions.java:515) at jdk.jfr.startupargs.TestMemoryOptions$Driver.runTestCase(TestMemoryOptions.java:520) at jdk.jfr.startupargs.TestMemoryOptions.main(TestMemoryOptions.java:650) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:834) JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [1] JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to get exit value of [1] ----------rerun:(35/4025)*---------- The test case is expected to fail with an exit code of "1", but instead failed with an exit code of "139".
09-09-2018

Here are the logs for my jdk11+23 linux sightings: $ unzip -l jdk-11+23_linux.8207970.zip Archive: jdk-11+23_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 27790 2018-07-22 09:46 jdk-11+23_2/TestMemoryOptions.jtr.fastdebug --------- ------- 27790 1 file
24-07-2018

Here are the logs for my jdk11+19 linux sightings: $ unzip -l jdk11_migrate_linux.8207970.zip Archive: jdk11_migrate_linux.8207970.zip Length Date Time Name --------- ---------- ----- ---- 27291 2018-06-30 09:15 jdk11_migrate_3_linux/TestMemoryOptions.jtr.fastdebug --------- ------- 27291 1 file
20-07-2018