Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Assertion Failure at J9KnownObjectTable.cpp:207 #20410

Open
luke-li-2003 opened this issue Oct 24, 2024 · 5 comments
Open

Fatal Assertion Failure at J9KnownObjectTable.cpp:207 #20410

luke-li-2003 opened this issue Oct 24, 2024 · 5 comments
Assignees
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project

Comments

@luke-li-2003
Copy link
Contributor

The fatal assertion at openj9/runtime/compiler/env/J9KnownObjectTable.cpp fails when running with a JITServer (e.g. when running test jdk_vector_float128_j9_0 on s390x linux (link)).

This is caused by getPointer being called by openj9/runtime/compiler/optimizer/VectorAPIExpansion.cpp:668, which should not be called by the server since the server cannot obtain VM access.

Copy link

Issue Number: 20410
Status: Open
Recommended Components: comp:vm, comp:gc, comp:test
Recommended Assignees: pshipton, babsingh, jasonfengj9

@luke-li-2003
Copy link
Contributor Author

@mpirvu

@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Oct 24, 2024
@mpirvu mpirvu self-assigned this Oct 24, 2024
@mpirvu
Copy link
Contributor

mpirvu commented Oct 24, 2024

The server should never execute code that needs VM access. File openj9/runtime/compiler/optimizer/VectorAPIExpansion.cpp has two such offenders, one in getVectorSizeFromVectorSpecies() and one in getJ9ClassFromClassNode()

@mpirvu
Copy link
Contributor

mpirvu commented Oct 24, 2024

For getJ9ClassFromClassNode() the code is:

J9Class *
TR_VectorAPIExpansion::getJ9ClassFromClassNode(TR::Compilation *comp, TR::Node *classNode)
   {
   if (!classNode->getOpCode().hasSymbolReference())
      return NULL;

   TR::SymbolReference *symRef = classNode->getSymbolReference();
   if (symRef)
      {
      if (symRef->hasKnownObjectIndex())
         {
         TR_J9VMBase *fej9 = comp->fej9();

         TR::VMAccessCriticalSection getDataTypeFromClassNodeSection(fej9);

         uintptr_t javaLangClass = comp->getKnownObjectTable()->getPointer(symRef->getKnownObjectIndex());
         J9Class *j9class = (J9Class *)(intptr_t)fej9->getInt64Field(javaLangClass, "vmRef");

         return j9class;
         }
      }
   return NULL;
   }

Since the known object index is known, the server could send a message to the client with this value and the client could return the corresponding j9class.

@mpirvu
Copy link
Contributor

mpirvu commented Oct 24, 2024

For getVectorSizeFromVectorSpecies(), the server could send a message to the client with the known object index and the client reply with a (vec_sz_t)vectorBitSize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: To do
Development

No branches or pull requests

2 participants