JDK-8246378 : [Windows] assert on MethodHandle logging code
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-06-02
  • Updated: 2020-11-26
  • Resolved: 2020-11-20
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 16
16 b26Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
runtime/logging/TestMethodHandlesVerbose.java crashes with
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (t:\\workspace\\open\\src\\hotspot\\cpu\\x86\\frame_x86.inline.hpp:49), pid=16644, tid=9372
#  assert(pc != 0LL) failed: no pc?

when running in Graal as JIT mode on Windows.

This is new test introduced in b25.

To reproduce the failure run the test with 
"-ea -esa -server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal -XX:+TieredCompilation"

Comments
Changeset: e7c7469c Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2020-11-20 13:00:10 +0000 URL: https://github.com/openjdk/jdk/commit/e7c7469c
20-11-2020

The failure occurs on Windows fastdebug or slowdebug builds when the below program is run with command: java -XX:+Verbose -Xlog:methodhandles Hi a b public class Hi { public static void main(String argv[]) throws Throwable { System.out.println(argv[0] + argv[1]); } }
15-10-2020

With a slowdebug build we hit the following assert: assert(cur_frame.sp() < saved_regs, "registers not saved on stack ?"); While looking closer at os::current_frame(), I saw this comment for os::get_sender_for_C_frame() for os_windows_x86.cpp: // VC++ does not save frame pointer on stack in optimized build. It // can be turned off by /Oy-. If we really want to walk C frames, // we can use the StackWalk() API. That might be the reasons for this assertion failure. As this is not a compiler bug I unassigned it. Maybe someone from the runtime team could have a closer look at it. Thanks!
15-06-2020

Could reproduce it on Windows running the test runtime/logging/RedefineClasses.java by additionally setting -XX:+Verbose. Therefore, it does not seem to be a Graal related issue. Will have a closer look.
03-06-2020