Bug 62812 - Cannot cancel commands
Cannot cancel commands
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: CVS
5.x
All All
: P3 (vote)
: 5.x
Assigned To: issues@versioncontrol
issues@versioncontrol
: THREAD
: 64673 (view as bug list)
Depends on:
Blocks:
  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
:


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

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
settings.
Comment 2 _ pkuzel 2005-08-24 13:30:52 UTC
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.
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
[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)
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.

Sincerely,
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
FIXED

Note: some information execeptions logged.


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