This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit d193436.
tomusdrw
added
A0-pleasereview 🤓
Pull request needs code review.
M4-core ⛓
Core client code / Rust.
labels
May 31, 2018
niklasad1
reviewed
Jun 1, 2018
ethcore/src/client/client.rs
Outdated
&*client.chain.read() | ||
).map(|_| ()).unwrap_or_else(|e| { | ||
error!(target: "client", "Error importing ancient block: {}", e); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider to use .ok().map_or_else
here instead of map().unwrap_or_else
5chdn
added
B0-patchthis
P2-asap 🌊
No need to stop dead in your tracks, however issue should be addressed as soon as possible.
B9-blocker 🚧
This pull request blocks the next release from happening. Use only in extreme cases.
labels
Jun 5, 2018
andresilva
approved these changes
Jun 5, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Although I don't totally understand what was causing the deadlock (why would fun
be recursing?).
sorpaas
approved these changes
Jun 5, 2018
5chdn
added a commit
that referenced
this pull request
Jun 5, 2018
* parity-version: bump beta to 1.11.3 * Disallow unsigned transactions in case EIP-86 is disabled (#8802) * Disallow unsigned transactions in case EIP-86 is disabled * Add tests for verification * Add disallow unsigned transactions test in machine * Fix ancient blocks queue deadlock (#8751) * Revert "Fix not downloading old blocks (#8642)" This reverts commit d193436. * Make sure only one thread actually imports old blocks. * Add some trace timers. * Bring back pending hashes set. * Separate locks so that queue can happen while we are importing. * Address grumbles.
ordian
added a commit
to ordian/parity
that referenced
this pull request
Jun 6, 2018
…rp_sync_on_light_client * 'master' of https://github.com/paritytech/parity: Remove UI related settings from CLI (openethereum#8783) Remove windows tray and installer (openethereum#8778) docs: add changelogs for 1.10.6 and 1.11.3 (openethereum#8810) Fix ancient blocks queue deadlock (openethereum#8751) Disallow unsigned transactions in case EIP-86 is disabled (openethereum#8802) Fix evmbin compilation (openethereum#8795) Have space between feature cfg flag (openethereum#8791) rpc: fix address formatting in TransactionRequest Display (openethereum#8786)
dvdplm
added a commit
that referenced
this pull request
Jun 7, 2018
…eric * origin/master: ethcore: fix ancient block error msg handling (#8832) CI: Fix docker tags (#8822) parity: fix indentation in sync logging (#8794) Removed obsolete IpcMode enum (#8819) Remove UI related settings from CLI (#8783) Remove windows tray and installer (#8778) docs: add changelogs for 1.10.6 and 1.11.3 (#8810) Fix ancient blocks queue deadlock (#8751) Disallow unsigned transactions in case EIP-86 is disabled (#8802) Fix evmbin compilation (#8795) Have space between feature cfg flag (#8791) rpc: fix address formatting in TransactionRequest Display (#8786) Conditionally compile ethcore public test helpers (#8743) Remove Result wrapper from AccountProvider in RPC impls (#8763) Update `license header` and `scripts` (#8666)
5chdn
added
A8-looksgood 🦄
Pull request is reviewed well.
and removed
A0-pleasereview 🤓
Pull request needs code review.
labels
Jun 18, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A8-looksgood 🦄
Pull request is reviewed well.
B9-blocker 🚧
This pull request blocks the next release from happening. Use only in extreme cases.
M4-core ⛓
Core client code / Rust.
P2-asap 🌊
No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A more generic solution proposed by @ngotchac is replaced with a solution that handles only ancient blocks.
The problem with previous solution was that
queue.lock().pop_front()
was actually holding the lock for longer then needed and iffun
was trying to use the queue recursively it would deadlock (since parking_lot mutexes are not re-entrant).Avoiding holding the lock would cause race issues and we need to be super sure that old blocks are imported in order by the same thread.
Hence I reverted to the old
IoChannelQueue
implementation and introduced a separateimport_lock
for ancient blocks. We don't lock on the queue to prevent blocking the event loop when adding new items.