Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Bugreport: Agent aborts on "capture memory snapshot"

Moderators: Vladimir Kondratyev, Anton Katilin

Bugreport: Agent aborts on "capture memory snapshot"

Postby gon » Thu Oct 09, 2014 10:51 pm

Client: YourKit Java Profiler 2014 build 14108 64-bit, running on win8.1 64bit
Agent: yjp-2014-build-14108-linux.tar.bz2, running on some 64bit ubuntu

step 1:
on server, start java application as documented (with additional jvm argument)

step 2:
on windows client, start yourkit gui, connect to remote host using hostname (default port 10001)
connection works (connecting on another hostname or portname fails).

step 3:
click large button "Capture Memory Snapshot"
keeping default options (yourkit format), then not transferring the file, but leaving on server (button on the right).
it starts counting, and at around 20% it aborts with the error as this person wrote http://answer.techwikihow.com/1025198/k ... iling.html (the question got removed on stackoverflow)

"There's no application running at "Host name" with profiler agent configured to listen on port "Port number"or profiler agent is incompatible with current version of profiler"
Then reason is "null".

This message must be wrong. Because connection works, and it starts. And if the version was incompatible, it could tell before starting. And as written above I'm using the same software versions.

After that the windows gui is left unusable, see http://i.imgur.com/W2jlkuB.png all buttons are grey.

The server still listens on the port, but closes telnet instantly:

telnet myhost 10001
Trying xxx...
Connected to myhost.
Escape character is '^]'.
Connection closed by foreign host.

the disconnect comes instantly.

All I can do from here is stop my java app and start over.
I have done it 2x, exact same behavior and result.

Does the agent generate an error log somewhere?
gon
 
Posts: 3
Joined: Thu Oct 09, 2014 10:34 pm

Re: Bugreport: Agent aborts on "capture memory snapshot"

Postby Anton Katilin » Fri Oct 10, 2014 6:56 am

Hi,

The agent log file is ~/.yjp/log/<session name>-<pid>.log. Could you please provide its content.

You shouldn't use telnet to check whether the agent is alive. Instead, try to close the existing "terminated" tab and then connect to the remote application again.

I don't know the reason of the problem in your particular case before seeing the log, but please consider the following article: http://www.yourkit.com/docs/kb/out_of_memory.jsp
It describes what to do if snapshot capture fails due to an out of memory error.

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

Re: Bugreport: Agent aborts on "capture memory snapshot"

Postby Anton Katilin » Fri Oct 10, 2014 7:02 am

P.S. If Java crashed, it could have created an error log file hs_err_pid<pid>.log. An excerpt from Java documentation:

When a fatal error occurs an error log is created in the file hs_err_pid<pid>.log (where <pid> is the process id of the process). Where possible the file is created in the working directory of the process. In the event that the file cannot be created in the working directory (insufficient space, permission problem, or other issue) then the file is created in the temporary directory for the operating system. On Solaris and Linux the temporary directory is /tmp. On Windows the temporary directory is specified by the value of the TMP environment variable, or if that is not defined, the value of the TEMP environment variable.

Could you please provide that log file content too, if created.
Anton Katilin
 
Posts: 5649
Joined: Wed Aug 11, 2004 8:37 am

Re: Bugreport: Agent aborts on "capture memory snapshot"

Postby gon » Fri Oct 10, 2014 12:24 pm

Thank you for your reply. Here is info from the logs.

Directory listing of ~/.yjp/log is here http://nopaste.info/e9ce7533ec.html there are many files created within minutes with the same file size.

I don't think Java crashed, there is no hs_err_pid<pid>.log.

I mentioned the telnet because: after the abort, I closed the yourkit gui, reopened it, but could not connect anymore, it said it's not listening. But as shown in telnet, something still listens but disconnects instantly.

Here's the content of one of the 8568 byte files, namely: WrapperSimpleApp-30983.log see http://nopaste.info/84ff11f070.html

WrapperSimpleApp-23438.log is larger; it starts with the same content, then has this additional output: http://nopaste.info/009d7e7715.html (see vmDeath at the end).

Some more files:
Attach-24976.log => http://nopaste.info/1180833b25.html
java-25113.log => http://nopaste.info/2141ee0ce4.html
yjp-24536.log => http://nopaste.info/a24058d430.html

My app is running with Tanuki.
gon
 
Posts: 3
Joined: Thu Oct 09, 2014 10:34 pm

Re: Bugreport: Agent aborts on "capture memory snapshot"

Postby gon » Fri Oct 10, 2014 12:45 pm

Some more info regarding the memory:

The app is configured to have 10GB right from the start, like so:

# Initial Java Heap Size (in MB)
wrapper.java.initmemory=10240
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=10240

At the time of starting the memory dump, around 2GB were in use. Therefore the JVM had plenty of free memory for instrumenting.

The dump abort happened after about a minute iirc.
gon
 
Posts: 3
Joined: Thu Oct 09, 2014 10:34 pm

Re: Bugreport: Agent aborts on "capture memory snapshot"

Postby Anton Katilin » Fri Oct 10, 2014 6:27 pm

Instead of guessing which log file it might be, could you please explicitly pick up the appropriate one. It's easy. As I wrote, the log file name contains the profiled application's PID in its name. I suppose it should not make a problem to learn the PID of the profiled application.
Anton Katilin
 
Posts: 5649
Joined: Wed Aug 11, 2004 8:37 am

Re: Bugreport: Agent aborts on "capture memory snapshot"

Postby Anton Katilin » Mon Nov 17, 2014 2:08 pm

An update:

This issue must have been fixed in the latest build 14112:
http://www.yourkit.com/download
Anton Katilin
 
Posts: 5649
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 19 guests

cron