solana-labs / solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://solanalabs.com
Apache License 2.0
13.34k stars 4.35k forks source link

accounts.merge_parents() should verify that no account locks are held during merge #2882

Closed rob-solana closed 5 years ago

rob-solana commented 5 years ago

Problem

multiple threads may access a live bank during a merge_parents in the current, linear PoH, though they really shouldn't, we won't catch them

Proposed Solution

to maybe catch them, assert!(accounts.locks.is_empty()) at the start of merge_parents

garious commented 5 years ago

Sounds pretty error prone. Maybe we can clone the child, squash in the parent, and then mem::swap the Arc.

rob-solana commented 5 years ago

this issue is a tracker for me to go back and add the check that used to be there...

I agree that we play fast and loose with Arc

mvines commented 5 years ago

@rob-solana is this issue still relevant?

rob-solana commented 5 years ago

yes, @carllin was chasing Friday

mvines commented 5 years ago

sg, thanks. There's been no update here in months so the issue looked stale.