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 30637 - PERFORMANCE: ide is incredible slow when deal with corrupted .nbattrs
Summary: PERFORMANCE: ide is incredible slow when deal with corrupted .nbattrs
Status: RESOLVED WONTFIX
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-02-04 10:44 UTC by dmladek
Modified: 2004-08-13 12:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
E. stacktrqces (15.61 KB, text/plain)
2003-02-04 10:46 UTC, dmladek
Details
FTD (13.45 KB, text/plain)
2003-02-04 14:34 UTC, dmladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmladek 2003-02-04 10:44:44 UTC
Product Version       = NetBeans IDE Dev (Build
200302030100)
  IDE Versioning        = IDE/1 spec=3.34
impl=200302030100
  Operating System      = Linux version 2.4.18
running on i386
  Java; VM; Vendor      = 1.4.1_01; Java
HotSpot(TM) Client VM 1.4.1_01-b01; Sun
Microsystems Inc.
  Java Home             =
/usr/java/j2sdk1.4/sun/jdk1.4.1_01/jre
  System Locale; Encod. = cs_CZ; ISO-8859-2
  Home Dir; Current Dir = /home.local/danielm;
/DISKS/storage3/forte/NBdev-last/netbeans/bin
-------------------------------------------------------------------------------

Well, I know thet you are not responsible if a
user corrupts his data, but let me describe the
situation how it happen and what impact it has wor
me and my ide and then I hope you'll find this
ide's behavoiur at least very annoying. And
definitely it shoudl be solved as PERFORMANCE
ISSUE/TASK or i'don't know to which category it
belongs....

Description:
============
I have mounted whole sources of NetBeans (using
Gen-CVS FS, but it isn't important in this
context, IMO).
And after a some time (can't tell you how long it
is), ide became 
incredible slow:-( eating almost whole RAM and CPU
at my OS...
Thus I can't wark at all:-(((

I've foun that at this time lots of stacktraces of
Exceptions are printed into console.
From their stacktraces I found that ide has
problems when parsing
.nbattrs
files, especialy with at least this one:
openide/test/qa-functional/src/DataLoaderTests/LoaderPoolTest/.nbattrs

hmmm.... You could tell me, that I hadn't have
commited it into repository 'cause there became
uresolved conflicts after I updated
my local sources of ide.
But I didn't commited it into repository and
definitely it shouldn't matter how it get inte
repo...but we now know thet if something silamar
is possible happen that it might coauses such
nightmare like this one is....

I'm attaching the stacktrace of IOE. and SAXE.
Exceptions
I forgot to make FTD too:-( And till the
conflicted file won't became parsed again I can't
put it there...
But I'll ASAP;-)


thanks for understanding
Comment 1 dmladek 2003-02-04 10:46:40 UTC
Created attachment 8791 [details]
E. stacktrqces
Comment 2 dmladek 2003-02-04 14:33:29 UTC
Jap...:-) From last restart it took approximately 2-3 hours to get
almost stucked.
Here's my FullThreadDump.....
Comment 3 dmladek 2003-02-04 14:34:33 UTC
Created attachment 8795 [details]
FTD
Comment 4 dmladek 2003-02-04 14:36:11 UTC
And I've also got OOME:-((
*********** Exception occurred ************ at Tue Feb 04 15:30:44 CET
2003
[catch]java.lang.OutOfMemoryError
*********** Exception occurred ************ at Tue Feb 04 15:30:44 CET
2003
Annotation: Exception occurred in Request Processor
[catch]java.lang.OutOfMemoryError


No stack available:-(
Comment 5 rmatous 2003-02-05 15:44:13 UTC
You are right, that there should be a way how recover from problems.
But in this case I don't see any problem in DefaultAttributes as you
probably expected. If file is corrupted, then null is returned
according to API FileObject.getAttribute. Also ErrorManager is used to
log it with informational severity. Moreover this value is softly
cached. I would say that problem is not, that ErrorManager is used
heavily, but that client code, that relies on attributes can't
recover. Reassigned to vcscore. Please investigate thread dumpstack.
Comment 6 Martin Entlicher 2003-02-05 17:11:19 UTC
VCS modules (VcsFileSystem & JavaCvsFileSystem) use FileObject
attributes to remember some information. Unfortunately this was
implemented as a hack for some Forte EE module, but apparently it can
cause performance problems.
I'll try to find out whether I can remove these hacks.

But IMHO this is not the biggest problem here. The problem is, that
there are at least 3 exceptions thrown for every bad .nbattrs:

1) org.xml.sax.SAXParseException: The content beginning "<<" is not
legal markup. Perhaps the "<" (&#3c;) character should be a letter.
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)

2) org.xml.sax.SAXException: Cannot read DefaultAttributes.
        at
