Isolate creation crashing with snapshot

47 views
Skip to first unread message

Subash Durairaj

unread,
Jun 3, 2025, 2:28:57 AMJun 3
to v8-users

/lib/x86_64-linux-gnu/libc.so.6(+0x3bd60)[0x7fe7781b6d60]
v8::internal::StringTableInsertionKeyC2EPNS0_7IsolateENS0_6HandleINS0_6StringEEENS0_27DeserializingUserCodeOptionE+0x1c)[0x55b7ef4e844c]
v8::internal::StringTable::InsertForIsolateDeserializationIsolateERKSt6vectorINS0_6HandleINS0_6StringEEESaIS7_EE+0x74)[0x55b7ef416e14]
v8::internal::SharedHeapDeserializer::DeserializeStringTableEv+0x93)[0x55b7ef4f80f3]
v8::internal::SharedHeapDeserializer::DeserializeIntoIsolateEv+0x68)[0x55b7ef4f8448]
v8::internal::Isolate::Init::SnapshotDataES3_S3_b+0xd0d)[0x55b7ef12e00d]
v8::internal::Snapshot::InitializeEPNS0_7IsolateE+0x189)[0x55b7ef4f94b9]
v8::Isolate::Initialize::CreateParamsE+0x193)[0x55b7ef08d243]
v8::Isolate::New::CreateParamsE+0x22)[0x55b7ef08d532]


Hi Team, i am getting this crash when creating a new isolate. 

i am embedded v8 and running as a server to provide js execution.
i ran maximum of 100 isolates in parallel  with  two different snapshot. 
each execution choose any one of snapshot 

i am getting this crash randomly. wondering how to fix this

Please give me the direction to fix this.

Jakob Gruber

unread,
Jun 3, 2025, 3:31:42 AMJun 3
to v8-u...@googlegroups.com
We've seen problems related to using different snapshots within the same Isolate before. To rule this out, please try disabling the `extensible_ro_snapshot` when building the snapshot, either by using the gn flag:

v8_enable_extensible_ro_snapshot=false

or the runtime flag:

--no-extensible_ro_snapshot

Otherwise, we'll need more information about the crash.
 

i am getting this crash randomly. wondering how to fix this

Please give me the direction to fix this.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/v8-users/06af6ec6-bb96-4c44-be9c-1a8001d45a7cn%40googlegroups.com.


Subash

unread,
Jun 3, 2025, 6:17:57 AMJun 3
to v8-u...@googlegroups.com
Hi Jakob Grube,

        I am not reusing isolate. Each js execution happens in its own isolate. But I have a threadpool that will reuse the thread. Means the same thread may create another isolate after it gets a chance again.
I load the snapshot bytes into char* array.  Each create the isolate i will copy the bytes and feed to startup data in CreateParams. 

I am creating a snapshot using SnapshotCreator::CreateBlob(FunctionCodeHandling::kKeep).

I will check with --no-extensible_ro_snapshot

    flags.append(" --no-extensible_ro_snapshot");
    v8::V8::SetFlagsFromString(flags.c_str());

I am disabled like this.




Jakob Gruber

unread,
Jun 3, 2025, 6:31:20 AMJun 3
to v8-u...@googlegroups.com
On Tue, Jun 3, 2025 at 12:17 PM Subash <subash...@gmail.com> wrote:
Hi Jakob Grube,

        I am not reusing isolate. Each js execution happens in its own isolate. But I have a threadpool that will reuse the thread. Means the same thread may create another isolate after it gets a chance again.
I load the snapshot bytes into char* array.  Each create the isolate i will copy the bytes and feed to startup data in CreateParams. 

With default settings, all Isolates within the same process will reuse certain resources. Perhaps most importantly, ReadOnlySpace is reused. This is why all snapshots used within the same process must have compatible RO space layout.
 

Subash

unread,
Jun 3, 2025, 6:35:57 AMJun 3
to v8-u...@googlegroups.com
ok Jakob, thanks for clarification. if we --no-extensible_ro_snapshot do this, will it have a any performance impact. 

Jakob Gruber

unread,
Jun 3, 2025, 6:43:04 AMJun 3
to v8-u...@googlegroups.com
On Tue, Jun 3, 2025 at 12:35 PM Subash <subash...@gmail.com> wrote:
ok Jakob, thanks for clarification. if we --no-extensible_ro_snapshot do this, will it have a any performance impact. 

I wouldn't expect a major impact, but it's impossible to say for sure without measuring your specific case. 
 

Subash

unread,
Jun 3, 2025, 7:02:02 AMJun 3
to v8-u...@googlegroups.com
Hi Jakob, seems --no-extensible_ro_snapshot option in not recognized. getting following error

Error: unrecognized flag --no-extensible_ro_snapshot
Try --help for options

Jakob Gruber

unread,
Jun 3, 2025, 7:29:35 AMJun 3
to v8-u...@googlegroups.com
Well, this flag is fairly new and may not exist in your version yet. 

..and if you are on an old V8 version, it's possible that your issue has been fixed in the meantime.

Please:
1. Try an up-to-date V8 version.
2. If that doesn't help, let's continue this discussion on the bugtracker. File a bug at https://crbug.com/v8/new, include your V8 version, the backtrace, and any other relevant infos (e.g. the crashing line would help). Ideally a repro case. 

Subash

unread,
Jun 3, 2025, 7:34:24 AMJun 3
to v8-u...@googlegroups.com
ok Jakob, will update the V8 version

Thank you for your help Jakob

Reply all
Reply to author
Forward
0 new messages