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

Crashes due to ledger mutations #7708

Closed
mrmr1993 opened this issue Jan 28, 2021 · 1 comment
Closed

Crashes due to ledger mutations #7708

mrmr1993 opened this issue Jan 28, 2021 · 1 comment

Comments

@mrmr1993
Copy link
Member

At present, the ledger can be mutated without notifying or updating other parts of the program that depend on the ledger state.

For example the ledger may be mutated during Transaction_pool.apply, causing the ledger to become inconsistent. This has manifested in

It's not clear what is mutating the ledger to cause this. We should investigate, and consider using immutable ledgers by default. If we use mutable ledgers only at creation and destruction time, and only allow ledger mutation when no immutable references are held via some kind of locking, then we should be able to mitigate this.

There are related concerns around all of our uses of ephemeral data. For example, the transaction pool is valid at a particular slot, and modifying it before we update it to the current slot also breaks invariants. We need to think much more carefully about how we handle mutable and ephemeral data, especially in the context of the concurrent async primitives we use.

@mrmr1993
Copy link
Member Author

We haven't seen this crash again since #7759 was merged. Tentatively closing.

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

No branches or pull requests

2 participants