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 118938 - Persistence closure synchronization should be better
Summary: Persistence closure synchronization should be better
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on: 127727
Blocks:
  Show dependency tree
 
Reported: 2007-10-15 20:54 UTC by Vladimir Kvashin
Modified: 2009-12-21 06:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The stack (979 bytes, text/plain)
2007-10-15 20:55 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2007-10-15 20:54:59 UTC
Unit test org.netbeans.modules.cnd.repository.impl.AccessWhileClosingProject shows that we have an issue in the case a
client tries to access project data (find a project file by its absolute path) while the project is being closed.

See the stack trace attached.

I never experienced such situation in the IDE, but I believe it's possible.
Comment 1 Vladimir Kvashin 2007-10-15 20:55:32 UTC
Created attachment 50968 [details]
The stack
Comment 2 Vladimir Kvashin 2007-10-15 21:04:53 UTC
Investigation shows that this happens when a client asks a repository unit for some data (via get method), while this
repository unit is being closed.

One of the consequences is that it's IntToStringCache is nonexistent at the moment (this one is most frequent).
Another one is that sometimes (very rarely) ClosedChannelException occurs.

The necessary fix involves refactoring of the repository implementation.
The entire stack (repository cache, int-to-string cache, file-based persistence) should be split on a per-unit (i.e.
per-project) basis. Now such split exists on some levels (on the lowest, file-based, level), but isn't consistent
enough. This does not allow to solve closure issues in a safe way.
Comment 3 Vladimir Kvashin 2007-10-15 21:10:26 UTC
I believe it isn't a P2, since this occurs only in tests. The test was written for a different issue and is very rigid -
in particular it tries to invoke findFile() many times on a project being closed (in a differet thread); this repeats
several hundred times. Eventually, it fails (findFile throws assertion error). This is reproducible on my Suse Linux
laptop, but not on Solaris desktop.
Comment 4 Quality Engineering 2009-12-21 06:25:15 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team