instrument P2P --debug with connection and thread info
For debugging http://git-annex.branchable.com/bugs/annex_get_-J_16_via_ssh_stalls_/ This work is supported by the NIH-funded NICEMAN (ReproNim TR&D3) project.
This commit is contained in:
parent
1cfd2c2b96
commit
fcca7adaff
4 changed files with 26 additions and 5 deletions
|
@ -29,6 +29,7 @@ import qualified P2P.Annex as P2P
|
|||
import Control.Concurrent.STM
|
||||
import Control.Concurrent.Async
|
||||
import qualified Data.ByteString as B
|
||||
import Data.Unique
|
||||
|
||||
toRepo :: ConsumeStdin -> Git.Repo -> RemoteGitConfig -> SshCommand -> Annex (FilePath, [CommandParam])
|
||||
toRepo cs r gc remotecmd = do
|
||||
|
@ -257,11 +258,16 @@ openP2PSshConnection r connpool = do
|
|||
, std_out = CreatePipe
|
||||
, std_err = CreatePipe
|
||||
}
|
||||
-- Could use getPid, but need to build with older versions
|
||||
-- of process, so instead a unique connection number.
|
||||
connnum <- hashUnique <$> newUnique
|
||||
let conn = P2P.P2PConnection
|
||||
{ P2P.connRepo = repo
|
||||
, P2P.connCheckAuth = const False
|
||||
, P2P.connIhdl = to
|
||||
, P2P.connOhdl = from
|
||||
, P2P.connIdent = P2P.ConnIdent $
|
||||
Just $ "ssh connection " ++ show connnum
|
||||
}
|
||||
stderrhandlerst <- newStderrHandler err
|
||||
runst <- P2P.mkRunState P2P.Client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue