-
Notifications
You must be signed in to change notification settings - Fork 6k
8358680: AOT cache creation fails: no strings should have been added #25816
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
base: master
Are you sure you want to change the base?
8358680: AOT cache creation fails: no strings should have been added #25816
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@shipilev I copied the part of your JDK-8352042: [leyden] Parallel precompilation changes from the Leyden repo that implements |
/contributor add @shipilev |
@iklam |
Can something else add string to table between you get number and safe point? How you avoid that? |
Not that I am aware of. In testing, I added |
Here are all the subclasses of JavaThread:
StringDedupThread is disabled when dumping heap objects. And the other threads probably will either be inactive, or won't be doing anything that would result in string interning. I guess someone could use jcmd to connect to the JVM at the wrong time and that might upset the archive assembly process. But that would create far worse problems than the bug that we are trying to fix here. |
Well, I am rewriting that part in openjdk/leyden#79. I can give you a hunk on top of this PR that would do the same thing: use the |
Actually, I need #25409 in mainline first :) |
I can wait for that for JDK 26. If I want to fix for JDK 25, will the current fix be good enough? |
Would be nice to avoid divergence between JDK 25, JDK 26 and Leyden/premain. Anyhow, I now think this fix in incomplete. In premain, we use this I think we need to figure our when we dump the shared table. Maybe even shutdown the compiler right before going into CDS dump? See how |
No Java code is executing at this point (we are in the only thread that can run Java code). Is there still a possibility for new compile tasks to be added?
In Leyden, we run the AOT compiler after the CDS dumping has finished, so if we shut down the compiler we would have to restart it. |
Background: when writing the string table in the AOT cache, we do this:
StringTable::lookup_shared()
in the production run.This bug happened because:
_items_count
This PR attempts to fix both issues.
Progress
Issue
Contributors
<[email protected]>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25816/head:pull/25816
$ git checkout pull/25816
Update a local copy of the PR:
$ git checkout pull/25816
$ git pull https://git.openjdk.org/jdk.git pull/25816/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25816
View PR using the GUI difftool:
$ git pr show -t 25816
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25816.diff
Using Webrev
Link to Webrev Comment