{"thread":{"id":"19932","subject":"Move JGit off JSch?","startedAt":"2009-06-25T18:14:28Z","lastAt":"2009-06-25T21:11:23Z","messageCount":3,"participants":["Shawn O. Pearce","Ferry Huberts","Robin Rosenberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116950","messageId":"20090625181428.GM11191@spearce.org","threadId":"19932","inReplyTo":null,"subject":"Move JGit off JSch?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-06-25T18:14:28Z","receivedAt":"2009-06-25T18:14:28Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"I'm fed up with JSch.\n\nThe remote.<name>.timeout stuff I added recently to JGit causes\nJSch to throw NPE on timeout[1] and the original author seems to\nthink that's a reasonable thing to do[2].\n\nMINA SSHD[3] contains a different client implementation, licensed\nunder the Apache License 2.0.  Its currently missing public key\nsupport[4] but the library is actually a pretty solid library,\nand the author seems to have a decent clue.\n\nI'm really starting to consider adding the public key support the\nclient side of MINA SSHD, and then rewriting TransportGitSsh to use\nit instead of JSch.  The downside is, that really increases our\ndependency chain, and SSH key management under Eclipse becomes a\nunique EGit problem as we can't piggy-back onto the existing JSch\nkey management already done by the workbench.\n\nBut, I just spent the last ~3 hours digging around JSch trying to\nfix this NPE bug... and realized the code is very thread unsafe,\nuses at least 2 threads per connection (your thread, and a thread\nit spawns for you) so you have no choice but to use threads, and\nthe author seems to think random NPEs are OK (see [2] and all of\nthe NPE bugs on sourceforge).\n\n[1] http://jira.source.android.com/jira/browse/GERRIT-233\n[2] http://www.mail-archive.com/jsch-users@lists.sourceforge.net/msg00520.html\n[3] http://mina.apache.org/sshd/\n[4] https://issues.apache.org/jira/browse/SSHD-25\n\n-- \nShawn.\n"},{"id":"116966","messageId":"4A43E389.8060807@pelagic.nl","threadId":"19932","inReplyTo":"20090625181428.GM11191@spearce.org","subject":"Re: Move JGit off JSch?","fromName":"Ferry Huberts","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-06-25T20:52:25Z","receivedAt":"2009-06-25T20:52:25Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Shawn O. Pearce wrote:\n> I'm fed up with JSch.\n\nGood to know!\n\nLast year I moved our application away from j2ssh to jsch because j2ssh\nwas pratically dead and rather oddly implemented within our application.\nI chose jsch because Eclipse was using it and development was actually\nbeing done on it. I wasn't aware of the issues with it though and also\nwas not aware of MINA.\nI'll start looking into MINA soon because we're having some rather odd\nissue in our application that seem to point to problems with jsch under\nheavy load/many parallel connections. Your story lit up a light in my\nhead to that effect :-)\n\nAre the Eclipse folks aware of these issues? they seem rather serious.\nWouldn't it be more effective to try to improve jsch through the eclipse\nfoundation/community, from multiple sides? (excuse me for asking the\nobvious)\n\nMy background is in massive parallel systems so I know about the pain of\nimplementing this kind of thing correctly (and also the reward of seeing\nit working...)\n"},{"id":"116967","messageId":"200906252311.23351.robin.rosenberg.lists@dewire.com","threadId":"19932","inReplyTo":"20090625181428.GM11191@spearce.org","subject":"Re: Move JGit off JSch?","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-06-25T21:11:23Z","receivedAt":"2009-06-25T21:11:23Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"torsdag 25 juni 2009 20:14:28 skrev \"Shawn O. Pearce\" <spearce@spearce.org>:\n> I'm fed up with JSch.\n> \n> The remote.<name>.timeout stuff I added recently to JGit causes\n> JSch to throw NPE on timeout[1] and the original author seems to\n> think that's a reasonable thing to do[2].\n> \n> MINA SSHD[3] contains a different client implementation, licensed\n> under the Apache License 2.0.  Its currently missing public key\n> support[4] but the library is actually a pretty solid library,\n> and the author seems to have a decent clue.\nClues are useful :)\n\n> I'm really starting to consider adding the public key support the\n> client side of MINA SSHD, and then rewriting TransportGitSsh to use\n> it instead of JSch.  The downside is, that really increases our\n> dependency chain, and SSH key management under Eclipse becomes a\n> unique EGit problem as we can't piggy-back onto the existing JSch\n> key management already done by the workbench.\n\nI haven't really looked into JSch internals, but rewriting complex code\nwithout trying hard to fix the problem might not be worth it. New\ncode /will/ have problems and having a different mechanism for key\nmanagement is in some very obscure corner on the reverse side of\nmy wish list. \n\n> But, I just spent the last ~3 hours digging around JSch trying to\n\nI'm not quite as efficient as you, but I've spent more than three\nhours on fixing much simpler things.\n\n> fix this NPE bug... and realized the code is very thread unsafe,\n> uses at least 2 threads per connection (your thread, and a thread\n> it spawns for you) so you have no choice but to use threads, and\n> the author seems to think random NPEs are OK (see [2] and all of\n> the NPE bugs on sourceforge).\n\nCan't we bug him a little more, but then again patches are probably\nmore convincing than bug reports. Perhaps you could explain the \nissues in more detail before we start rewriting the key management\ninto SSHD. \n\nShould we raise a bug report in eclipse about replacing\nJSch, in order to get some feedback from Eclipse people?\n\n-- robin\n"}]}