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 108557 - Failed to obtain JVMTI capabilities, error code: 98
Summary: Failed to obtain JVMTI capabilities, error code: 98
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 115310 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-30 01:36 UTC by Samaresh Panda
Modified: 2007-09-12 10:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jvm-crash (82.40 KB, application/octet-stream)
2007-06-30 01:37 UTC, Samaresh Panda
Details
logs (43.39 KB, application/octet-stream)
2007-06-30 11:57 UTC, Samaresh Panda
Details
log files (10.21 KB, application/octet-stream)
2007-07-11 00:35 UTC, Samaresh Panda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samaresh Panda 2007-06-30 01:36:28 UTC
Installed NB6.0-M10, JDK1.6.0_01.

I started to CPU profile a unit test class and JVM crashes. See image.
Comment 1 Samaresh Panda 2007-06-30 01:37:12 UTC
Created attachment 44588 [details]
jvm-crash
Comment 2 Samaresh Panda 2007-06-30 01:40:22 UTC
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)
Comment 3 Jiri Sedlacek 2007-06-30 08:07:25 UTC
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.
Comment 4 Samaresh Panda 2007-06-30 11:57:41 UTC
Created attachment 44594 [details]
logs
Comment 5 Samaresh Panda 2007-06-30 12:03:48 UTC
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.
Comment 6 Samaresh Panda 2007-06-30 13:38:16 UTC
I updated netbeans.conf to use jdk1.5.0_11 and now everything works fine.
Comment 7 Jiri Sedlacek 2007-06-30 17:10:28 UTC
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.
Comment 8 Tomas Hurka 2007-07-10 13:19:31 UTC
What JDK was used for profiling?
Comment 9 Samaresh Panda 2007-07-11 00:29:47 UTC
jdk1.6.0_01 was used.
Comment 10 Samaresh Panda 2007-07-11 00:33:48 UTC
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)

Comment 11 Samaresh Panda 2007-07-11 00:35:57 UTC
Created attachment 44915 [details]
log files
Comment 12 Tomas Hurka 2007-07-11 13:59:59 UTC
This is really strange. It looks to me like some kind of JDK and/or OS misconfiguration. Are you able to profile J2SE project?
Comment 13 pbw 2007-07-26 12:04:00 UTC
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)
Comment 14 Samaresh Panda 2007-08-15 19:22:28 UTC
I'm sorry, are you waiting for my input on this? If so, let me know how can I help you?
Comment 15 Tomas Hurka 2007-08-18 20:28:12 UTC
We are not able to reproduce it. Please provide steps how to reproduce it. Thanks.
Comment 16 Tomas Hurka 2007-08-20 09:53:20 UTC
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.
Comment 17 Tomas Hurka 2007-08-20 17:02:27 UTC
Fixed in trunk.
Comment 18 Alexander Kouznetsov 2007-09-08 13:12:29 UTC
samaresh, could you please verify this issue?
Comment 19 Tomas Hurka 2007-09-12 10:10:24 UTC
*** Issue 115310 has been marked as a duplicate of this issue. ***