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

oasis-node crash during Ethereum runtime's genesis-playback #2611

Closed
matevz opened this issue Jan 29, 2020 · 3 comments
Closed

oasis-node crash during Ethereum runtime's genesis-playback #2611

matevz opened this issue Jan 29, 2020 · 3 comments
Assignees
Labels
c:bug Category: bug c:storage Category: storage

Comments

@matevz
Copy link
Member

matevz commented Jan 29, 2020

Steps to reproduce:

  1. From oasis-core run oasis-net-runner as stated in the README,
  2. Wait a few moments so the nodes get synced,
  3. In another terminal from oasis-runtime run genesis-playback state-2999999.json runtimestates.json --commit-every 10000 -a $ADDR --runtime-id 8000000000000000000000000000000000000000000000000000000000000000 where $ADDR is the path to you storage socket.
  4. Wait until around transaction 110k, oasis-node crashes.

Attached storage-0/console.log from oasis-core a48cd81.

It's 499032-th call to CompactMarshalBinary() that crashes, n.Value is not accessible.

Note: genesis-playback works, if --commit-every 1000 is passed.

@matevz matevz changed the title MKVS crashes oasis-node during genesis_playback MKVS crashes oasis-node during genesis-playback Jan 29, 2020
@kostko kostko added c:bug Category: bug c:storage Category: storage labels Jan 29, 2020
@kostko kostko changed the title MKVS crashes oasis-node during genesis-playback oasis-node crash during Ethereum runtime's genesis-playback Jan 29, 2020
@kostko
Copy link
Member

kostko commented Jan 29, 2020

This is very likely due to a bug in the leaf node unmarshaller:
https://github.com/oasislabs/oasis-core/blob/9e89921ae267e50d64c36131a213eb214aa34b40/go/storage/mkvs/urkel/node/node.go#L625

Currently it just references a slice of the data which is being unmarshalled. Since this is used when retrieving nodes from a memory mapped database (e.g., Badger), the slice may become invalid or be overwritten with other data.

Can you check if just fixing it to copy the value helps?

@matevz
Copy link
Member Author

matevz commented Jan 29, 2020

Works, thanks.

@matevz
Copy link
Member Author

matevz commented Jan 29, 2020

fixed

@matevz matevz closed this as completed Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:bug Category: bug c:storage Category: storage
Projects
None yet
Development

No branches or pull requests

2 participants