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.
Task manager shows Netbeans 50% CPU usage, hard drive activity, extemely slow/stopped IDE. Wait half hour, no change. Normal exit of IDE. Task manager shows Netbeans process 50% CPU, wait 15 minutes no change, hard drive activity slows file manager, etc. Kill Netbeans process. Restart IDE, everything normal for some work time, then repeat of above. This has happened several times. There is something unusual in what I am doing that might have something to do with this issue. I have a code generator that writes 2000 plus java files. These files are written into the code source for several IDE projects. Commonly, the files are extenally deleted and rewritten or just overrwritten. This causes frequent classpath and project scanning which takes some time. Rebuilds of the rewritten source are done frequently. A few days ago, I switched from 6.7 to the 6.8RC. 6.7 did the frequent project scanning but never the exteme CPU usage and hard drive activity. Immediate problem in 6.8. If this issue is of importance, I will provide whatever assistance I am able to provide, but I do not know much about what logs to provide, etc.
I had this background thread begin again. When I did a run on the project that generates the java code, the progress bar showed run, but it did not complete for several minutes. I tried exit IDE, a message appear; Exiting the IDE will terminate these processes: Generator (run) periodically added and removed to the above was scanning projects ... (I believe but not certain, I did not time a screen shot at the right time) The run must have completed while the above message box was displayed and the IDE exited. In the task manager, Netbeans showed 50% CPU usage for 25 minutes but the process finally exited. It appears that during this time there is extreme disk access which slows file manager. Also, during that time the System Idle thread goes up to %50 CPU usage periodically, basically pegging the total CPU usage. I have not determined what causes the background process to begin.
To reporter: could you please take thread dump while encountering the issue? http://wiki.netbeans.org/GenerateThreadDump Reassigning to java.
Please submit 2 or more thread dumps as described in the link attached by Peter.
Also please start the IDE with -J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=FINE and attach here the log file (ie. <ide-userdir>/var/log/messages.log). Thanks
What project types are you using - freeform, ordinary j2se, web, ...?
Created attachment 92350 [details] log with -J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=FINE
Created attachment 92352 [details] log after starting from console
Created attachment 92354 [details] startup thread dump see comment
I am attaching thread dumps and log. By deleting generated source files from the file manager, a background thread starts immediately scaling from a few percent of CPU usage to 50% in about 10 seconds (task manager). DumpStartup is before I have done anything. DumpBackground50 after the file deletion and the CPU usage to 50%. I then shutdown the IDE and netbeans was no longer shown in task manager (not the behaviour previously reported). I then restarted the IDE (messagesRestart). Without doing anything in the IDE, the CPU usage went to 50% (dumpBackgroundRestart). I shutdown and netbeans was not shown in task manager. I will soon let IDE run and see how long the background activity persists.
Created attachment 92355 [details] dump at 50
Created attachment 92356 [details] messages on restart
Created attachment 92357 [details] dump restart
I tried another method of getting the "background thread" started which I think represents better the problem. I copied three of the generated files to a source directory of another ejb project (separate source location, generated/src). I copy some or all the 2000 generated files there occasionally. I had previously deleted all so there were just the three copied files. That started this background 50%CPU usage immediately (dumpBackgroundCopyFiles.txt). I let that run for about five minutes with no change in 50 % activity (dumpBackgroundCopyFiles5Min.txt). Its been running about 10 minutes now. I will try a IDE shutdown and another thread dump.
Created attachment 92358 [details] dump after copying three files
Created attachment 92359 [details] dump 5 minutes after copy
After IDE shutdown, the activity stopped altogether and there was no thread dump, no process shown in task manager. I will try again later to reproduce the previous behaviour which was originally reported (the background thread continues after IDE shutdown).
I deleted the three files (copy and deletion were done in the IDE not file manager). The task manager immediately showed 50% CPU usage and it stayed there for 5 minutes (dumpBackgroundDeletFiles.txt), but I left and return 50 minutes later at which time there was no activity.
Created attachment 92361 [details] dump after delete
I tried another copy of the three files, the 50% CPU usage started, I waited 5 minutes then exited the IDE normally. The task manager showed no netbeans process. I cannot seem to reproduce that scenerio.
Created attachment 92363 [details] copy of three files after deletion
From the thread dumps there are several j2ee support threads. Reopening as user added the required info. Thanks very mach for dumps
I've filled an issue related to the concurrent j2ee refresh,, #182907. The rest of the issue seems as a duplicate of #134990. Can you try it in some newer 6.9 build (6.9m1 should be enough). We added some improvements in event handling, so it may be better. If not, please attach more thread dumps. If possible generate 3 successive thread dumps with approximately 5 second pauses. Thanks
Could not reproduce in 6.9M1 Build 201002152000. Although I could get the 50% usage, the usage would go to 0 in less than a half minute (scanning projects). Fixed.