On Thu, 10 Mar 2022 19:41:03 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> I think he already did. I'm quoting: >> >>> However, the CDS archive also contains a heap dump, which includes Java >>> HashMaps. If I allow those 3 Java threads to start, some HashMaps in the >>> module graph will have unstable ordering. I think the reason is concurrent >>> thread execution causes unstable assignment of the identity_hash for >>> objects in the heap dump. > >> @magicus the issue is not the list of classes dumped, or their format in the >> dump. As Ioi indicated that list is fixed. The issue is with the heap dump >> part of the archive. Running these other threads affects the heap so by not >> running them with end up with a different heap. So the question is whether >> there is anything about having a different heap dumped that we need to be >> concerned about. We dump the heap into the archive for a reason and this >> changes what we dump, > > To be clear, if multiple threads are running, classes could be loaded in a > different order and the symbols will have different orders. This would cause > the vtables in Klass objects to be laid out differently. Trying to fix this > is very difficult. I have a different patch that makes it work but it's just > too complicated. > > So, disabling the threads is also necessary for (easily) sorting the > metaspace objects.
@iklam thanks for clarifying. ------------- PR: https://git.openjdk.java.net/jdk/pull/7748