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 162133 - OOME in task list during JPA and EJB scanning
Summary: OOME in task list during JPA and EJB scanning
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords: PERFORMANCE, REGRESSION, TEST
: 162965 163404 163925 163974 164735 165205 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-07 14:57 UTC by Oleg Khokhlov
Modified: 2009-05-29 14:03 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file (55.42 KB, text/plain)
2009-04-07 14:57 UTC, Oleg Khokhlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Khokhlov 2009-04-07 14:57:02 UTC
- Start IDE with fresh userdir;
- Open j2se project;
- Close Task window after it appears

Scanning will go and memory will grow enormously until OOME happens.
I can reproduce it with a small project ( jEdit) on a machine with 2Gb RAM.

If task window isn't closed - project happily opens without any memory growth.

200904070200
jdk 1.6.0_12
WinXP SP2 but seen it on solaris and linux as well.
Comment 1 Oleg Khokhlov 2009-04-07 14:57:30 UTC
Created attachment 79647 [details]
log file
Comment 2 Oleg Khokhlov 2009-04-07 15:01:04 UTC
it's regression and that's the reason for recent automated test failures - in tests we open j2se projects and close task
window.
Workaround is not to close task window.
Comment 3 Stanislav Aubrecht 2009-04-08 08:14:54 UTC
it's a problem with EJBVerificationTaskProvider. it unnecessarily recompiles every java source files provided from task
list infrastructure. it should subclass PushTaskScanner instead of FileTaskScanner and use the new indexing api to cache
scanned tasks.
a short term workaround is turning this task provider off in task list window.
Comment 4 Petr Jiricka 2009-04-08 12:50:05 UTC
Tomasz Slota originally implemented this feature, reassigning. There are known performance problems with the EJB
verification, and my impression was that is is already turned off by default, isn't it? It is turned off for me in my
build. How did it get activated in your testcase?
Comment 5 Petr Jiricka 2009-04-08 12:54:54 UTC
BTW, I saw that inner class EJBProblemFinder.RescanTrigger is unused - it probably should be deleted?
Comment 6 Tomasz Slota 2009-04-08 13:19:49 UTC
The code seems to have changed a lot since I originally wrote it. Anyways, I will rewrite it to the new approach, hope it can be done for the beta.
Comment 7 Petr Jiricka 2009-04-08 13:34:44 UTC
Thanks. I would still like to know why this code is called if EJB tasks are turned off by default.
Comment 8 Vitezslav Stejskal 2009-04-09 09:07:45 UTC
"Thanks. I would still like to know why this code is called if EJB tasks are turned off by default." - most likely
because of issue #162076.
Comment 9 Vitezslav Stejskal 2009-04-09 09:09:06 UTC
Btw. the same problem is with org.netbeans.modules.j2ee.jpa.verification.JPAVerificationTaskProvider.
Comment 10 Petr Jiricka 2009-04-09 09:14:05 UTC
Vita, thanks for the investigation. I suspected the JPA verification could have the same problem (and it is also turned
off by default intentionally). Tomasz, when you look at the EJB verification problem, can you please also look at JPA?
Thanks.
Comment 11 swpalmer 2009-04-13 15:18:41 UTC
"If task window isn't closed - project happily opens without any memory growth."

This is not true.  As of 200904130201 anyway, the closing of the Task List window isn't required.  Memory consumption 
is simply huge always on the initial scan of the projects.  You don't need a particularly large project for this to 
happen.
Comment 12 swpalmer 2009-04-15 21:21:59 UTC
I'm running 200904150201 now and I've increased my max heap to 1GB in the config file.. and still I run out of memory 
all the time... with 6.5 I would be comfortable with 300MB heap.
This happens when switching project groups or any time I see the "Scanning projects..." message on the status bar.
Comment 13 aldobrucale 2009-04-22 10:13:29 UTC
*** Issue 162965 has been marked as a duplicate of this issue. ***
Comment 14 swpalmer 2009-04-22 15:51:32 UTC
I think this should be a P1.  It makes NetBeans nearly useless - not many users are going to want to hack their config 
file just so they can launch NetBeans the first time - assuming they have enough memory to make it past this problem.
Comment 15 Petr Jiricka 2009-04-22 16:10:16 UTC
The major problem was now fixed in issue 162076. Are you still running into problems, even if the "Persistence API
Problems" and "EJB API Problems" items are disabled in tasklist filter? If you are, and turning these off does not help,
then you are probably facing a different issue than reported here, and it would be great if you could file it as a
separate ticket, with a few thread dumps and exception stack traces. Thanks.
Comment 16 Tomasz Slota 2009-04-28 14:10:00 UTC
The integration of EJB and JPA Verification with the task list is now completely disabled - it is only possible to see errors in the currently edited file. See issue 
163916

http://hg.netbeans.org/web-main/rev/af5b9a27d3cb
Comment 17 Dusan Balek 2009-04-29 13:53:36 UTC
*** Issue 163974 has been marked as a duplicate of this issue. ***
Comment 18 Dusan Balek 2009-04-29 14:03:12 UTC
*** Issue 163404 has been marked as a duplicate of this issue. ***
Comment 19 Dusan Balek 2009-04-30 07:55:40 UTC
*** Issue 163925 has been marked as a duplicate of this issue. ***
Comment 20 Dusan Balek 2009-05-12 13:59:18 UTC
*** Issue 164735 has been marked as a duplicate of this issue. ***
Comment 21 Dusan Balek 2009-05-28 12:56:07 UTC
*** Issue 165205 has been marked as a duplicate of this issue. ***
Comment 22 Oleg Khokhlov 2009-05-29 14:03:34 UTC
v. in 20090529