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: | Cannot cancel commands | ||
---|---|---|---|
Product: | versioncontrol | Reporter: | Jesse Glick <jglick> |
Component: | CVS | Assignee: | issues@versioncontrol <issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | pholthuizen |
Priority: | P3 | Keywords: | THREAD |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Thread dumps: go on SWAN, try to refresh status of prj w/ No Proxy, kill -QUIT, try to Cancel a couple of times, kill -QUIT again |
Description
Jesse Glick
2005-08-22 20:37:44 UTC
Note: several minutes later, the operation did time out and ask me for my proxy settings. CommandRunnable.cancel(): client.abort(); runnableThread.interrupt(); Could you provide thread dump please? I suspect that interrupt() does not work for direct socket implementation. It should raise InterruptedIOException. Besides one coumpound progress should be used here instead of two atomic. Created attachment 24184 [details]
Thread dumps: go on SWAN, try to refresh status of prj w/ No Proxy, kill -QUIT, try to Cancel a couple of times, kill -QUIT again
I was able to trigger following one that is not interruptible: "Wizard Background Validation" daemon prio=1 tid=0x5a08b138 nid=0x268f runnable [0x5a601000..0x5a601700] at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) - locked <0x459cb9e0> (a java.net.SocksSocketImpl) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) at java.net.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) at java.net.Socket.<init>(Socket.java:365) at java.net.Socket.<init>(Socket.java:178) at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:196) at org.netbeans.lib.cvsclient.connection.PServerConnection.openConnection(PServerConnection.java:186) at org.netbeans.lib.cvsclient.connection.PServerConnection.verify(PServerConnection.java:293) at org.netbeans.modules.versioning.system.cvss.ui.wizards.RepositoryStep.validateBeforeNext(RepositoryStep.java:232) at org.netbeans.modules.versioning.system.cvss.ui.wizards.AbstractStep.validate(AbstractStep.java:113) All traces share uninterruptible blocking call to java.net.PlainSocketImpl.socketConnect(Native Method). RFE 6315293 on Java 6. Possible workaround: post the Socket.connect to a new separate thread, then join() on it. Now the main task thread can be interrupted. If so, the call to connect will just continue in the background until it times out (or succeeds), but this won't matter much. You can probably also have the connection be closed if it did eventually succeed but the task thread was interrupted. *** Issue 64673 has been marked as a duplicate of this issue. *** After a bit of searching I found the next classes within the projects "CVS Client Library" and "CVS Versioning System" using SocketFactory.createSocket: - org.netbeans.lib.cvsclient.connection.PServerConnection - org.netbeans.modules.versioning.system.cvss.SSHConnection - org.netbeans.modules.versioning.system.cvss.RepositoryStep The next classes use Connection.open: - org.netbeans.lib.cvsclient.Client - org.netbeans.lib.cvsclient.commandLine.CVSCommand - org.netbeans.modules.versioning.system.cvss.SSHConnection I hope this helps making the scope of the problem domain clear. Sincerely, Patrick Holthuizen I'll follow new separate thread proposal. FIXED Note: some information execeptions logged. |