Snapshot limitations

123 views
Skip to first unread message

Roey Berman

unread,
Mar 8, 2021, 2:35:48 PM3/8/21
to v8-users
Hi,

I'm trying to create a persistent v8 runtime where I can at any point take a snapshot of a running isolate.
I'm wondering what the limitations of SnapshotCreator are.
I have only seen it being used for creating startup snapshots.
Is it possible to call SnapshotCreator.CreateBlob() multiple times on the same instance?
I got a segfault when I tried that but I couldn't see anything the implies that it shouldn't be safe in the docs.
Also, is it possible to load modules during snapshot creation?

Thanks,
- Roey


Jakob Gruber

unread,
Mar 9, 2021, 4:26:09 AM3/9/21
to v8-u...@googlegroups.com
I think crbug.com/v8/10500 will answer some of your questions. Short version: no, currently you can't snapshot a running isolate with arbitrary state. Also take a look at the d8 --stress-snapshot flag, which takes a snapshot after executing arbitrary JS but without guaranteeing that the resulting deserialized heap state is still executable (in many cases it won't be). Re. modules support, see crbug.com/v8/10855.

--
--
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 on the web visit https://groups.google.com/d/msgid/v8-users/afb077fd-4f2a-4cd0-8288-627343307eden%40googlegroups.com.

Roey Berman

unread,
Mar 10, 2021, 12:54:14 PM3/10/21
to v8-u...@googlegroups.com
Thanks for the quick response.
I'll go over everything and see if there's a way to work around these limitations.

You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/bKoWfnqUnTA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAH3p7oPOTf40rEO4XZ5-ybCQwZTtEShBBwEP-x_OyBuLuzTw7Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages