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 26553 - ALL: Rare deadlock in VCS cache.
Summary: ALL: Rare deadlock in VCS cache.
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 29285 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-08-16 13:38 UTC by Jiri Kovalsky
Modified: 2003-07-01 12:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The thread dump I talked about. (23.57 KB, text/plain)
2002-08-16 13:39 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2002-08-16 13:38:53 UTC
Development build #200208160100 of NetBeans 4.0
Windows 2000 with JDK 1.4.1 RC build #19

Description:
============
I apologize for not having any reproducable steps
but I am filing this upon Martin's request. Please
take a look at the attached thread dump.

What I did:
===========
1. Used approx. 7 days old CVS filesystem.
2. Invoked "CVS|Remove" and confirmed the dialog.
3. Removed has finished and then IDE got frozen.
Comment 1 Jiri Kovalsky 2002-08-16 13:39:51 UTC
Created attachment 7112 [details]
The thread dump I talked about.
Comment 2 Martin Entlicher 2002-08-16 13:52:50 UTC
Thanks Jiri for filling this. It's important to have this archived to
know what to be aware of.
The problem is at two places:
1) In VcsFileSystem.children() we scan scheduled files, which are
stored in attributes.
2) in VcsFileSystem.outputStream() we decide which files to backup by
whether they are important or not. This is O.K., but the
"importantness" is stored in file references.

Because access to FileObjects and their attributes is synchronized
(but with different locks), their respective access in one direction
in one thread, while other direction in another thread leads to the
deadlock.
Thus we need to avoid accessing FO attributes while having locked
FileObjects and accessing FileObjects while having locked FO
attributes.
Comment 3 Martin Entlicher 2002-08-16 13:54:28 UTC
Target Milestone -> 4.0: This needs to be solved in 4.0 release.
Comment 4 Martin Entlicher 2002-10-24 12:38:49 UTC
Fixed in the main trunk.

When deciding whether to create backup file or not, check for
the file importantness at last.

/cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v 
<--  VcsFileSystem.java
new revision: 1.190; previous revision: 1.189
Comment 5 Jiri Kovalsky 2002-11-08 09:16:17 UTC
No deadlock during "CVS|Remove" recently. I assume it got really
fixed. Verified in development build #200211080100 of NetBeans 4.0.
Comment 6 Jaroslav Tulach 2002-12-03 09:55:32 UTC
Hi. This issue is marked as 3.4.1_CANDIDATE. It means that it should be
integrated into release341 one branch. The plan at
http://www.netbeans.org/devhome/docs/releases/34/index.html expected beta1 to be
produced on Dec01. That did not happen due to a lot of outstanding not
integrated candidates like this one. 

Would it be possible to spend few minutes by backporting this fix? Thank you in
advance.
Comment 7 Martin Entlicher 2002-12-06 13:29:20 UTC
Merged into release341 branch.

/cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v 
<--  VcsFileSystem.java
new revision: 1.178.6.3.4.4; previous revision: 1.178.6.3.4.3
Comment 8 Martin Entlicher 2002-12-06 16:06:12 UTC
*** Issue 29285 has been marked as a duplicate of this issue. ***
Comment 9 Quality Engineering 2003-07-01 12:56:53 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.