Application crash while performing "Capture snapshot&qu

Questions about YourKit Java Profiler
Post Reply
jsacha
Posts: 6
Joined: Sat Sep 11, 2004 9:39 pm

Application crash while performing "Capture snapshot&qu

Post by jsacha »

I was running IDEA 5.0.1 and Profiler 5.0.1 on Windows XP.
1) Started profiling application and created first snapshot after main frame was shown and application was idle.
2) Loaded data into application which triggered some processing.
3) After processing finished attempted to create another snapshot. First there was a long delay, with progress bar about 10% then application crashed with message:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (0xe06d7363), pid=3948, tid=3268
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode)
# Problematic frame:
# C [kernel32.dll+0x1eb33]
#
# An error report file with more information is saved as hs_err_pid3948.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#

The profiler reported that application is no longer running.

Please note that application is running fine without profiler.
jcompagner
Posts: 32
Joined: Sat Sep 11, 2004 9:18 am

Post by jcompagner »

i can reproduce these things also very easy:

# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (53484152454432554E54494D450E43505002FA), pid=3196, tid=2796
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_03-b07 mixed mode)
# An error report file with more information is saved as hs_err_pid3196.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp

this happens pretty much all the times i start
method invocations or recording allocations

(So the 2 big once a memory snapshot works fine)
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

We need JVM crash log (hs_err_pid3196.log file)
jcompagner
Posts: 32
Joined: Sat Sep 11, 2004 9:18 am

Post by jcompagner »

just send an email to [email protected] with 2 dumps
one for method invocations and one for record allocations.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hello Johan

Thank you for the dumps.

I can see that the crash does not crash happen inside the agent code, but every time inside some Java library native method. This seems to be a JVM issue.

Could you please provide a reproducible example to demonstrate the crash? Unfortunately we don't know how to reproduce the problem here ourselves.

I can suggest to upgrade to Java 1.5.0_05. According to your dumps, you were using 1.5.0_03. Probably this helps.

The first crash sent by jsacha (the first post in this thread) happened with 1.5.0_05. I cannot say whether this is the same issue. I would appreciate a lot if jsasha could post the full crash log as well.

Best regards,
Anton
jcompagner
Posts: 32
Joined: Sat Sep 11, 2004 9:18 am

Post by jcompagner »

upgrading to 1.5_05 seem to do the trick at my place.

The invocation count seems to be improved in speed yes, do you know that this improvements also reflects on the time that is reported?
I guess that it is now more accurate then before?
Because in the old profiling invocation counts the time that it did take where not really accurate because the time spend to count it was taken into account.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

The invocation count seems to be improved in speed yes, do you know that this improvements also reflects on the time that is reported?
I guess that it is now more accurate then before?
Because in the old profiling invocation counts the time that it did take where not really accurate because the time spend to count it was taken into account.
The times are as well improved. This is not because of the new method counting, we rather use different means for time measuring. In particular, profiling results recorded on Windows should be close to the CPU time reported for the program in Windows Task Manager.

But anyway, since counting impacts profiled application, times will be less adequate (i.e. less close to the result of the programm running with no profiling at all) than the times measured alone.
jcompagner
Posts: 32
Joined: Sat Sep 11, 2004 9:18 am

Post by jcompagner »

but in the previous version when i tested it
I tried it 2 ways:

one with youre kit and method invokes
one with just doing what yourkit does in the code
So recording the time the method takes and recording the counts the method hits.

if you do that in javacode directly. you won't notice any difference ant the total method times was almost nothing. But with yourkit the method did take quite some time because it was hit so often.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

I'm sorry, I don't understand your recent post. Could you please provide more detail.
jsacha
Posts: 6
Joined: Sat Sep 11, 2004 9:39 pm

Post by jsacha »

I have sent two dumps to and screenshots to [email protected].
I am able to reproduce the problem when applications makes large memory allocations. There are large chunks ~24MB and large amount of small chanks about 12,000,000 of ~12B chanks. There is abut 419Mb memory allocated when I make capture that crashes the application. I have 2GB on this machine. When the application uses smaller data for processing I cannot reproduce the problem. Please note the JVM options: -Xmx1024m -Xss1m

Clarification of steps:
1) Start application, when open click on CPU Capture Snapshot.
2) Load data and do processing (memory allocated here, about 40sec of processing), after done click Memory Capture Snapshot
3) Progress bar moves to 6% then to 11% and stays there for several minutes (10min?)
4) Application crashes
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hi,

Thank you for the dumps and screenshots.

The crash happens because the profiler agent fails to allocate some native memory.

Unfortunately, there's no reliable way to correctly handle such situation.

To work this around, available virtual memory should be increased:

1. _Decrease_ -Xmx (the bigger the heap for Java objects, the less memory remains for other needs)

or

2. Increase virtual memory limit in Windows

Best regards,
Anton
Post Reply