diff --git a/CHANGELOG b/CHANGELOG index 3acc10663e..e9dc83a5b2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ git-annex (6.20180914) UNRELEASED; urgency=medium [ Joey Hess ] + * Fixes a reversion in the last release that broke interoperation with + older versions of git-annex-shell. * S3: Fix url construction bug when the publicurl has been set to an url that does not end with a slash. * --debug shows urls accessed by git-annex, like it used to do when diff --git a/P2P/IO.hs b/P2P/IO.hs index 59e75456ec..18971d9f3e 100644 --- a/P2P/IO.hs +++ b/P2P/IO.hs @@ -38,7 +38,6 @@ import Annex.ChangedRefs import Control.Monad.Free import Control.Monad.IO.Class import System.Exit (ExitCode(..)) -import System.IO.Error import Network.Socket import Control.Concurrent import Control.Concurrent.Async @@ -160,11 +159,9 @@ runNet runst conn runner f = case f of Left e -> return (Left (show e)) Right () -> runner next ReceiveMessage next -> do - v <- liftIO $ tryIOError $ getProtocolLine (connIhdl conn) + v <- liftIO $ tryNonAsync $ getProtocolLine (connIhdl conn) case v of - Left e - | isEOFError e -> runner (next (Just ProtocolEOF)) - | otherwise -> return (Left (show e)) + Left e -> return (Left (show e)) Right Nothing -> return (Left "protocol error") Right (Just l) -> case parseMessage l of Just m -> do diff --git a/P2P/Protocol.hs b/P2P/Protocol.hs index 29fe072ffd..49a3d5bf6f 100644 --- a/P2P/Protocol.hs +++ b/P2P/Protocol.hs @@ -83,7 +83,6 @@ data Message | DATA Len -- followed by bytes of data | VALIDITY Validity | ERROR String - | ProtocolEOF deriving (Show) instance Proto.Sendable Message where @@ -109,7 +108,6 @@ instance Proto.Sendable Message where formatMessage (VALIDITY Invalid) = ["INVALID"] formatMessage (DATA len) = ["DATA", Proto.serialize len] formatMessage (ERROR err) = ["ERROR", Proto.serialize err] - formatMessage (ProtocolEOF) = [] instance Proto.Receivable Message where parseCommand "AUTH" = Proto.parse2 AUTH @@ -369,8 +367,6 @@ serverLoop :: (Message -> Proto (ServerHandler a)) -> Proto (Maybe a) serverLoop a = do mcmd <- net receiveMessage case mcmd of - -- Stop loop at EOF - Just ProtocolEOF -> return Nothing -- When the client sends ERROR to the server, the server -- gives up, since it's not clear what state the client -- is in, and so not possible to recover. diff --git a/doc/bugs/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished/comment_1_dd7883772bb37fa85aa1332633184071._comment b/doc/bugs/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished/comment_1_dd7883772bb37fa85aa1332633184071._comment deleted file mode 100644 index da14d7c498..0000000000 --- a/doc/bugs/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished/comment_1_dd7883772bb37fa85aa1332633184071._comment +++ /dev/null @@ -1,8 +0,0 @@ -[[!comment format=mdwn - username="joey" - subject="""comment 1""" - date="2018-09-25T17:18:14Z" - content=""" -Ok, reproduced by downgrading git-annex, so it is a reversion in the -fallback from p2pstdio. -"""]] diff --git a/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished.mdwn b/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished.mdwn index 4602e24b81..570b12b970 100644 --- a/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished.mdwn +++ b/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished.mdwn @@ -64,3 +64,5 @@ so ssh connection seems to be ok what could it be? [[!meta author=yoh]] + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished/comment_10_dd7883772bb37fa85aa1332633184071._comment b/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished/comment_10_dd7883772bb37fa85aa1332633184071._comment new file mode 100644 index 0000000000..b4f18dade4 --- /dev/null +++ b/doc/bugs/get_over_ssh_fails_with___fd__58__19__58___hClose__58___resource_vanished/comment_10_dd7883772bb37fa85aa1332633184071._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2018-09-25T17:18:14Z" + content=""" +Ok, reproduced by downgrading git-annex, so it is a reversion in the +fallback from p2pstdio. + +It is indeed caused by [[!commit b18fb1e343e9654207fbebacf686659c75d0fb4c]], +because that adds a new ProtocolEOF value, and postAuth has a fallthrough +case that tries to then send a ERROR message back over the connection, but +by that time the pipe has closed. + +So that was an easy fix. I do still wonder how a system that displays +/etc/issue or whatever to noninteractive logins could have ever worked with +rsync or git-annex. But if that system doesn't work after this fix, it's an +unrelated problem. +"""]]