Running with ypagent causes error that does occur when run w

Questions about YourKit Java Profiler
Post Reply
paultaylor
Posts: 3
Joined: Tue Sep 04, 2018 1:59 pm

Running with ypagent causes error that does occur when run w

Post by paultaylor »

Running with ypagent causes error that does occur when run without it, how can that be ?

Please see full details at

https://stackoverflow.com/questions/521 ... -resourcve
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

You're using unsupported profiler version 2017.02.

Please use the latest version 2018.04:
https://www.yourkit.com/download/
paultaylor
Posts: 3
Joined: Tue Sep 04, 2018 1:59 pm

Re: Running with ypagent causes error that does occur when r

Post by paultaylor »

Hi I'm using Java 9, and when I used on earlier version of program it worked fine. I would like to know why it is not working before spending money on a newer version that may exhibit the same problem
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

Do you mean it worked with a version earlier than 2017? Perhaps some new functionality was added which no longer works with that Java 9 version.

Anyway, we support only current version, and we cannot investigate or fix any issues with older versions.

Could you please try the latest version's agent. It doesn't require a license key, so it's just a matter of changing the agent path in the command line.

If 2018.04 neither works, please provide the agent log.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

By the way, Java 9 itself, not being an LTE release, has reached its EOL too, and it's recommended to use Java 10 instead, then Java 11 LTE when available.
paultaylor
Posts: 3
Joined: Tue Sep 04, 2018 1:59 pm

Re: Running with ypagent causes error that does occur when r

Post by paultaylor »

Anton Katilin wrote:Do you mean it worked with a version earlier than 2017? Perhaps some new functionality was added which no longer works with that Java 9 version.

Anyway, we support only current version, and we cannot investigate or fix any issues with older versions.

Could you please try the latest version's agent. It doesn't require a license key, so it's just a matter of changing the agent path in the command line.

If 2018.04 neither works, please provide the agent log.
No I meant it worked two weeks ago with same version of Java, the application has had some changes since then but workas fine with Java 9 it only fails when ran with the -agentpath. I have since temporarily taken out the trivial call to ResourceBundle and now it works, but makes no sense to me

I will investiagte 2018.04 when I have time since I think I did originally try to use lates version on this linux black box and these seemed to be an issue, but now I cant remember the details of that.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

OK, we're looking forward to hearing from you the results of testing the app with v2018.04.
fransflippo
Posts: 2
Joined: Sun Sep 09, 2018 6:29 pm

Re: Running with ypagent causes error that does occur when r

Post by fransflippo »

I am having similar issues running a Thorntail (formerly Wildfly Swarm) hollow jar with the YourKit agent.

Without the agent, it runs as normal. With it, suddenly the Java Util Logging output is different, and it reports some warnings:

Code: Select all

WARNING: Could not load service class org.wildfly.swarm.cdi.config.deployment.InjectConfigViewExtension
WARN: WELD-001471: Interceptor method postConstruct defined on class org.wildfly.swarm.container.runtime.wildfly.ShrinkWrapFileSystem is not defined according to the specification. It should not throw java.io.IOException, which is a checked exception.
	at org.wildfly.swarm.container.runtime.wildfly.ShrinkWrapFileSystem.postConstruct(ShrinkWrapFileSystem.java:0)
  StackTrace
Sep 09, 2018 8:24:46 PM org.jboss.weld.interceptor.reader.InterceptorMetadataUtils isValidTargetClassLifecycleInterceptorMethod
Finally, it bombs out with a NullPointerException:

Code: Select all

Caused by: java.lang.NullPointerException
	at org.wildfly.swarm.logging.runtime.EarlyLoggingCustomizer.customize(EarlyLoggingCustomizer.java:44)
This is on a recently downloaded YourKit v2018.04.


I would expect the code to function the same, just slower, when the agent is used.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

Hello,

How did you enable profiling? Please use the wizard to apply the recommended startup options:
https://www.yourkit.com/docs/java/help/ ... remote.jsp
Please choose the "Arbitrary Java application" option if no other option matches.

If this doesn't help, could you please send the profiler agent log file <user home>/.yjp/log/<session name>-<pid>.log to [email protected]

Best regards,
Anton
fransflippo
Posts: 2
Joined: Sun Sep 09, 2018 6:29 pm

Re: Running with ypagent causes error that does occur when r

Post by fransflippo »

I've sent an e-mail with log file and instructions to reproduce with a stock Thorntail web hollow JAR.
Anton Katilin wrote:Hello,

How did you enable profiling? Please use the wizard to apply the recommended startup options:
https://www.yourkit.com/docs/java/help/ ... remote.jsp
Please choose the "Arbitrary Java application" option if no other option matches.

If this doesn't help, could you please send the profiler agent log file <user home>/.yjp/log/<session name>-<pid>.log to [email protected]

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

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

Thank you. We answered your email.

After we pinpoint the issue and find a solution, we'll post an update here.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Running with ypagent causes error that does occur when r

Post by Anton Katilin »

Update: the agent startup option "delay=10000" solves the problem for us.

See detail:
https://www.yourkit.com/docs/java/help/ ... .jsp#delay

Could you please check and confirm.
Post Reply