git-annex/Remote
Joey Hess 2d7e46ea98
fix drop hang reported by musicmatze
Fix hang when dropping content needs to lock the content on a ssh remote,
which occurred when the remote has git-annex version 5.20151019 or newer.

Analysis: `race` runs 2 threads at once, and the hGetLine finishes first.
So, it tries to cancel the waitForProcess, but unfortunately that is making
a foreign call and so cannot be canceled. The remote git-annex-shell
is waiting for a line on stdin before it will exit. Deadlock.

This only occurred sometimes; I reproduced it going from darkstar to
elephant, but not from darkstar to darkstar. Not sure how that fits into
the above analysis -- perhaps a race condition is also involved?

Fixed by not using `race`; now the hGetLine will fail with an exception
if the remote git-annex-shell exits without any output.
2016-04-18 14:04:50 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Helper remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Rsync remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
WebDAV WebDAV: Remove a bogus trailing slash from the end of the url to the temporary store location for a key. Thanks, wzhd. 2016-02-09 11:50:40 -04:00
BitTorrent.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Bup.hs simplify code to make it compilable with ghc v7.11.20150407 2016-04-12 15:26:40 -04:00
Ddar.hs ddar remote: fix ssh calls 2016-03-23 11:42:26 -04:00
Directory.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
GCrypt.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Git.hs fix drop hang reported by musicmatze 2016-04-18 14:04:50 -04:00
Glacier.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Hook.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
List.hs remove 3 build flags 2016-01-26 08:14:57 -04:00
Rsync.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
S3.hs S3: Allow configuring with requeststyle=path to use path-style bucket access instead of the default DNS-style access. 2016-02-09 15:36:36 -04:00
Tahoe.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Web.hs remove 3 build flags 2016-01-26 08:14:57 -04:00
WebDAV.hs WebDAV: Remove a bogus trailing slash from the end of the url to the temporary store location for a key. Thanks, wzhd. 2016-02-09 11:50:40 -04:00