Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Uncaught fatal error when snapshot v8 version doesn't match current v8 version #73

Closed
pinepain opened this issue Oct 5, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@pinepain
Copy link
Member

pinepain commented Oct 5, 2017

"# Fatal error in ../../src/snapshot/snapshot-common.cc, line 286"
"# Version mismatch between V8 binary and snapshot."
"#   V8 binary version: 6.3.257"
"#    Snapshot version: 6.3.248"
"# The snapshot consists of 1482496 bytes and contains 1 context(s)."
"#"
"Received signal 4 ILL_ILLOPN 7f6b1a7b28e9"
@pinepain pinepain added the bug label Oct 5, 2017
@pinepain pinepain added this to the 0.2.1 milestone Oct 5, 2017
@pinepain pinepain self-assigned this Oct 5, 2017
@pinepain
Copy link
Member Author

pinepain commented Oct 6, 2017

I think we can use v8::ScriptCompiler::CachedDataVersionTag() to prepend version tag to any cache data and validate it on loading.

@pinepain
Copy link
Member Author

pinepain commented Oct 6, 2017

I decided that in advance to v8 version it would be wise to store our own field value to be able to invalidate caches when something changes in extension itself which may affect snapshots behavior.

@pinepain
Copy link
Member Author

pinepain commented Oct 6, 2017

I'm thinking more about following the approach like with script cache class and do not throw exception in Isolate constructor when snapshot is invalid and set a flag on it that it was rejected so that it won't abrupt execution. It's end-user responsibility to validate that caches and snapshots are valid. We could also expose a tag we store alongside snapshot data to verify it with a runtime tag and check whether snapshot valid or not. Any thoughts?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant