EAP 602: JVMTI error 98 on Solaris

Questions about YourKit Java Profiler
Post Reply
mschulz
Posts: 17
Joined: Mon May 16, 2005 8:40 pm

EAP 602: JVMTI error 98 on Solaris

Post by mschulz »

I am getting this error on Solaris 9, Java 1.5.0, Tomcat 4.1.30:

Picked up JAVA_TOOL_OPTIONS: -agentlib:yjpagent=sessionname=Tomcat
[YourKit Java Profiler 4.5 EAP build 602] Using JVMTI
ERROR: JVMTI error err=98(JVMTI_ERROR_NOT_AVAILABLE) in JVMTI_Agent.cpp:447
Assertion failed: false, file Utils.cpp, line 26

Any ideas?

Thx.
mschulz
Posts: 17
Joined: Mon May 16, 2005 8:40 pm

Post by mschulz »

Same story with 1.5.0_03:

Picked up JAVA_TOOL_OPTIONS: -agentlib:yjpagent=sessionname=Tomcat
[YourKit Java Profiler 4.5 EAP build 602] Using JVMTI
ERROR: JVMTI error err=98(JVMTI_ERROR_NOT_AVAILABLE) in JVMTI_Agent.cpp:447
Assertion failed: false, file Utils.cpp, line 26
java -version
^C$ java -version
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Server VM (build 1.5.0_03-b07, mixed mode)
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hmm, very strange indeed.

This error happens when JVM is asked to turn on some profiling capabilities, and looks like it has some internal problems.

What is the exact output of java -version?

Are there any other VM parameters in the command line of profiled application (e.g. explicit choice of garbage collector)?

What does uname -a prints?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

I'm sorry, I didn't notice that you have already provided the 'java -version' output...
mschulz
Posts: 17
Joined: Mon May 16, 2005 8:40 pm

Post by mschulz »

hmmh, yes, the GC and related options are quite elaborate:

-server
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC
-XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled
-XX:SurvivorRatio=3 -XX:MaxTenuringThreshold=4
-XX:MaxPermSize=64m -XX:PermSize=64m
-Xms384m -Xmx512m -XX:MaxNewSize=128m

Any suggestions what could be interfering here?

Martin
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Please try removing -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSPermGenSweepingEnabled

JVM cannot do memory profiling with concurrent mark sweep GC, at least Java 5.0.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

At least everything should be OK if you leave only "-Xms384m -Xmx512m"
mschulz
Posts: 17
Joined: Mon May 16, 2005 8:40 pm

Post by mschulz »

Thanks, CMS GC seems to conflict with JVMTI.
After removing the CMS related options, everythings wroks as expected.

I could use -XX:+UseParallelGC, though.
brettb
Posts: 5
Joined: Mon Nov 28, 2005 3:20 pm

Post by brettb »

This is a big problem for us - we have production systems which require CMS for performance reasons, and we'd like to have YJP installed.

Is this a limitation with JDK 1.5? Is there any workaround, and / or is Sun working on a fix?
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

By the current JVM design UseConcMarkSweepGC blocks all profiling capabilities. Unfortunately there is no workaroung for this situation. We heard that Mustang will bring some changes, but this is not official information.
brettb
Posts: 5
Joined: Mon Nov 28, 2005 3:20 pm

Post by brettb »

Thanks for the info.

By "blocks all profiling capabilities" I assume you mean both JVMTI and JVMPI? I haven't got around to trying JVMPI with CMS yet in our labs.

If you have any reference to Mustang's changes, please let me know. We have some contacts at Sun to which we can request this capability.
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

This bug is fixed in Mustang
http://bugs.sun.com/bugdatabase/view_bu ... id=6278106

I've just tried latest Mustang buid #61 (https://mustang.dev.java.net) and JVMTI agent works fine.
Post Reply