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 17984 - Deadlock in FSs
Summary: Deadlock in FSs
Status: CLOSED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 3.x
Hardware: Sun SunOS
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-22 15:27 UTC by Jan Zajicek
Modified: 2007-01-04 17:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
FTD (12.16 KB, text/plain)
2001-11-22 15:29 UTC, Jan Zajicek
Details
fix changes. (8.70 KB, patch)
2001-11-28 07:47 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Zajicek 2001-11-22 15:27:43 UTC
Deadlock occured when trying to delete large folder. See attached FTD.
Comment 1 Jan Zajicek 2001-11-22 15:29:03 UTC
Created attachment 3540 [details]
FTD
Comment 2 rmatous 2001-11-22 15:56:06 UTC
I think that this thread is guilty:
at org.netbeans.modules.vcscore.util.virtuals.VcsRefreshRequest.run
(VcsRefreshRequest.java:172)

Reassigned to mkleint@netbeans.org
Comment 3 Milos Kleint 2001-11-22 16:12:08 UTC
it's an javacvs/vcscore issue. I'll try to fix it..
Comment 4 Jan Zajicek 2001-11-22 16:35:21 UTC
More info: deleted folder was under javacvs ;-)
Comment 5 Milos Kleint 2001-11-22 16:39:29 UTC
who would have guessed that.. ;)

BTW: can you 100% reproduce it each time? or was it a one shot deadlock?

Comment 6 Jan Zajicek 2001-11-22 17:21:46 UTC
I am afraid that it was only 'one shot' deadlock. I didn't see it anymore.
Comment 7 Milos Kleint 2001-11-22 22:09:29 UTC
hmm I thought so..
here's my interpretaion of the deadlock so far:
You were deleting a big scale delete. accidentaly at the same time a
background refresh was happening that sadly interfered with the
deleting stuff and caused the deadlock. 

Proposed solution:
I'll check during the periodic refresh for any upcoming deleted files
and such an action occurs the refresh will be postponed. 
Additional measure: The actual point of deadlock was that a file was
being removed and at the same time an attribute was written to the
.nbattrs file that the delete wanted to access as well (by the
refresh). I guess the Preffered Virtual loader doesn't have to be
written to .nbattrs file and can be handled dynamically from the
filesystem's attribute handling. the
DataLoaderPool.setprefferedloader() method won't actually write the
attribute down, but rather just fire the prop. change and notify
everyone the loader has changed. I guess when the attribute is reset,
we need to access the .nbattrs file to check if there was no other
prefferd loader.
Comment 8 Milos Kleint 2001-11-23 16:43:35 UTC
I have a solution ready, just testing it some more.

Solution: 
1. Interrupt the running VcsRefresher if any request for preffered
refresh comes in. This will cause the scheduling of the refresh and
prevents the thread from interrupting the operations in other threads.
This is a good risk-reducing measure, will not fix the actual problem
IMHO.
2.Avoid writing the VirtualDataLoader as preffered loader to the
nbattrs file. during the delete of files the ide attempts to delete
the attributes of the file in the .nbattrs file. We should not write
the virtualdataloader, but rather store it in the fileobject's
reference. This way we'll have the info dynamic and won't need to
write to the disk file. It both prevents the deadlock in the
stacktrace but also has performance implications.
Comment 9 Milos Kleint 2001-11-25 17:00:31 UTC
fixed in main trunk. (25/Nov/2001)
As previously described. Also removed FileObject.findResource() and
FileObject.refresh calls from the 
AbstractFileSystem.Info.outputStream() method implementation..
Comment 10 Milos Kleint 2001-11-25 17:16:03 UTC
merged into the release33 branch.

3.3.0_CANDIDATE, however the keyword is not available yet :)

Comment 11 Jiri Kovalsky 2001-11-26 11:15:49 UTC
I have tried similar stuff (refreshing during deleting) but no dead-
lock appeared. Unreproducable things are very hard to reproduce :-) 
and therefore I assume it was fixed. Verified in development build of 
NetBeans 3.3 #200111260100.
Comment 12 Milos Kleint 2001-11-27 09:36:07 UTC
added the candidate keyword
Comment 13 Milos Kleint 2001-11-28 07:47:34 UTC
Created attachment 3598 [details]
fix changes.
Comment 14 Milos Kleint 2001-11-29 10:03:14 UTC
won't be integrated to 330.
Comment 15 Quality Engineering 2003-07-01 12:47:40 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.