Bug 33750 - Race condition during copy/move/etc. possible fix
Race condition during copy/move/etc. possible fix
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Data Systems
3.x
PC Linux
: P1 (vote)
: TBD
Assigned To: Jaroslav Tulach
issues@platform
: THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-19 19:44 UTC by Jaroslav Tulach
Modified: 2008-12-22 23:00 UTC (History)
5 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
The changes with a test case (18.18 KB, patch)
2003-05-19 19:45 UTC, Jaroslav Tulach
Details | Diff
Again and better - copy/move on folders works (18.62 KB, patch)
2003-05-20 12:31 UTC, Jaroslav Tulach
Details | Diff
Once again and perfectly? (23.60 KB, patch)
2003-05-22 17:59 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2003-05-19 19:44:44 UTC
In current data systems a thread can access
unfinished files copied/moved/createFromTemplated
by another Thread. This is simulated and fixed in
added attachement.

In addition to using runAtomicAction to prevent
event notifications the fix also prevents any
other thread from using DataObject.find and thus
accessing unfinished resources. 

This is dangerous if somebody is performing a long
running operation in the handleCopy, handleMove,
handleRename, handleCreateFromShadow methods
(probably DataFolder does), but still it looks
that it might be better to apply it (after
resolving the DataFolder problem).

Some evaluation please: Does it fix issue 33577?
Does it fix other problems? Thanks.
Comment 1 Jaroslav Tulach 2003-05-19 19:45:12 UTC
Created attachment 10337 [details]
The changes with a test case
Comment 2 _ rkubacki 2003-05-20 10:05:37 UTC
Thanks Jarda. I can't reproduce problem from #33577 anymore with the
patch but attempt to copy two folders (colorpicker and imageviewer) is
not finished and IDE is not functional after this.

Adding Andrew to CC so he can respond whether the approach is OK for
S1S. Namely bug #33244 can be fixed by this in a better way if we
resolve all problems.
Comment 3 David Konecny 2003-05-20 10:20:31 UTC
Assigning to Yarda.
Comment 4 Jaroslav Tulach 2003-05-20 12:31:10 UTC
Created attachment 10346 [details]
Again and better - copy/move on folders works
Comment 5 Andrew Sherman 2003-05-20 17:21:10 UTC
This sounds good. Thanks for working this issue.
Comment 6 Jaroslav Tulach 2003-05-22 10:05:52 UTC
Right now it is not possible to call DataFolder.getChildren from
inside the DataObject.handle* methods. This affects for example
PropertiesDataObject.handleMove. This will have to be fixed.
Comment 7 Jaroslav Tulach 2003-05-22 17:59:25 UTC
Created attachment 10383 [details]
Once again and perfectly?
Comment 8 Jaroslav Tulach 2003-05-28 10:04:29 UTC
Integrated. David any deadlocks during copy/move/etc. operations
assign to me.


Checking in loaders/manifest.mf;
/cvs/openide/loaders/manifest.mf,v  <--  manifest.mf
new revision: 1.5; previous revision: 1.4
done
Processing log script arguments...
Mailing the commit message to cvs@openide.netbeans.org (from
jtulach@netbeans.org)
Checking in loaders/api/apichanges.xml;
/cvs/openide/loaders/api/apichanges.xml,v  <--  apichanges.xml
new revision: 1.2; previous revision: 1.1
done
Processing log script arguments...
Mailing the commit message to cvs@openide.netbeans.org (from
jtulach@netbeans.org)
Checking in loaders/src/org/openide/loaders/DataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObject.java,v  <-- 
DataObject.java
new revision: 1.4; previous revision: 1.3
done
Checking in loaders/src/org/openide/loaders/DataObjectPool.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObjectPool.java,v 
<--  DataObjectPool.java
new revision: 1.4; previous revision: 1.3
done
Checking in loaders/src/org/openide/loaders/DataShadow.java;
/cvs/openide/loaders/src/org/openide/loaders/DataShadow.java,v  <-- 
DataShadow.java
new revision: 1.3; previous revision: 1.2
done
Checking in loaders/src/org/openide/loaders/DataTransferSupport.java;
/cvs/openide/loaders/src/org/openide/loaders/DataTransferSupport.java,v
 <--  DataTransferSupport.java
new revision: 1.3; previous revision: 1.2
done
Checking in loaders/src/org/openide/loaders/FolderList.java;
/cvs/openide/loaders/src/org/openide/loaders/FolderList.java,v  <-- 
FolderList.java
new revision: 1.3; previous revision: 1.2
done
Checking in loaders/src/org/openide/loaders/InstanceDataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/InstanceDataObject.java,v
 <--  InstanceDataObject.java
new revision: 1.4; previous revision: 1.3
done
Processing log script arguments...
Mailing the commit message to cvs@openide.netbeans.org (from
jtulach@netbeans.org)
RCS file:
/cvs/openide/test/unit/src/org/openide/loaders/SeparationOfThreadsTest.java,v
done
Checking in
test/unit/src/org/openide/loaders/SeparationOfThreadsTest.java;
/cvs/openide/test/unit/src/org/openide/loaders/SeparationOfThreadsTest.java,v
 <--  SeparationOfThreadsTest.java
initial revision: 1.1
done


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