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

Save all dirty memory pages (including executable pages) and it's flag to snapshot #218

Merged
merged 4 commits into from
Nov 15, 2021

Conversation

mohanson
Copy link
Collaborator

@mohanson mohanson commented Nov 15, 2021

When making a snapshot, the code loaded by load_cell_data_as_code and exec syscall in ckb could not be persisted. This bug caused an error in the ckb chunk_run function.

ref: nervosnetwork/ckb#3176

quake
quake previously approved these changes Nov 15, 2021
xxuejie
xxuejie previously approved these changes Nov 15, 2021
bors bot added a commit to nervosnetwork/ckb that referenced this pull request Nov 15, 2021
3176: Fix: add dirty flag when load cell data as code r=yangby-cryptape,quake a=mohanson

Solve the problem that 'load_data_cell_as_code' cannot work with 'ckb-vm chunk run'

ref: nervosnetwork/ckb-vm#218

Co-authored-by: mohanson <[email protected]>
@mohanson mohanson dismissed stale reviews from xxuejie and quake via e6b6643 November 15, 2021 06:00
@mohanson mohanson changed the title Store and resume page flag in snapshot Save all dirty memory pages (including executable pages) and it's flag to snapshot Nov 15, 2021
@mohanson mohanson merged commit 5f1e124 into nervosnetwork:develop Nov 15, 2021
@mohanson mohanson deleted the fix_snapshot branch November 15, 2021 07:25
bors bot added a commit to nervosnetwork/ckb that referenced this pull request Nov 16, 2021
3177: fix: upgrade ckb-vm to fix snapshot behavior r=yangby-cryptape,mohanson,zhangsoledad a=driftluo

### What problem does this PR solve?

chunk run with the snapshot unable to support the binary replacement behavior of exec, which will cause abnormal behavior after resume.

The upgraded VM supports backing up the current code(executable pages)  to the snapshot to fix the above problems. nervosnetwork/ckb-vm#218

and #3176 should keep its behavior until hardfork activated

### Check List

Tests

- Unit test
- Integration test

### Release note

```release-note
Title Only: Include only the PR title in the release note.
```



Co-authored-by: driftluo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants