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 233061 - Invoking "Tools | Servers" for the first time freezes IDE for ~30 seconds
Summary: Invoking "Tools | Servers" for the first time freezes IDE for ~30 seconds
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-19 11:38 UTC by Stepan Zebra
Modified: 2013-07-23 02:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (93.33 KB, text/plain)
2013-07-19 11:38 UTC, Stepan Zebra
Details
snapshot (234.63 KB, application/x-netbeans-profiler-npss)
2013-07-19 11:39 UTC, Stepan Zebra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Zebra 2013-07-19 11:38:48 UTC
Product Version = NetBeans IDE Dev (Build 201307182300)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

When "Tools | Servers" is invoked for the first time, IDE becomes unresponsive for about half a minute, before the Server manager window finally shows up.
Comment 1 Stepan Zebra 2013-07-19 11:38:51 UTC
Created attachment 137440 [details]
IDE log
Comment 2 Stepan Zebra 2013-07-19 11:39:51 UTC
Created attachment 137441 [details]
snapshot
Comment 3 TomasKraus 2013-07-19 12:04:04 UTC
It's getServerState() from CommonServerSupport class.
This is executing
RequestProcessor.Task refresh(String expected, String unexpected) where GlassFishState.monitor(instance) was called.

This monitor method may currently cause delay. I know about it. But it should not wait more than 5 seconds!

private static final int INIT_MONITORING_TIMEOUT = 5000;
...
                    synchronized (listener) {
                        // Guard against spurious wakeup.
                        while (!listener.isWakeUp()
                                && (System.currentTimeMillis()
                                - startTime < INIT_MONITORING_TIMEOUT)) {
                            listener.wait(
                                    System.currentTimeMillis() - startTime);
                        }

So 26 seconds in Object.wait() is for sure wrong.
Comment 4 TomasKraus 2013-07-19 22:46:17 UTC
I already have fix in my environment.
Comment 5 TomasKraus 2013-07-22 12:29:46 UTC
Checked into web-main:
----------------------
changeset:   258602:39e85cde8e69
summary:     #233061 - Freeze shall not be longer than 5 seconds,
             fixed bug in timeout counting
Comment 6 Quality Engineering 2013-07-23 02:38:46 UTC
Integrated into 'main-silver', will be available in build *201307222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/39e85cde8e69
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #233061 - Freeze shall not be longer than 5 seconds, fixed bug in timeout counting