summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-05-30 16:49:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-05-30 16:49:22 -0400
commitfc1748e81949080d8dd7142b04d0a2dd83135ca3 (patch)
tree53002b3f3909844269284467be557d21768f968a
parent09c237f23619fade71c97891649c09f0b2dfbcd5 (diff)
parent37e6a6ce910c8782fe9f5fcb01e5a7ac600fd12b (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-rw-r--r--doc/bugs/git_annex_daemon_crashes_when_authenticating_with_jabber.de/comment_7_8a8dfb15684525e156d6334e9f67a55c._comment66
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/bugs/git_annex_daemon_crashes_when_authenticating_with_jabber.de/comment_7_8a8dfb15684525e156d6334e9f67a55c._comment b/doc/bugs/git_annex_daemon_crashes_when_authenticating_with_jabber.de/comment_7_8a8dfb15684525e156d6334e9f67a55c._comment
new file mode 100644
index 000000000..8e862d468
--- /dev/null
+++ b/doc/bugs/git_annex_daemon_crashes_when_authenticating_with_jabber.de/comment_7_8a8dfb15684525e156d6334e9f67a55c._comment
@@ -0,0 +1,66 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="209.250.56.176"
+ subject="comment 7"
+ date="2014-05-30T20:47:02Z"
+ content="""
+I wrote a test program to try to connect to this server, using a test account, and dump some events. This works on linux. Then I tried it on mac, and I think I have reproduced the same failure!
+
+<pre>
+oberon:~ joeyh$ ./xmpp
+xmpp: <socket: 3>: hGetBuf: resource vanished (Connection reset by peer)
+</pre>
+
+Note that this exception is unable to be caught, it seems. Which would explain why the whole git-annex assistant crashes.
+
+Also, the same program, when modified to use some other xmpp server, does not crash.
+
+At this point, I think I need to forward this bug to network-protocol-xmpp author John Millikin. Which I've now done.
+
+My advice for the bug submitter: git-annex is going to be deprecating XMPP in the not too distant future anyway. If you have your own server, a much nicer way to use git-annex is to install it on the server and use ssh remotes. Recent versions do not need xmpp to sync between clients in such a configuration.
+
+Test program:
+
+[[!format haskell \"\"\"
+{-# LANGUAGE OverloadedStrings #-}
+
+import Network.Protocol.XMPP
+import Data.Maybe
+import Data.Either
+import Network
+import Control.Monad
+import Control.Monad.IO.Class
+import Control.Exception
+
+main = do
+ catch test
+ (\e -> do
+ let err = show (e :: IOException)
+ print (\"caught: \", err)
+ return (Right ())
+ )
+ print \"clean exit\"
+
+test :: IO (Either Error ())
+test = runClient server (getjid jid) username password $ do
+ liftIO $ print \"connected to server\"
+ jid <- bindJID (getjid jid)
+ liftIO $ print (\"bound to jid\", jid)
+ forever $ do
+ s <- getStanza
+ liftIO $ print (\"got\", s)
+ where
+ getjid t = fromMaybe (error \"jid parse error\") (parseJID t)
+ server = Server
+ (getjid serverjid)
+ servername
+ (PortNumber port)
+
+ servername = \"jabber.de\"
+ serverjid = \"jabber.de\"
+ port = 5222
+ jid = \"haskellxmpptest@jabber.de\"
+ username = \"haskellxmpptest\"
+ password = \"stupidpassword\"
+\"\"\"]]
+"""]]