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.
Summary: | org.netbeans.modules.deadlock.detector.Detector$DeadlockDetectedException: ConnectionManager queue | ||
---|---|---|---|
Product: | cnd | Reporter: | Exceptions Reporter <exceptions_reporter> |
Component: | execution | Assignee: | ilia |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | apepin, vkvashin |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 222337 |
Attachments: | stacktrace |
Description
Exceptions Reporter
2016-02-01 14:28:02 UTC
Created attachment 158335 [details]
stacktrace
This is a classical deadlock inside the jsch: "SFTP" thread - has locked KnownHosts instance - then tries to lock KnownHosts.pool "ConnectionManager queue" thread - has locked KnownHosts.pool - then tries to lock KnownHosts instance Below are minimal thread fgarments that illustrate this (note that there are no NB code in these stacks): "ConnectionManager queue" Id=371 in BLOCKED on lock=com.jcraft.jsch.KnownHosts@24a91105 owned by SFTP: : Uploading /home/kiss/netbeans-8.1/cnd/bin/Linux-x86_64/rfs_controller to user@11.44.33.55:/var/tmp/dlight_ikiss/6b88f630/tools/Linux-x86_64/rfs_controller Id=388 at com.jcraft.jsch.KnownHosts.getHMACSHA1(KnownHosts.java:486) at com.jcraft.jsch.KnownHosts.access$000(KnownHosts.java:35) at com.jcraft.jsch.KnownHosts$HashedHostKey.isMatched(KnownHosts.java:540) at com.jcraft.jsch.KnownHosts.getHostKey(KnownHosts.java:361) - locked java.util.Vector@79ee48d at com.jcraft.jsch.Session.checkHost(Session.java:809) at com.jcraft.jsch.Session.connect(Session.java:342) "SFTP: : Uploading /home/kiss/netbeans-8.1/cnd/bin/Linux-x86_64/rfs_controller to user@11.44.33.55:/var/tmp/dlight_ikiss/6b88f630/tools/Linux-x86_64/rfs_controller" Id=388 in BLOCKED on lock=java.util.Vector@79ee48d owned by ConnectionManager queue Id=371 at com.jcraft.jsch.KnownHosts.check(KnownHosts.java:263) at com.jcraft.jsch.Session.checkHost(Session.java:732) - locked com.jcraft.jsch.KnownHosts@24a91105 at com.jcraft.jsch.Session.connect(Session.java:342) This can probably be solved on NetBeans side, but I'm not sure. One possible way solving the issue or of at least minimizing its probability could be: somehow suppress automatic connecting (which takes place if someone launched a process or a sftp upload/download, etc). That's just an idea, I'm not sure whether it will fly. This can also make stability lower for connections that tend to break from time to time (so that going via key or with saved password improves the situation). I wrote a mail to jsch-users in this respect, see the link below. http://sourceforge.net/p/jsch/mailman/jsch-users/thread/56BAF700.20601%40oracle.com/#msg34837989 I've even got an answer with a patch: https://sourceforge.net/p/jsch/mailman/jsch-users/thread/56BC7AFE.50400%40kimmeringer.de/#msg34841444 But unfortunately not from jsch authors, but from other user, who says, they never responded for the requests to contribute and pathces :( Is it time to use a custom version as we did with antlr a while ago? License allows that... I filed a bug against jsch https://sourceforge.net/p/jsch/bugs/101 although I'm not sure anyone will react... *** Bug 258359 has been marked as a duplicate of this bug. *** Vladimir, seems that this bug was fixed in the latest version: ChangeLog of JSch ==================================================================== Last modified: Tue Aug 30 06:47:52 UTC 2016 Changes since version 0.1.53: ... - bugfix: fixed a deadlock bug in KnownHosts#getHostKey(). ... Although it's too risky to upgrade our jsch dependency while in the patch process, I suggest to make this change in trunk. Well, suddenly we already use 0.1.54 :-) So this problem shouldn't occur anymore. |