JDK-8306278 : jvmtiAgentList.cpp:253 assert(offset >= 0) failed: invariant occurs on AIX after JDK-8257967
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 21
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: aix
  • CPU: ppc
  • Submitted: 2023-04-18
  • Updated: 2023-04-24
  • Resolved: 2023-04-19
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 21
21 b19Fixed
Related Reports
Relates :  
Description
After https://bugs.openjdk.org/browse/JDK-8257967  the AIX tests (using fastdebug binaries) run into this error
in lots of jtreg tests. Example is from test jdk/jshell/T8146368/JShellTest8146368.java, but lots of others fail too.


#  Internal Error (/openjdk/rs6000_64/jdk-dev/src/hotspot/share/prims/jvmtiAgentList.cpp:253), pid=18350360, tid=258
#  assert(offset >= 0) failed: invariant
#

|---stackaddr----|   |----lrsave------|:   <function name>
0x0000000110238640 - 0x0900000018adaf60 libjvm.so::os::Aix::platform_print_native_stack(outputStream*, void const*, char*, int)+0x20  (C++ saves_lr stores_bc fixedparms:4 )
0x00000001102386b0 - 0x0900000018b2b31c libjvm.so::VMError::report(outputStream*, bool)+0x3c5c  (C++ saves_lr stores_bc gpr_saved:18 fixedparms:2 )
0x00000001102398b0 - 0x0900000018b2f43c libjvm.so::VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x1dc  (C++ saves_cr saves_lr stores_bc gpr_saved:18 fixedparms:8 )
0x0000000110239ca0 - 0x0900000018b30a08 libjvm.so::VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, char*)+0x48  (C++ saves_lr stores_bc fixedparms:7 )
0x0000000110239d30 - 0x09000000188b4984 libjvm.so::report_vm_error(char const*, int, char const*, char const*, ...)+0xa4  (C++ saves_lr stores_bc gpr_saved:6 fixedparms:8 parmsonstk:1)
0x0000000110239ee0 - 0x090000001a92088c libjvm.so::JvmtiAgentList::lookup(JvmtiEnv*, void*)+0x72c  (C++ saves_lr stores_bc gpr_saved:5 fixedparms:2 )
0x0000000110239f90 - 0x090000001a7478d0 libjvm.so::JvmtiExport::post_vm_initialized()+0x1290  (C++ saves_lr stores_bc gpr_saved:18 )
0x000000011023a1d0 - 0x0900000018b7955c libjvm.so::Threads::create_vm(JavaVMInitArgs*, bool*)+0x89c  (C++ saves_lr stores_bc gpr_saved:10 fixedparms:2 )
0x000000011023a470 - 0x090000001aa3961c libjvm.so::JNI_CreateJavaVM_inner(JavaVM_**, void**, void*)+0xdc  (C++ saves_cr saves_lr stores_bc gpr_saved:10 fixedparms:3 )
0x000000011023a590 - 0x0000000100006598 java::IPRA.$InitializeJVM+0x98  (C saves_lr stores_bc gpr_saved:7 fixedparms:3 )
0x000000011023a650 - 0x00000001000059f0 java::JavaMain+0x90       (C saves_lr stores_bc gpr_saved:9 fixedparms:1 )
0x000000011023a730 - 0x000000010000c270 java::ThreadJavaMain+0x10  (C saves_lr stores_bc fixedparms:1 )
0x000000011023a7a0 - 0x090000000054bfec libpthreads.a::_pthread_body+0xec  (C saves_lr stores_bc gpr_saved:1 fixedparms:1 )
0x000000011023a820 - 0x0000000000000000 
*** end of backchain ***
Comments
Changeset: c738c8ea Author: Markus Grönlund <mgronlun@openjdk.org> Date: 2023-04-19 10:59:10 +0000 URL: https://git.openjdk.org/jdk/commit/c738c8ea3e9fda87abb03acb599a2433a344db09
19-04-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13513 Date: 2023-04-18 16:59:29 +0000
18-04-2023

For most platforms, os::dll_address_to_library_name() only sets offset = -1 in case of errors. If there is an error, the function returns false. This is fine. On AIX, the offset is invariantly set to -1, even in the case of non-errors. Easiest to remove the assertion on offset.
18-04-2023

Markus, I temporarily assigned it to you. Could you, please, take a look? It is related to your recent change. As a regression it needs to be fixed in 21, I think.
18-04-2023