JDK-8290013 : serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java failed "assert(!in_vm) failed: Undersized StackShadowPages"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 19,20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2022-07-08
  • Updated: 2022-07-25
  • Resolved: 2022-07-18
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 20
20 b07Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8290033 :  
Description
The following test failed in the JDK19 CI:

serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java

Here's a snippet from the log file:

#section:main
----------messages:(4/284)----------
command: main -agentlib:GetLocalWithoutSuspendTest -Xbatch GetLocalWithoutSuspendTest
reason: User specified action: run main/othervm/native -agentlib:GetLocalWithoutSuspendTest -Xbatch GetLocalWithoutSuspendTest 
Mode: othervm [/othervm specified]
elapsed time (seconds): 25.137
----------configuration:(0/0)----------
----------System.out:(25/1580)*----------
AGENT: Agent_OnLoad started.
AGENT: Agent_Initialize started
AGENT: Agent_Initialize finished
AGENT: VM init event
AGENT: Start new thread that performs GetLocalObject calls on a running target thread
### Java-Test: Set target thread for get local variable calls by agent.
### Java-Test: Test how many frames fit on the stack by performing recursive calls until
### Java-Test: StackOverflowError is thrown
### Java-Test: Testing with target depth: 20472
### Java-Test: Begin Test.
### Java-Test: 0 ms  Iteration : 0  waitTime : 1
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=\\os_windows.cpp:2587
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:\\sb\\prod\\1657141214\\workspace\\open\\src\\hotspot\\os\\windows\\os_windows.cpp:2587), pid=27992, tid=39380
#  assert(!in_vm) failed: Undersized StackShadowPages
#
# JRE version: Java(TM) SE Runtime Environment (19.0+30) (fastdebug build 19-ea+30-2169)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-ea+30-2169, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Core dump will be written. Default location: C:\\sb\\prod\\1657256586\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_serviceability\\scratch\\3\\hs_err_pid27992.mdmp
#
# An error report file with more information is saved as:
# C:\\sb\\prod\\1657256586\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_serviceability\\scratch\\3\\hs_err_pid27992.log
----------System.err:(0/0)----------
----------rerun:(48/6480)*----------

Here's the crashing thread's stack:

---------------  T H R E A D  ---------------

Current thread (0x00000280481a01b0):  JavaThread "MainThread" [_thread_in_vm, id=39380, stack(0x00000081c0500000,0x00000081c0600000)]

Stack: [0x00000081c0500000,0x00000081c0600000]

[error occurred during error reporting (printing native stack), id 0xe0000000, Internal Error (c:\sb\prod\1657141214\workspace\open\src\hotspot\os\windows\os_windows.cpp:2587)]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v  ~RuntimeStub::resolve_static_call 0x000002803aaeb2a7
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec38 [0x000002803afcebc0+0x0000000000000078]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]

<snip>

J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
J 2752 c2 GetLocalWithoutSuspendTest.recursiveMethod(II)I (37 bytes) @ 0x000002803afcec08 [0x000002803afcebc0+0x0000000000000048]
j  GetLocalWithoutSuspendTest.runTest()V+84
j  GetLocalWithoutSuspendTest.main([Ljava/lang/String;)V+7
J 2305 c2 java.lang.invoke.LambdaForm$DMH+0x0000000801001800.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;)V java.base@19-ea (14 bytes) @ 0x000002803af1f618 [0x000002803af1f5e0+0x0000000000000038]
J 2612 c2 java.lang.invoke.LambdaForm$MH+0x0000000801002c00.invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@19-ea (38 bytes) @ 0x000002803af39f54 [0x000002803af39ea0+0x00000000000000b4]
J 2627 c2 java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@19-ea (24 bytes) @ 0x000002803ab5eef8 [0x000002803ab5ee80+0x0000000000000078]
j  jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+55 java.base@19-ea
j  jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@19-ea
J 2255 c2 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@19-ea (108 bytes) @ 0x000002803aef81e0 [0x000002803aef7fe0+0x0000000000000200]
j  com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V+172
J 2225 c2 java.lang.Thread.run()V java.base@19-ea (19 bytes) @ 0x000002803aeda194 [0x000002803aeda140+0x0000000000000054]
v  ~StubRoutines::call_stub 0x000002803a9c10a7
--------------------------------------------------------------------------------
Decoding CodeBlob, name: resolve_static_call, at  [0x000002803aaeb220, 0x000002803aaeb3e0]  448 bytes
[MachCode]
  0x000002803aaeb220: 55

And the hs_err_pid file stops here... ouch.
Comments
Changeset: 6882f0eb Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2022-07-18 15:04:08 +0000 URL: https://git.openjdk.org/jdk/commit/6882f0eb39a1a1db1393925fab4143a725a96b6a
18-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9514 Date: 2022-07-15 12:31:44 +0000
15-07-2022

serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java passed using jdk-19+30-2167 bits. jdk-19+30-2168 only contains a ProblemListing changeset. The serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java failures are reproducible with jdk-19+30-2169 and it only contains one non-ProblemList changeset: JDK-8288949 serviceability/jvmti/vthread/ContStackDepthTest/ContStackDepthTest.java failing So if this is a size related failure, then the fix for JDK-8288949 pushed us over some limit.
09-07-2022

Ok, I'll have a look next week. I increased StackShadowPages once for windows.
08-07-2022

Temporarily assinging this bug to Coleen for evaluation. Coleen, please, feel free to assign it back to me if necessary. It seems that the last reserved page size adjustment was not enough when executed with -Xcomp on Windows.
08-07-2022

This issue is related to the addressed Windows issue: JDK-8279663.
08-07-2022