org.openide.filesystems.DefaultAttributes$Table.readFromXML(DefaultAttributes.java:854)

3) java.io.IOException: Cannot read DefaultAttributes.:
openide/test/qa-functional/src/DataLoaderTests/DataObjectTest/.nbattrs
[catch] at
org.openide.filesystems.DefaultAttributes.loadTable(DefaultAttributes.java:586)

Throwing an exception affects the performance considerably. There's a
question whether we can do something about it. According to what Radek
said, there should not be these exceptions thrown repeatedly for every
access to attributes. If this is so, it probably has no solution.


The only way how to fix this is probably: do not access FileAttributes
in children(). That actually means, that I have to remove the hack for
Forte EE modules. I'll find out whether I can do it or not.
Comment 7 _ ttran 2003-02-13 09:13:20 UTC
-> vcscore
Comment 8 Martin Entlicher 2003-02-13 10:44:54 UTC
I would like to remove the mentioned hack in 4.0, I will implement a
replacement for it, which is not feasible to do in 3.5.
So I'm proposing to "fix" this into 4.0 (the "fix" means, that I will
not access the attributes in children(), but there's a question
whether this would help anyway).

Is this really P2? Versioning of .nbattrs is not recommended anyway
and I don't thing many users do that. If there are conflicts it can
bring other more serious issues.
Comment 9 Martin Entlicher 2003-02-20 11:14:30 UTC
Since the fix of issue #11589 can not be removed (it could
theoretically be replaced with the fix of issue #31056, but there is
no time to do the change and test it enough into 3.5),
I will request a waiver for S1S 5.0 (NB 3.5)
Comment 10 Martin Entlicher 2003-02-21 11:30:04 UTC
Adding S1S5_WAV keyword. There is no way to fix this into NetBeans
3.5/S1S 5.0. I need to access file attributes to check some settings,
that are stored for issue #11589.
This can be "fixed" in 4.0 in the sense, that VCS filesystem will not
scan file attributes, issue #11589 will probably become obsolete in
4.0.
Comment 11 Martin Entlicher 2003-02-21 11:44:04 UTC
While I was describibg the situation in a request for the waiver, I
realized, that it has no sense to try to fix this.

Conflicts in .nbattrs (even versioning of .nbattrs) is a pathological
state. When .nbattrs files will become unusable a lof of things get
broken.

This has IMHO only one solution: The IDE must assure, that .nbattrs
files will be usable. It's a question of who should do that, because
this can happen as well on a local FS.
Comment 12 Martin Entlicher 2003-02-21 11:52:18 UTC
See issue #31308.
Comment 13 Patrick Keegan 2003-04-03 15:53:04 UTC
Is there a useful release note that I could provide for 
this problem? If so, could somebody suggest the text?
Comment 14 dmladek 2003-07-07 10:14:23 UTC
well, we'are after release of NB3.5 ...
Are there any views of how to fix it, please?
And or explanation why not?


As Martin wrote it is pathological situation when ide has corrupted
.nbattrs and lots of other stuffs could fail...

thanks for answer
Comment 15 Martin Entlicher 2003-07-22 15:38:00 UTC
Scheduling for 4.0.
This can be solved only when implementation of issue #11589 is
removed. The issue #31056 might help here to find a suitable
replacement, but it is possible that issue #11589 becomes obsolete in
the new projects framework.
Comment 16 Martin Entlicher 2004-01-22 15:14:30 UTC
This was scheduled for 4.0 (promotion D).
The only solution that can be implemented in VCS modules is, not to
use the file object attributes. It's a question though, whether this
really helps.

Downgrading to P3. There were no complains about this from the users
community, it happens rarely.
Comment 17 Patrick Keegan 2004-03-04 22:51:06 UTC
removing RELNOTE keyword as this doesn't seem to come up among users
Comment 18 Martin Entlicher 2004-07-14 18:38:11 UTC
Resolving as wontfix. There are no .nbattrs files created any more and
the old are being cleared up.