Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix concurrent access to signer queue #8799

Closed
tomusdrw opened this issue Jun 5, 2018 · 0 comments
Closed

Fix concurrent access to signer queue #8799

tomusdrw opened this issue Jun 5, 2018 · 0 comments
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API.
Milestone

Comments

@tomusdrw
Copy link
Collaborator

tomusdrw commented Jun 5, 2018

Currently it's possible that two parallel RPC requests to with password to sign a signer queue entry will cause two transactions to be sent to the network.

The issue exists since we are running a multi-threaded RPC, and the signer queue doesn't have explicit lock while accessing an item.

Code: https://github.com/paritytech/parity/blob/7d7d4822a5087b24b49f2a1ddb111f2daa51a017/rpc/src/v1/impls/signer.rs#L95

So we peek some ID, do signing and later removed it from the queue. If nonce is not provided explicitly both threads will get a unique one and cause two same transactions to be sent.

Related #8646

@tomusdrw tomusdrw added F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. labels Jun 5, 2018
@tomusdrw tomusdrw mentioned this issue Jun 5, 2018
@5chdn 5chdn added this to the 1.12 milestone Jun 5, 2018
@sorpaas sorpaas self-assigned this Jun 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API.
Projects
None yet
Development

No branches or pull requests

3 participants