git-annex/Annex
Joey Hess 37d505dd6b
avoid STM deadlock
When all worker threads are running and enteringStage is called,
it waits for an idle slot. If all off the other threads then call it in
turn, a deadlock occurrs.

This is the same problem I didn't actually fix in
5a9842d7ed.

Fixed by doing two separate STM transactions, the first replaces its
active thread with an idle thread, and the second waits for another idle
thread. That guarantees there will eventually be an idle thread to find.

The changes to WorkerPool were necessary because it can't add an idle
thread containing the Annex state and go on to run an action using that
same state, so I had to remove the Annex state from IdleWorker.
2019-06-19 18:15:25 -04:00
..
AdjustedBranch refactor getCurrentBranch 2018-10-19 17:29:18 -04:00
Branch update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Content update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
LockPool update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
MetaData update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
View update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Action.hs make WorkerStage an open type 2019-06-19 13:05:03 -04:00
AdjustedBranch.hs add back non-preferred files to imported tree 2019-05-20 16:43:52 -04:00
AutoMerge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
BloomFilter.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Branch.hs avoid stageJournal escaping withOtherTmp 2019-05-07 11:57:12 -04:00
BranchState.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CatFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ChangedRefs.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CheckAttr.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CheckIgnore.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Common.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Concurrent.hs avoid STM deadlock 2019-06-19 18:15:25 -04:00
Content.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
CurrentBranch.hs refactor getCurrentBranch 2018-10-19 17:29:18 -04:00
Difference.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Direct.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DirHashes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Drop.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
Environment.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Export.hs improve messages around export/import conflicts 2019-04-09 13:03:59 -04:00
FileMatcher.hs filter exported tree through remote's preferred content setting 2019-05-20 11:54:55 -04:00
Fixup.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
GitOverlay.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
HashObject.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Hook.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Import.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Ingest.hs avoid ingest lockdown file escaping the withOtherTmp call 2019-05-07 13:04:57 -04:00
Init.hs fix repo description setting bugs 2019-05-23 12:51:01 -04:00
InodeSentinal.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Journal.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Link.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Locations.hs add back non-preferred files to imported tree 2019-05-20 16:43:52 -04:00
LockFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
LockPool.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Magic.hs fix windows build 2019-05-03 10:58:34 -04:00
MakeRepo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
MetaData.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Multicast.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Notification.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
NumCopies.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Path.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Perms.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Queue.hs Improved locking when multiple git-annex processes are writing to the .git/index file 2019-05-06 15:15:12 -04:00
RemoteTrackingBranch.hs fix setting imported tree 2019-05-06 14:38:02 -04:00
ReplaceFile.hs avoid build warning on Windows about unused import 2019-05-23 12:15:33 -04:00
SpecialRemote.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Ssh.hs annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
TaggedPush.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Tmp.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Transfer.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
UpdateInstead.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Url.hs add back support for ftp urls 2019-05-30 14:51:34 -04:00
UUID.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
VariantFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
VectorClock.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Version.hs fix init in cripped filesystem version issues 2018-12-03 12:57:23 -04:00
View.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Wanted.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
WorkTree.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
YoutubeDl.hs rename annex.security.allowed-http-addresses 2019-05-30 12:43:40 -04:00