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 176486 - [68cat] AWT thread blocked for 4188 ms.
Summary: [68cat] AWT thread blocked for 4188 ms.
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-11-11 02:06 UTC by stefan79
Modified: 2010-01-28 06:42 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 158084


Attachments
nps snapshot (256.00 KB, application/nps)
2009-11-11 02:06 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2009-11-11 02:06:11 UTC
Build: NetBeans IDE Dev (Build 200911091156)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.1, x86

User Comments:
stefan79: Inspect Members

jsedek: I just opened persistence.xml file

aquaglia: Generating JAP 2.0 Entities

kcundick: Just starting NetBeans up.

j0ni: opening a project.

GUEST: Openning persistence.xml file

GUEST: running a few jUnit tests

GUEST: junit tests with a failure, double clicking on stacktrace at "Test Results" window

GUEST: Starting NetBeans, three projects in the workspace.


Maximum slowness yet reported was 6640 ms, average is 4241
Comment 1 stefan79 2009-11-11 02:06:17 UTC
Created attachment 90772 [details]
nps snapshot
Comment 2 Exceptions Reporter 2009-11-11 02:06:24 UTC
This issue already has 21 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=158084
Comment 3 Jiri Skrivanek 2009-11-11 02:41:36 UTC
While asking for javadoc it ends in native calls (opening jar file). I can't do anything with it in filesystems.
Comment 4 Exceptions Reporter 2009-11-11 08:36:57 UTC
This issue already has 22 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=158084
Comment 5 Jaroslav Tulach 2009-11-12 15:23:55 UTC
Let's talk about
http://statistics.netbeans.org/exceptions/exception.do?id=298197

It is clear that glassfish javaee code is using RequestProcessor.getDefault improperly. The 
org.netbeans.modules.glassfish.javaee.JavaEEServerModuleFactory.ensureGlassFishApiSupport()
shall run once (at most). Not four times in parallel. Let's try to fix this. Then probably reassign back, I'll find another person to fix something.
Comment 6 Vince Kraemer 2009-11-12 16:05:30 UTC
I do not see any gf code in the nps that you pointed at... http://statistics.netbeans.org/exceptions/exception.do?id=298197

Please let me know which nps you want me to look at.
Comment 7 Jaroslav Tulach 2009-11-13 00:49:08 UTC
You need to open the NPS file in NetBeans! Seek for "ensureGlassFishApiSupport" then. You will find four occurences which is about four times more than you shall find.
Comment 8 Vince Kraemer 2009-11-13 08:57:54 UTC
okay.
Comment 9 Vince Kraemer 2009-11-14 09:13:19 UTC
these two commits may help...

http://hg.netbeans.org/web-main/rev/692a7601ad69
http://hg.netbeans.org/web-main/rev/e1a9ce21afe6

let me know
Comment 10 Exceptions Reporter 2009-11-15 03:50:43 UTC
This issue already has 24 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=158084
Comment 11 Quality Engineering 2009-11-16 03:20:35 UTC
Integrated into 'main-golden', will be available in build *200911160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/692a7601ad69
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #176486: prevent over initialization
Comment 12 Vince Kraemer 2009-11-16 08:48:19 UTC
push back to a product/camponent that Jaroslav might see... in case he is looking at the dashboard instead of doing an 'assigned to' query...
Comment 13 Jaroslav Tulach 2009-11-19 00:58:37 UTC
Vince, your commits are like black magic. A little touch here, a little change there and let's pray the behaviour will be better. I have little trust the behaviour will improve using this style of development.

I have asked the glassfish team to stop using RequestProcessor.getDefault(), as that does not seem appropriate for your usecase. Why can't you just read javadoc of RequestProcessor, and rewrite your code to use named RequestProcessor with throughput one? That is not that hard and you would eliminate the parallel execution of ensureGlassFishApiSupport entirely without suspicious and magical preferences mangling.

Please study the RequestProcessor javadoc, change your code and assign back to me.
Comment 14 Vince Kraemer 2009-11-19 03:01:50 UTC
OK.

A quick grep shows 55 uses in 39 files.  That seems like something that I will need to request a waiver for.
Comment 15 Vince Kraemer 2009-11-20 16:43:32 UTC
The initial issue that prompted Jaroslav to assign this issue to me has been dealt with.  See https://netbeans.org/bugzilla/show_bug.cgi?id=176486#c9.

He has raised some additional requirements on this before I can close the issue or transfer it back to him.

Those changes (audit the team's code and replace RequestProcessor.getDefault() with a named RequestProcessor) could be broad ranging and destabilizing at this point.
Comment 16 Vince Kraemer 2010-01-27 09:36:49 UTC
There have been two reports of this slowness from builds created after 2009-11-14 (which is when my fix went into the trunk):  318543 and 321929...

I have looked through both and they appear to be related to the form editor.

So, I am going to reassign this issue to the form editor...
Comment 17 Tomas Pavek 2010-01-28 05:18:43 UTC
Don't know why the two last snapshots appeared under this report - they represent another issue (already fixed in GUI builder), I've moved them there:
http://statistics.netbeans.org/exceptions/detail.do?id=154265
Comment 18 Vince Kraemer 2010-01-28 06:42:02 UTC
good to know.

marking as fixed