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 58952 - lock in JMManager.waitScanFinished
Summary: lock in JMManager.waitScanFinished
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords: T9Y
: 59169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-16 17:14 UTC by L Martinek
Modified: 2007-09-26 09:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (9.24 KB, text/plain)
2005-05-16 17:31 UTC, L Martinek
Details
messages.log (23.59 KB, text/plain)
2005-05-24 16:45 UTC, L Martinek
Details
messages.log with debug logs (277.79 KB, text/plain)
2005-06-01 17:02 UTC, L Martinek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description L Martinek 2005-05-16 17:14:13 UTC
From build 200505121800 automated tests started to hang. At the beginning of
every test JMManager.waitScanFinished is called, see Thread-4 in attached thread
dump. It's called to avoid starting tests during scanning after IDE start.

In my testsuite, several tests are executed without problem. Last but one test
creates new EAR project. This test is successfull. Last test should create
another EAR project, but before it can do it the test hangs. It always hangs in
this tests on all lab machines. 

Build 200505111800 worked fine.
Comment 1 L Martinek 2005-05-16 17:31:09 UTC
Created attachment 22152 [details]
Thread dump
Comment 2 Jan Becicka 2005-05-17 11:13:16 UTC
> In my testsuite

What is "your testsuite". How can I run it?
Comment 3 L Martinek 2005-05-17 13:24:14 UTC
It's performance tests for module j2ee, suite gui.MeasureJ2EEActions, testcase
gui.action.CreateJ2EEProject.testCreateStandaloneEnterpriseApplicationProject().
You can run it in nb_all/j2ee/test by "ant -Dxtest.testtype=qa-performance
-Dxtest.attribs=measure_actions". First tastbag will only setup IDE (open
projects etc.), actual tests will run in second (and next) testbag. Same testbag
with tests is executed three times to get accurate values.
Comment 4 Jan Becicka 2005-05-17 13:45:29 UTC
This testsuite seems to be broken.

BUILD FAILED
D:\sources\trunk\j2ee\test\build.xml:31: The following error occurred while
executing this line:
D:\sources\trunk\xtest\lib\module_harness.xml:339: The following error occurred
while executing this line:
D:\sources\trunk\j2ee\test\build-qa-performance.xml:22: The following error
occurred while executing this line:
D:\sources\trunk\performance\performancetestutilities\dist\build-performance-tests.xml:19:
Cannot find D:\sources\nb_all/nbbuild/templates/xtest-qa-functional.xml imported
from
D:\sources\trunk\performance\performancetestutilities\dist\build-performance-tests.
xml
Comment 5 Jan Becicka 2005-05-17 13:56:44 UTC
There are lot of hardcoded paths in performance suite. Please fix it.
Comment 6 L Martinek 2005-05-17 14:21:04 UTC
I forgot to say that you have to check out performance module, because I depend
on it, but apparently you have it. Performance utilities from performance module
assumes that modules are in nb_all directory. I will fire a bug against
performance module, but meanwhile set property nball.dir, so for you I guess it
will be 

ant -Dxtest.testtype=qa-performance -Dxtest.attribs=measure_actions
-Dnball.dir=D:\sources\trunk
Comment 7 Jan Becicka 2005-05-17 14:28:21 UTC
Still does not work

     [java] BUILD FAILED
     [java] D:\sources\trunk\nbbuild\templates\xtest.xml:49: The following error
occurred while executing this line:
     [java] D:\sources\trunk\xtest\lib\module_harness.xml:339: The following
error occurred while executing this line:
     [java] D:\sources\trunk\performance\test\build-qa-functional.xml:22: The
following error occurred while executing this line:
     [java]
D:\sources\trunk\performance\performancetestutilities\dist\build-performance-tests.xml:19:
Cannot find D:\sources\nb_all/nbbuild/templates/xtest-qa-functional.xml imported
from
D:\sources\trunk\performance\performancetestutilities\dist\build-performance-tests.xml

     [java] Total time: 5 seconds

BUILD FAILED
D:\sources\trunk\j2ee\test\build.xml:31: The following error occurred while
executing this line:
D:\sources\trunk\xtest\lib\module_harness.xml:339: The following error occurred
while executing this line:
D:\sources\trunk\j2ee\test\build-qa-performance.xml:64: Java returned: 1

Total time: 10 seconds
Comment 8 L Martinek 2005-05-17 14:40:56 UTC
I fixed it and commited to CVS. Please update modules performance and j2ee. Now
you don't have to set property nball.dir.
Comment 9 Jan Becicka 2005-05-17 15:42:54 UTC
Thanks. BTW j2ee.appserver.path is also hardcoded.

I have an observation - there is no visible scanning progress bar during tests.
What do you do with the IDE to supress scanning dialog?


Comment 10 L Martinek 2005-05-17 17:05:05 UTC
Mariane, do you know why scanning progress bar is missing. When I executed j2ee
functional test there was visible scanning progress bar. It's strange, because I
use the same way for opening projects in performance or functional tests. When I
executed your performance tests, scanning progress bar was only visible during
scanning jEdit (which was opened by xtest), but was missing during scanning
other projects.
Comment 11 Marian Mirilovic 2005-05-18 13:42:45 UTC
Honza,
which test do you mean ?

Libor,
I have no idea, as I know we do nothing to hide scanning progress bar.
Comment 12 Jan Becicka 2005-05-18 15:21:24 UTC
I mean Libor's test: nb_all/j2ee/test
"ant -Dxtest.testtype=qa-performance -Dxtest.attribs=measure_actions"
Comment 13 Jan Becicka 2005-05-23 14:42:43 UTC
*** Issue 59169 has been marked as a duplicate of this issue. ***
Comment 14 Jan Becicka 2005-05-24 10:20:19 UTC
Can you attach also ide.log? I assume there could be some assertions there.
Comment 15 L Martinek 2005-05-24 16:45:15 UTC
Created attachment 22291 [details]
messages.log
Comment 16 L Martinek 2005-05-24 16:45:54 UTC
There is no error or message in messages.log.
Comment 17 Jan Becicka 2005-05-27 14:34:59 UTC
Attempt to fix:

Checking in ProgressDisplayer.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/ProgressDisplayer.java,v 
<--  ProgressDisplayer.java
new revision: 1.2; previous revision: 1.1
done

Please confirm, that this patch helped. If yes, please close this issue.
Otherwise we will add additional logging to the code.
Comment 18 L Martinek 2005-05-31 08:22:26 UTC
It didn't help. It still hangs in waitScanFinished. I tried it on build
200505291800.
Comment 19 Jan Becicka 2005-05-31 15:06:19 UTC
I added some debug messages.
Checking in JMManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v  <-- 
JMManager.java
new revision: 1.109; previous revision: 1.108
done

Please run your tests with -Djavacore.debug.scanning=true and attach the output.
Thanks.
Comment 20 L Martinek 2005-06-01 17:01:35 UTC
Attaching log. After test hang log still grew so I had to terminate IDE.
Comment 21 L Martinek 2005-06-01 17:02:59 UTC
Created attachment 22436 [details]
messages.log with debug logs
Comment 22 Jan Becicka 2005-06-01 18:10:13 UTC
Thanks for the log. There must be some race condition in
JMManager.shouldOpenProgress(). I think I have a fix. I'll commit it tomorrow.
Comment 23 Jan Becicka 2005-06-02 09:36:39 UTC
Hopefully fixed. Please verify.
Checking in ProgressDisplayer.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/ProgressDisplayer.java,v 
<--  ProgressDisplayer.java
new revision: 1.3; previous revision: 1.2
done
Checking in JMManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v  <-- 
JMManager.java
new revision: 1.110; previous revision: 1.109
done
Comment 24 L Martinek 2005-06-03 12:13:17 UTC
I verified it in build 200506021800 and it works now so you can mark this issue
as fixed.
Comment 25 Jan Becicka 2005-06-03 12:23:54 UTC
Fixed.
Comment 26 L Martinek 2005-06-07 14:07:38 UTC
verified
Comment 27 Quality Engineering 2007-09-20 12:50:22 UTC
Reorganization of java component