This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
We've seen these exceptions several times before (see http://netbeans.org/bugzilla/show_bug.cgi?id=212961, http://netbeans.org/bugzilla/show_bug.cgi?id=212962) I was able to reproduce this exception in the current code. It looks like the problem is well-reproducible on slow connections when we are trying to list a directory content and create some sub-directory simultaneously from 2 threads. Further experiments showed that things could be improved by avoiding re-using of sftp channels from different threads(?). Though it is allowable (and seems to be a right thing to issue several sequent commands on the same ChannelSftp (like 'cd', 'chmod', 'put'), it is better not to cache channels and close them as soon as one logical tasks sequence is done.
The fix is not to use caching. http://hg.netbeans.org/cnd-main/rev/9f56c1a6d967
Integrated into 'main-golden', will be available in build *201301250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/9f56c1a6d967 User: Andrew Krasny <akrasny@netbeans.org> Log: Bug #225290 - Exceptions in sftp support with "4:" message Do not cache sftp channels in SFTSupport. This has no forformance effect, and only increases a risk of exceptions...
Integrated into 'main-golden', will be available in build *201301290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/723c79bc3ed8 User: Maria Tishkova <mromashova@netbeans.org> Log: Bug #225290 - Exceptions in sftp support with 4: message [reverting previous changes as they causes significant slow-down]
*** Bug 227720 has been marked as a duplicate of this bug. ***