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.
Installed NB6.0-M10, JDK1.6.0_01. I started to CPU profile a unit test class and JVM crashes. See image.
Created attachment 44588 [details] jvm-crash
Log from the console: Profiler Agent: Initializing... Profiler Agent Error: Failed to obtain JVMTI capabilities, error code: 98 Assertion failed: res == JVMTI_ERROR_NONE, file ..\src-jdk15\common_functions.c, line 74 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. java.io.FileNotFoundException: D:\nbsrc\trunk\xml\axi\junitvmwatcher729400261.properties (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileReader.<init>(FileReader.java:55) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1028) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:817) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1657) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:764) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:256) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)
Could you please attach full idelog (<nbuserdir>\var\log\messages.log) and describe how concretely you started the profiling and which profiling settings were used? Are you able to debug the same test using the same JDK without problems? Thanks.
Created attachment 44594 [details] logs
To be precise, I was trying to performance (CPU) profile SchemaTransformPerfTest.java in xml/axi module. I installed M10, opened the project, right-clicked on the test and said, profile file. It brings up the profiler, I chose CPU profiling+entire application and then my JVM crashes. I am still trying to find a way to get around this problem, because I need to fix one of my P1. See 100520.
I updated netbeans.conf to use jdk1.5.0_11 and now everything works fine.
Thanks for the additional information! It might be a JDK bug, we will try to reproduce it. Maybe using "Part of Application" mode instead of "Entire Application" could help.
What JDK was used for profiling?
jdk1.6.0_01 was used.
On Windows2000, JDK1.6.0_01 I made a fresh build from trunk, started with a fresh userdir, opened xml/axi project to profile the same unit test. The profiler crashes with the following message in the junit console. Also see the IDE log attached. I have no idea why it would look for junitvmwatcher492359101.properties file? ---------------------- init-tasks: default.init: Updating property file: E:\netbeans\trunk\nbbuild\netbeans\moduleCluster.properties common-init: basic-init: files-init: jdk-5-check: build-init: Loading module list from E:\netbeans\trunk\nbbuild\nbproject\private\scan-cache-standard.ser init: test-preinit: test-lib-init: test-init: compile: jar-prep: jar: Building jar: E:\netbeans\trunk\nbbuild\netbeans\ide8\modules\org-netbeans-modules-xml-axi.jar test-dep-build: do-test-build: Deleted 58 out of date files in 0 seconds Compiling 32 source files to E:\netbeans\trunk\xml\axi\build\test\unit\classes Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Building jar: E:\netbeans\trunk\nbbuild\build\testdist\unit\ide8\org-netbeans-modules-xml-axi\tests.jar Building jar: E:\netbeans\trunk\nbbuild\build\testdist\unit\ide8\org-netbeans-modules-xml-axi\tests.jar test-build-datajar: test-build: profile-test-single-nb: Profiler agent JVM arguments stored in property profiler.jvmargs Extra JVM arguments: -J-XX:+HeapDumpOnOutOfMemoryError -J-XX:HeapDumpPath=E:\netbeans\trunk\xml\axi\nbproject\private\profiler Profiler Agent: Initializing... Profiler Agent Error: Failed to obtain JVMTI capabilities, error code: 98 Assertion failed: res == JVMTI_ERROR_NONE, file ..\src-jdk15\common_functions.c, line 74 abnormal program termination java.io.FileNotFoundException: E:\netbeans\trunk\xml\axi\junitvmwatcher492359101.properties (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileReader.<init>(FileReader.java:55) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1028) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:817) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1657) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:764) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:256) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129) Test org.netbeans.modules.xml.axi.SchemaTransformPerfTest FAILED (crashed) E:\netbeans\trunk\nbbuild\templates\common.xml:570: Some tests failed; see details above. BUILD FAILED (total time: 10 seconds)
Created attachment 44915 [details] log files
This is really strange. It looks to me like some kind of JDK and/or OS misconfiguration. Are you able to profile J2SE project?
I'm getting something like this, and I'm not profiling, just running junit tests. The tests have been built from scratch in 6.0 (Build 200707250000) running JDK 1.6.0_01. Here's the output. init: deps-jar: compile: Compiling 2 source files to /home/pbw/netbeans/darcs/LineFold/build/test/classes compile-test: Testsuite: au.id.pbw.linefold.ParagraphFactoryTest Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.362 sec Testcase: warning(junit.framework.TestSuite$1): FAILED No tests found in au.id.pbw.linefold.ParagraphFactoryTest junit.framework.AssertionFailedError: No tests found in au.id.pbw.linefold.ParagraphFactoryTest java.io.FileNotFoundException: /home/pbw/netbeans/darcs/LineFold/junitvmwatcher1150920993.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileReader.<init>(FileReader.java:55) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1028) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:817) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1657) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:764) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:256) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129) Test au.id.pbw.linefold.ParagraphFactoryTest FAILED (crashed) test-report: /home/pbw/netbeans/darcs/LineFold/nbproject/build-impl.xml:518: Some tests failed; see details above. BUILD FAILED (total time: 1 second)
I'm sorry, are you waiting for my input on this? If so, let me know how can I help you?
We are not able to reproduce it. Please provide steps how to reproduce it. Thanks.
Ok, I found what is wrong. This problem (Failed to obtain JVMTI capabilities, error code: 98) happens if native library for JDK6 is loaded into JDK 5 VM. This bug happens only for NB modules, which are profiled on different JDK than default one. Originally there was not possible to select JDK for NB module, so profiler used default JDK when profiling NB modules. This was changed when issue #63541 was fixed. There is an easy workaround - use default JDK for profiling NB modules.
Fixed in trunk.
samaresh, could you please verify this issue?
*** Issue 115310 has been marked as a duplicate of this issue. ***