On Wed, Jan 1, 2025 at 8:08 AM 'Ronald Fenner' via v8-dev
<[email protected]> 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).
>
> 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.

I've been hitting that first check for some months now (plus several
others, the IsolateGroup work seems really half-baked) but fortunately
it only happens in debug builds, and you can circumvent it by passing
in --stress_snapshot.

-- 
-- 
v8-dev mailing list
[email protected]
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/CAHQurc_%3DscWFKygAL6tZcVU%2Bj83wYDoc6aQ_X2FBHsenaNa1%2Bg%40mail.gmail.com.

Reply via email to