After doing some more digging around in the code I found that if V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES is defined then it will create a new IsolateGroup and not use a global one. However in order for it to be defined v8_enable_pointer_compression_shared_cage has to be set to false and this leads back to mksnapshot crashing when it is. I tried also disabling the shared ro heap with the option but it still crashes.
if (v8_enable_pointer_compression && !v8_enable_pointer_compression_shared_cage) { defines += [ "V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES" ] } On Wednesday, January 1, 2025 at 3:08:12 PM UTC+8 Ronald Fenner wrote: > I'm running into a checksum error when trying to load a custom snapshot > during a unit test where it was created. > Specifically this error > # Fatal error in ../../src/heap/read-only-spaces.cc, line 96 > # Check failed: read_only_blob_checksum_ == snapshot_checksum > (<unprintable> vs. 2723829699 <(272)%20382-9699>). > > I've dug into and found that it appears that an IsolateGroup is > automatically created and any future isolates are loaded into this group > fixing the readonly shared space checksum with the first startup data used. > > Subsequently when I tried to load the custom snapshot it's isolate gets > put in this group and it's checksum no longer matches. > > I was able to substitute the custom startup, which for this test is just a > recreation of the v8 snapshot no extras loaded into it, in as the v8 > startup blob and my core tests using it passed with no issue. > > I've tried to disable the Sandbox same error. > Tried to disable the shared ro heap but this caused a torque static > assertion about builtins > > Disabling both sandbox and shared ro heap cause mksnapshot to crash with > # Fatal error in ../../src/diagnostics/objects-debug.cc, line 673 > # Check failed: HeapLayout::InAnySharedSpace(*this). > > I also tried to disable the shared pointer compression cage but this > brought back mksnapshot crashing as in my other thread. > > Unfortunately other than creating a whole other app to run the unit test's > checking the snapshot worked there doesn't seem to be a way around this as > the IsolateGroup is not exposed to the public API for embedders and there > seems to be no way to create a new one and associate it with an isolate > during creation. > > I'm currently using 13.1.201.19 which is the currently stable release > shipped in the current version of Chromium. > This did work in 12.4.254.15 which is what i upgraded from and I'm pretty > sure that the shared read only heap is a new feature added since then. > > It seems a little odd to assume that the startup data passed during > isolate creation since it's a parameter of the create params wouldn't > change though I know you all mainly base your use cases on Chromiums use of > V8 and not what an embedder might do. > > Perhaps a fix is just to calculate a checksum when first creating the > isolate for the startup data and if it matches use a group created for it. > otherwise create a new one for that snapshot data, that or expose the > IsolateGroup for the embedder to be able to create and associate with an > isolate at creation like the cppheap. > -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/76801073-bdf0-4e7f-acaf-043e7ee5a309n%40googlegroups.com.