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.

Bug 99939 - Potential race condition in thread interruption
Summary: Potential race condition in thread interruption
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords: THREAD
: 99211 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-04 10:07 UTC by Petr Nejedly
Modified: 2007-04-11 10:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2007-04-04 10:07:21 UTC
ui.status.VersioningPanel keeps reference to assigned RequestProcessor thread
and calls interrupt() on it. It also clear the reference to it asynchronously
(invokeLater) so there is a vulnerability window, where the RP's thread may
already been used by another task, yet VersioningPanel keeps its reference and
can interrupt() it. This would cause problems described in issue 98606.

Now, even if the correctness is enforced by the surrounding code, it is
unnecessarily complicated. RequestProcessor supports thread interruption (@since
openide-util,v6.3)
Just use "new RequestProcessor("SubversionView", 1, true);" and call cancel() on
the Task, it will unschedule it and interrupt() the assigned thread iff it is
currently running.
Comment 1 Tomas Stupka 2007-04-04 10:47:37 UTC
*** Issue 99211 has been marked as a duplicate of this issue. ***
Comment 2 Tomas Stupka 2007-04-11 09:17:11 UTC
fixed 


Checking in ui/wizards/importstep/ImportStep.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/wizards/importstep/ImportStep.java,v
 <--  ImportStep.java
new revision: 1.36; previous revision: 1.35
done
Checking in ui/wizards/repositorystep/RepositoryStep.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/wizards/repositorystep/RepositoryStep.java,v
 <--  RepositoryStep.java
new revision: 1.42; previous revision: 1.41
done
Checking in ui/status/VersioningPanel.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/status/VersioningPanel.java,v
 <--  VersioningPanel.java
new revision: 1.35; previous revision: 1.34
done
Checking in client/Bundle.properties;
/cvs/subversion/main/src/org/netbeans/modules/subversion/client/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.14; previous revision: 1.13
done
Checking in client/WizardStepProgressSupport.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/client/WizardStepProgressSupport.java,v
 <--  WizardStepProgressSupport.java
new revision: 1.4; previous revision: 1.3
done
Checking in client/SvnProgressSupport.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/client/SvnProgressSupport.java,v
 <--  SvnProgressSupport.java
new revision: 1.19; previous revision: 1.18
done
Checking in ui/history/DiffResultsView.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/history/DiffResultsView.java,v
 <--  DiffResultsView.java
new revision: 1.10; previous revision: 1.9
done
Comment 3 Petr Nejedly 2007-04-11 10:09:15 UTC
Looks great to me.