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

Make snapshots deterministic #10783

Closed
lucacasonato opened this issue May 29, 2021 · 6 comments · Fixed by #14037
Closed

Make snapshots deterministic #10783

lucacasonato opened this issue May 29, 2021 · 6 comments · Fixed by #14037
Labels
bug Something isn't working correctly chore something that we should get around to eventually deno_core Changes in "deno_core" crate are needed

Comments

@lucacasonato
Copy link
Member

Seems we just need to fix the V8 random seed to a fixed value during snapshotting: nodejs/node@5116a6a

Thanks @joyeecheung for the pointer :-)

@lucacasonato lucacasonato added the deno_core Changes in "deno_core" crate are needed label May 29, 2021
@lucacasonato
Copy link
Member Author

@ry
Copy link
Member

ry commented May 29, 2021

I don't understand - are snapshots not deterministic currently?

@lucacasonato
Copy link
Member Author

They are not. Here two builds with no code changes in between:

/m/s/P/g/d/deno ❯❯❯ md5sum /mnt/starship/Projects/github.com/denoland/deno/target/debug/build/deno_runtime-87cbb1a0250dce57/out/CLI_SNAPSHOT.bin
7e6848bec338150c4a7e62085579bfcb  /mnt/starship/Projects/github.com/denoland/deno/target/debug/build/deno_runtime-87cbb1a0250dce57/out/CLI_SNAPSHOT.bin
/m/s/P/g/d/deno ❯❯❯ md5sum /mnt/starship/Projects/github.com/denoland/deno/target/debug/build/deno_runtime-87cbb1a0250dce57/out/CLI_SNAPSHOT.bin
b142b3da94caffc66e3189d2bc8190d7  /mnt/starship/Projects/github.com/denoland/deno/target/debug/build/deno_runtime-87cbb1a0250dce57/out/CLI_SNAPSHOT.bin

@lucacasonato
Copy link
Member Author

lucacasonato commented May 29, 2021

This is likely the cause for #9244. edit: nevermind, unrelated

@ry
Copy link
Member

ry commented May 29, 2021

Wow - I had no idea. I wonder if this is impinging on our incremental build time...

@stale
Copy link

stale bot commented Jul 28, 2021

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

@stale stale bot added the stale label Jul 28, 2021
@ry ry removed the stale label Jul 28, 2021
@lucacasonato lucacasonato added bug Something isn't working correctly chore something that we should get around to eventually labels Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly chore something that we should get around to eventually deno_core Changes in "deno_core" crate are needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants