Bug 62812 - Cannot cancel commands
Cannot cancel commands
Product: versioncontrol
Classification: Unclassified
Component: CVS
All All
: P3 (vote)
: 5.x
Assigned To: issues@versioncontrol
: 64673 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2005-08-22 20:37 UTC by Jesse Glick
Modified: 2007-01-04 17:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

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 (16.82 KB, text/plain)
2005-08-24 14:20 UTC, Jesse Glick

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-08-22 20:37:44 UTC
050822, Mustang, Linux. I opened a source file and chose CVS -> Show XXX.java
Annotations. It began running but did not finish. (Probably the proxy setting
was wrong, but javacvs seems to ignore the proxy configuration that the rest of
the IDE uses, and I cannot find any place to tell it to use a proxy right now -
I go on and off SWAN frequently, often with the IDE running.)

Anyway, seeing that it was not going to work (and after getting the answer I
wanted from the command line), I right-clicked on the process in the status bar
and chose Cancel. But nothing happened, even after multiple attempts. Nothing
relevant-looking in messages.log.
Comment 1 Jesse Glick 2005-08-22 20:41:44 UTC
Note: several minutes later, the operation did time out and ask me for my proxy
Comment 2 _ pkuzel 2005-08-24 13:30:52 UTC


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.
Comment 3 Jesse Glick 2005-08-24 14:20:13 UTC
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
Comment 4 _ pkuzel 2005-08-24 16:11:42 UTC
I was able to trigger following one that is not interruptible:

"Wizard Background Validation" daemon prio=1 tid=0x5a08b138 nid=0x268f runnable
        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)
Comment 5 _ pkuzel 2005-08-24 16:46:53 UTC
All traces share uninterruptible blocking call to
java.net.PlainSocketImpl.socketConnect(Native Method).

RFE 6315293 on Java 6.
Comment 6 Jesse Glick 2005-08-24 18:11:31 UTC
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.
Comment 7 _ pkuzel 2005-09-19 17:23:12 UTC
*** Issue 64673 has been marked as a duplicate of this issue. ***
Comment 8 pholthuizen 2005-09-25 19:26:31 UTC
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.

Patrick Holthuizen
Comment 9 _ pkuzel 2005-09-26 12:45:29 UTC
I'll follow new separate thread proposal.
Comment 10 _ pkuzel 2005-09-26 13:36:58 UTC

Note: some information execeptions logged.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo