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 159353

Summary: ArrayIndexOutOfBoundsException: 46639
Product: profiler Reporter: theshadow27 <theshadow27>
Component: BaseAssignee: J Bachorik <yardus>
Status: RESOLVED FIXED    
Severity: blocker CC: junqueira_raphael, mmirilovic, ovk, rkamradt
Priority: P3 Keywords: TOMCAT
Version: 6.x   
Hardware: Macintosh   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=100720
Issue Type: DEFECT Exception Reporter: 100720
Attachments: Profile captured after killing tomcat
Tail of logs/catalina.2009-02-27.log
stacktrace
stacktrace

Description theshadow27 2009-02-27 18:52:22 UTC
Race condition (100% x2 CPU usage) when deploying web application 

Trying to deploy web application (via right click on project -> deploy) the logs (from inside of netbeans, and
catalina.out) show tomcat started:

INFO: Server startup in 15270 ms

However the IDE indicated "Waiting for tomcat..." and did not deploy. CPU went to 100% and stayed there. I tried to get
a CPU profile, but the entire UI stopped responding. I manually closed Tomcat (kill + PID via terminal) instead of NB to
at least get the exception report in. The cpu usage dropped, profile screen loaded. All operation back to normal. 

Three possible causes, but I don't have enough info to make the call:
1) OS X <-> Tomcat binary communication  
2) Webapp deployment code
3) Tomcat exception handling

Tomcat is version 6.0.18. NB build 200902231810, downloaded in the 6.7 M2 distro.
Comment 1 theshadow27 2009-02-27 18:53:56 UTC
Created attachment 77488 [details]
Profile captured after killing tomcat
Comment 2 theshadow27 2009-02-27 18:55:47 UTC
Created attachment 77489 [details]
Tail of logs/catalina.2009-02-27.log
Comment 3 theshadow27 2009-02-27 18:59:27 UTC
Run-Deploy output

init:
deps-module-jar:
init:
deps-jar:
compile:
jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
BUILD STOPPED (total time: 1 minute 15 seconds)
Comment 4 Tomas Hurka 2009-04-08 12:54:44 UTC
Milestone cleanup: future->next
Comment 5 Marian Mirilovic 2009-09-07 14:40:48 UTC
Build: NetBeans IDE Dev (Build 200909040632)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.0-b15, Java(TM) SE Runtime Environment, 1.6.0_14-b07
OS: Linux, 2.6.28-15-generic, amd64

User Comments: 
tried to open snapshot from issue 168994

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 793
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:413)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
Comment 6 Marian Mirilovic 2009-09-07 14:40:51 UTC
Created attachment 87220 [details]
stacktrace
Comment 7 Exceptions Reporter 2009-09-07 14:40:58 UTC
This issue already has 7 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=100720
Comment 8 Oleg Khokhlov 2009-09-08 11:56:29 UTC
Build: NetBeans IDE Dev (Build 200909071948)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows XP, 5.1, x86

User Comments: 
tried to open nps file

Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 793
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:413)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
        at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.addFlatProfTimeForNode(CPUCCTContainer.java:408)
Comment 9 Oleg Khokhlov 2009-09-08 11:56:33 UTC
Created attachment 87259 [details]
stacktrace
Comment 10 Exceptions Reporter 2009-09-08 11:56:38 UTC
This issue already has 8 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=100720
Comment 11 Exceptions Reporter 2009-10-29 14:23:44 UTC
This issue already has 9 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=100720
Comment 12 J Bachorik 2011-10-04 09:04:17 UTC
Fixed

changeset   : 203374:18b2e93c0f47
tags        : tip 
author      : Jaroslav Bachorik <yardus@netbeans.org>
date        : Tue Oct 04 10:55:59 CEST 2011

Generating a new profiler snapshot should be carried out under the status lock thus preventing the possibility of inconsistency between the instrumented method count stored in the snapshot and method ids contained there.
Comment 13 Quality Engineering 2011-10-07 14:37:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/18b2e93c0f47
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: Generating a new profiler snapshot should be carried out under the status lock thus preventing the possibility of inconsistency between the instrumented method count stored in the snapshot and method ids contained there.
Issue #159353 - ArrayIndexOutOfBoundsException: 46639