Since upgrading to NetBeans 6.8, I kept on running out of disk space in my c drive. I kept uninstalling old programs, and still I ran out of disk space very quickly again, which caused everything to stop working each time, so I had to kill NetBeans.
After tracing down the problem it turns out in the .netbeans\6.8\var\log directory NetBeans is creating 100s of files, and one of the files called messages.log is about 2GBs in size (I had to kill NetBeans as this file was growing very quickly).
Most of the files are copies of our source files called names like : filename.java_1.dump
There are about 100 copies of each many of our source files each containing:
class file file:/filename.java
source file file:/filename.java
----- Source file content: ----------------------------------------
followed by the entire source file
The messages.log file was so big that none of the text editors on my computer could open in. I quickly wrote my own one.
It contains many lines starting with: INFO [org.netbeans.modules.search.BufferedCharSequence]: <init> source=[channel = sun.nio.ch.FileChannelImpl
many lines starting with WARNING [com.sun.tools.javac.comp.Attr]: Attr.attribClass has a null env for class: [
and the complete contents of many of our source files many times over.
Obviously it contains piles of other information, but I don't have time ot look all the way through a file that is 2GBs.
As well as this NetBeans is also consuming all the CPU and amazing amounts of memory.
I have compressed the messages.log file down to 120MB, but obviously this is still to big to send, and it contains our confidential source code, but at least this way I can find out extra information from it if need be.
I am reverting back to using NetBeans 6.7, which also performs very poorly, but at least it doesn't consume all my disk space.
Please attach here call stack so I can see where are these logs generated. (Is there call stack in log for those INFO/WARNING messages? Are there only big messages.* files or also other big files?
The messages.log file does not appear to contain any call stacks.
Only the messages.log file is extremely large,
the 100s of other files are only slightly bigger than our source file, but there are 100s of them the same getting written in under a minute so they also consume a lot of disk space (they were up to a total of almost 1GB when I killed NetBeans).
I am afraid that without a reproducible test case it may take several rounds before we find out what is wrong.
Regarding the dump files:
-there is (should be) an exception at the end of the file. This exception may be useful for diagnostics.
-what is the relation between class file and source file entries in the dump files? Are they the same file?
-is there some specific/uncommon pattern used in the files for which the dump has been produced? I have found one way to produce the coupling abort, described in bug #178758 (it is however unclear if that could be related to your case).
Regarding the log file:
-the logging as been introduced in bug #147656 to help with diagnostics. This command line option disables it:
-is there specific/uncommon pattern used in the classes that are part of the log? How do the classes look like (e.g. do they have complex type parameters?).
The "[org.netbeans.modules.search.BufferedCharSequence]:" log has been fixed as bug #178446.
we would really appreciate if you could help us to track this problem down.
If you want to use NetBeans 6.8 you can start it with --nologging - that should suppress the messages.log completelly (or use the option that Jan Lahoda described above). But in order to diagnose we actually need at least one copy of at least parts of what has been generated when it went so badly wrong for you.
Thanks a lot,
1) Here are the exceptions from 2 different dump files:
----- Trees: -------------------------------------------------------
----- Stack trace: ---------------------------------------------
----- Classpath: ---------------------------------------------
bootPath: C:\Program Files\Java\jdk1.6.0_17\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_17\jre\classes;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.6.0_17\jre\lib\ext\sunpkcs11.jar
classPath: [our class path was written here]
----- Original exception ---------------------------------------------
java.lang.OutOfMemoryError: Java heap space
2) The class files and source files are the same file in each case (the even both have the java extension and the same path)
3) The only thing I can see in common with the files is that they were files that I was in the middle of editing.
4) I don't see any specific/uncommon pattern with the files in the log. There is one very large one (50,000 lines of code - NetBeans warns me every time I open this file).
It makes heavy use of generics, but its class definition does not take any parameters.
Thank you very much for the logs.
The first CoupligAbort is almost certainly bug #178758. I will try to look at it.
The OOME relates to logging introduced due to bug #143923 - disabling logging should disable it, but something will probably not work correctly (in this case, some compilation errors may not be reported). A small standalone case that provokes the log (from com.sun.tools.javac.comp.Flow) would allow us to fix the root cause (the same applies for the log from Attr).
Small Reproducible Test Cases for this are almost impossible to make.
If I have logging turned off I can't see when the problems are happening.
If I have logging turned on it is killing my computer.
The source files in the dumps are not small files, so guessing what part of the files is triggering these logs is near impossible.
I can find out more information from the 2GB messages.log if that would be of help, and you could tell me what to search for.
Maybe you guys could change your debugging logging to only include the source file name, and source line number in the messages.log (instead of the entire source file each time), and only include a filename.dump if there is not already a filename.dump with the same name [in which case it should note in the messages.log that the dump file might be different than the source file].
This should at least slow down the problem long enough that we could then isolate the root causes of these problems.
Good idea. I have changed the two logs so that they log only name, position and file (if can be found):
I have also added a property that limits the number of dump files (per file for which the dump is generated) - was hardcoded to 255 before:
Integrated into 'main-golden', will be available in build *200912190200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jan Lahoda <firstname.lastname@example.org>
Log: #178736: adding a property to control how many .dump files will be created -J-Dorg.netbeans.modules.java.source.parsing.JavacParser.maxDumps, incorporating recent adjustments from nb-javac.
The logging has been limited (see the commit logs above). I think that these changes should be integrated into 6.8 patch 1 (the bug needs to be closed to allow this). I think that a new bug with specific info should be filled for the second problem (logging from Flow and Attr) - a reproducible test case will probably be needed in order to fix that.
Verified in trunk.
The fix has been ported into the release68_fixes repository.