Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MetadataHeader::CURRENT_VERSION was not bumped between 2.2 and 2.3 #3193

Closed
webmaster128 opened this issue Sep 19, 2022 · 4 comments
Closed
Labels
bug Something isn't working priority-medium Medium priority issue 🏚 stale Inactive issues or PR

Comments

@webmaster128
Copy link
Contributor

Hey all!

We are currently experiencing segfault crashes when using modules that have been serialized to disk with Wasmer 2.2.0 and deserialized with 2.3.0. We are aware the format can change between minor and even patch versions and have a way to handle MetadataHeader::CURRENT_VERSION bumps. But it seems that MetadataHeader::CURRENT_VERSION was not changed and is still at 1.

This was discussed in #2781 but I don't fully understand if and how it has been resolved. Basically from our use case the request is this: the format can change any time, no problem. But we should have a way to detect that (such as reading MetadataHeader::CURRENT_VERSION or using a different API). Then we know we have to invalidate the file system cache and everyone is happy. Invalidating the cache for every minor wasmer bump would be a huge computational burden since all the modules have to be recompiled. Would be great if we can avoid that if necessary.

@syrusakbary
Copy link
Member

This could be solved by three different ways:

  1. Support this on rkyv: Precompute hash for Archiveable rkyv/rkyv#115
  2. Add example serialized artifacts to the repo that should be working, and test on the CI (so we know when things break)
  3. Stick to semver versioning for the artifact crate (and add that version into the serialized information)

IMO if we do 3, then we need to also do 2 as safeguard.
If we do 1, 2 might also be needed, but 1 by itself is already a bit more safe (since it's depending on a precomputed hash that does things for us)

@syrusakbary syrusakbary added the priority-medium Medium priority issue label Sep 29, 2022
@webmaster128
Copy link
Contributor Author

I'm fine with something like 1. This keeps it simple and relyable and just tells us nothing changed vs. something changed that might potentially affect you, better recompile.

I think I don't understand "semver versioning for the artifact crate". Which crate are you referring to?

@webmaster128 webmaster128 changed the title MetadataHeader::CURRENT_VERSION was not bumpted between 2.2 and 2.3 MetadataHeader::CURRENT_VERSION was not bumped between 2.2 and 2.3 Oct 20, 2022
@stale
Copy link

stale bot commented Oct 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale Inactive issues or PR label Oct 21, 2023
Copy link

stale bot commented Nov 21, 2023

Feel free to reopen the issue if it has been closed by mistake.

@stale stale bot closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium Medium priority issue 🏚 stale Inactive issues or PR
Projects
None yet
Development

No branches or pull requests

2 participants