-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
Fix multithread CScheduler and reenable test #8016
Fix multithread CScheduler and reenable test #8016
Conversation
Will also close #8005 |
Tested ACK 28655b8:
70af981:
Travis issue unrelated. |
Thanks for fixing this! |
For some reason Travis is failing on this due to python zmq problems. I don't understand why, as there is no Python (or zmq) related change here. Will try to clear Travis' caches. |
This is because my branch is based on the pre-python3 merge. Master is python3, thus there is no zmq module for python2... |
70af981
to
166e4b0
Compare
Rebased should solve this, I think. Maybe travis kick can help now. |
This helped. Hmm, shouldn't we temporary add python-zmq back to travis to workaround this? Or should we modify the test script that requires python's zmq module to dot no anything when there is no such module installed (this could also simplify the tests setup for everyone!)? @MarcoFalke what do you think? |
@paveljanik python-zmq is already present in I changed it (#7851) to fail instead, so errors are detected (and not silently ignored). The travis failure was an error due to broken cache. I think @laanwj cleared the cache and the travis issue is now fixed. |
ut re-ACK 166e4b0 |
@MarcoFalke there is python3-zmq, not python-zmq... |
Does it need to signal in the catch/rethrow case as well? |
@theuni I think rethrow case is there only for |
@paveljanik Are you going to fix that here? |
No. I'm think about writing another test that will use the exception calls, but not here and not now, sorry. |
No need to be sorry, thanks for your fix! just needed clarity about which state this pull is in. utACK 166e4b0 |
Github-Pull: bitcoin#8016 Rebased-From: db18ab2 166e4b0
zcash: cherry picked from commit 166e4b0 zcash: bitcoin/bitcoin#8016
Bitcoin 0.13 locking PRs These are locking changes from upstream (bitcoin core) release 0.13, oldest to newest (when they were merged to the master branch). - bitcoin/bitcoin#7846 - bitcoin/bitcoin#7913 - bitcoin/bitcoin#8016 - second commit only; first commit, test changes, are already done - bitcoin/bitcoin#7942 This PR does not include: - bitcoin/bitcoin#8244 bitcoin/bitcoin@27f8126 - zcash requires locking `cs_main` in this instance (`getrawmempool()` calls `mempoolToJSON()`, which calls `chainActive.Height()`).
This fixes the deadlock in the
CScheduler
when there are otherserviceQueue
s waiting for the new task to be added to thetaskQueue
, butschedule
notifies only one of them who processes it and ends. And the other ones get stucked waiting for the new task which doesn't come in at all.Hard to reproduce, see #6540 for the discussion.
Fixes #6540.