Bug 41090 - jsch-0.1.30 causes SCP task to hang
Summary: jsch-0.1.30 causes SCP task to hang
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.6.5
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 1.7.1
Assignee: Ant Notifications List
: 41465 42271 46107 47856 (view as bug list)
Depends on:
Reported: 2006-11-30 11:51 UTC by Michael Dalrymple
Modified: 2009-09-24 08:13 UTC (History)
5 users (show)

a patch for ant 1.7.0 (640 bytes, patch)
2006-12-20 23:45 UTC, Atsuhiko Yamanaka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Dalrymple 2006-11-30 11:51:22 UTC
I have the following SCP task that copies files to a remote server:

<target name="deploy" depends="makeDist">
 <scp todir="${remote.user}:${remote.password}@${remote.server}:${remote.dir}"
trust="true" verbose="true">
 <fileset dir="${dist}" />

When executing this taret using the jsch-0.1.30.jar, the process fails after a
number of files get copied.  Leaving the fileset alone will result in having the
same number of files copied over prior to the hang.  Changing the fileset to a
new set of files (call it X) will result in a different number of files being
copied prior to the hang.  However, if repeated the failure will always occur
after the same number of files for fileset X.  It seems the failure condition is
reached after a certain number of bytes are transferred as opposed to a certain
number of files.

No error messages are displayed and the build does not exit, it just hangs.

I've confirmed that this does NOT occur with jsch-0.1.29 or jsch-0.1.28.
Comment 1 Atsuhiko Yamanaka 2006-12-20 14:41:00 UTC
Hi, I'm an author of jsch and I'm interested in reproducing this problem.
Is it reproducible on Ant 1.7.0?  Can you estimate how much of bytes
should be transferred to reproduce it, a few Kbytes, Mbytes, Gbytes?
Comment 2 Atsuhiko Yamanaka 2006-12-20 23:45:35 UTC
Created attachment 19296 [details]
a patch for ant 1.7.0

jsch 0.1.30 has improved the stream handling internally and it must be flushed
Comment 3 J.M. (Martijn) Kruithof 2007-01-27 11:33:28 UTC
*** Bug 41465 has been marked as a duplicate of this bug. ***
Comment 4 J.M. (Martijn) Kruithof 2007-04-29 06:20:52 UTC
*** Bug 42271 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Bodewig 2008-11-17 08:13:09 UTC
*** Bug 46107 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Bodewig 2009-09-24 08:13:14 UTC
*** Bug 47856 has been marked as a duplicate of this bug. ***