-
Notifications
You must be signed in to change notification settings - Fork 729
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
TR_ResolvedJ9JITServerMethod::staticsAreSame needs to be updated to be compatible with shareLambdaForm #20837
Comments
Attn @mpirvu. |
We can always send a message from the server to client to find the right answer. However, this may mean too many messages.
We should measure how many more messages we send with this approach in AcmeAir with Java21 |
I see that the frontend query that ilgen uses resolves to |
It is a bit more complicated. I think having |
Having Just to get a sense of the difference in messages, I ran two acmeair clients until remote method compilations had stopped, more or less. One was run without lambda form sharing, and one was run with sharing and this fix:
So the number of those messages was more or less unchanged, at least in the two runs I did. |
Nice, let's open a PR with this solution. |
This should be resolved by #20845. |
If
-Xshareclasses:shareLambdaForm
is specified when running an acmeair client with JITServer, the client will segfault (if-Xrs
is enabled) or start registering java null pointer exceptions in its logs (otherwise). I was able to limit the client to compiling a single methodjava/util/concurrent/ConcurrentLinkedQueue.updateHead(Ljava/util/concurrent/ConcurrentLinkedQueue$Node;Ljava/util/concurrent/ConcurrentLinkedQueue$Node;)V
and still get a crash. Comparing a local compilation to a remote one, the first difference is here:In the JITServer compilation, there is a single symref
#487
used twice in the IL for differentaload
nodes, whereas in the local compilation there are two symrefs, each used once. These are obtained byJ9::SymbolReferenceTable::findOrCreateStaticSymbol()
, and the methods:openj9/runtime/compiler/env/j9method.cpp
Line 7281 in f6e6334
and
openj9/runtime/compiler/env/j9methodServer.cpp
Line 478 in f6e6334
will be involved in determining if the statics are the same or not. The JITServer version skips checking if the field addresses of the references are the same, and relies solely on name comparisons. This used to be okay, but with
shareLambdaForm
there will be methods (lambda forms) that have identical names and yet constitute distinct static references.If I delete the address comparison portion of the local version, I do start getting crashes without using JITServer, so this does seem to be what's causing the problem. (A problem, at least). The straightforward way of solving this issue would be to ask the client if the statics are the same or not in this situation. It would be good to avoid a new message, of course.
The text was updated successfully, but these errors were encountered: