Re: Shark for Java - 'the target process has already exited'?
Re: Shark for Java - 'the target process has already exited'?
- Subject: Re: Shark for Java - 'the target process has already exited'?
- From: Ladd Van Tol <email@hidden>
- Date: Fri, 9 Sep 2005 09:35:25 -0700
Ahh yes. This is extremely similar to a bug I filed in November of
2004 (3871167)
Essentially Shark only works on java under an extremely rare set of
circumstances, that I am only occasionally able to reproduce. Usually
it involves the sacrifice of mustelids, and other esoteric moonlit
rituals. I will paste in my original bug, and leave it to you to
puzzle over why Apple chose to re-title my bug as "Java/Malloc/
Function configs need to handle the sampled process going
away." (Only a small part of the problem I was describing in the
bug). Once safely re-categorized in this way, the bug has been left
open, and does not seem to have gotten any attention.
This is a shame, because there are not very many good profilers for
Java, and Shark works wonderfully well on my C/Obj-C/C++ projects.
- Ladd
------
08-Nov-2004 06:46 PM Ladd Van Tol:
Using a fresh install of Shark, and Java 1.4.2_05, on Mac OS 10.3.6,
Shark's Java Time Trace does not ever function correctly, despite
following the directions.
If I stop before process completion, I get the following error:
ERROR
No samples taken. [JavaTraceDataSource]
If I stop the sampling after process completion, Shark appears to
hang, and claims to still be sampling.
This occurs with launch or attach to the process.
'System Profile.txt' was successfully uploaded
10-Nov-2004 01:50 PM Ladd Van Tol:
Test case:
Using the attached SharkTest project, I set the shark launch
parameters as follows:
Executable:
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java
Working Dir:
/Users/ladd/Desktop/SharkTest/build
(... fix this full path when testing)
Arguments:
-XrunShark -Xmx512m -cp SharkTest.jar SharkTest
Environment variables:
none set
Options:
Start sampling immediately turned on
Stop Sampling if this application exits turned on
This sample application runs an infinite loop, and does not exit. On
launch, the console produces the "Hello World" message. Despite this
shark produces the same error message as before (No samples taken.
[JavaTraceDataSource]).
'SharkTest.zip' was successfully uploaded
On Sep 9, 2005, at 1:08 AM, James Closs wrote:
On 9 Sep 2005, at 05:25, Mark Szymczyk wrote:
Launching a Java program from Shark doesn't work. You must either
launch your program before you profile with Shark or launch the
program from Xcode by choosing Debug > Launch Performance Tool >
Shark.
Hi,
OK - I seem to have got Shark to attach to something by launching
the app from the terminal rather than from Xcode. However, when I
tell Shark to 'stop sampling' it just bombs out. Here's what
happens...
First the java app quits and I get the message 'the application xxx
had unexpectedly quit' etc
Then Shark goes into 'processing samples'
Then Shark bombs out with a dialog 'Failed to collect perf data
from "JavaTraceDataSource" []' and a 'd'oh' button (nice touch!).
The stack trace is:
=====
2005-09-09 09:02:24.566 java[668] -[PTRemoteDataSourceListener
dispatchFromPort:] - got config dict - {
JavaSampleInterval = 1;
JavaTraceType = 2;
"cfg_description" = "";
"cfg_enabled" = 1;
"cfg_id" = "JavaTraceDataSourceConfig<0:a:95:b0:3b:
32::1315023252>_2004-06-12 19:57:48 -0700_21";
"cfg_name" = "";
"cfg_summary" = "";
}
2005-09-09 09:02:28.087 java[668] -[SymbolLookup
_cacheSourceInfoForRange:] can only be used with subclasses of
SymbolLookup implementing the PTSymbolSourceProtocol
[-[SymbolLookup _cacheSourceInfoForRange:] (SymbolLookup.m:2132)]
2005-09-09 09:02:28.088 java[668] An uncaught exception was raised
2005-09-09 09:02:28.088 java[668] -[SymbolLookup
_cacheSourceInfoForRange:] can only be used with subclasses of
SymbolLookup implementing the PTSymbolSourceProtocol
[-[SymbolLookup _cacheSourceInfoForRange:] (SymbolLookup.m:2132)]
2005-09-09 09:02:28.089 java[668] *** Uncaught exception:
<SharkCriticalException> -[SymbolLookup _cacheSourceInfoForRange:]
can only be used with subclasses of SymbolLookup implementing the
PTSymbolSourceProtocol
[-[SymbolLookup _cacheSourceInfoForRange:] (SymbolLookup.m:2132)]
Trace/BPT trap
=====
The end of java.crash.log is:
=====
0x95444000 - 0x9547dfff com.apple.Xcode.DevToolsSupport 4.1
(610) /System/Library/PrivateFrameworks/
DevToolsSupport.framework/Versions/A/DevToolsSupport
0x9549a000 - 0x9551dfff libstdc++.6.dylib /usr/lib/libstdc++.
6.dylib
0x9559b000 - 0x9586afff com.apple.Xcode.DevToolsCore 4.1 (620) /
System/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/
DevToolsCore
0x959af000 - 0x959b6fff com.apple.Xcode.DevToolsRemoteClient 4.1
(621) /System/Library/PrivateFrameworks/
DevToolsRemoteClient.framework/Versions/A/DevToolsRemoteClient
0x96398000 - 0x9639afff com.apple.ExceptionHandling 1.2 (???) /
System/Library/Frameworks/ExceptionHandling.framework/Versions/A/
ExceptionHandling
0x963f0000 - 0x96637fff libclient.dylib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libclient.dylib
0x98a08000 - 0x98a08fff libcmm.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libcmm.jnilib
0x98a0e000 - 0x98a29fff libjava.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libjava.jnilib
0x98a33000 - 0x98a3dfff libverify.dylib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libverify.dylib
0x9b063000 - 0x9b067fff libfontmanager.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/
libfontmanager.jnilib
0x9b0a8000 - 0x9b0cbfff libjpeg.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libjpeg.jnilib
0x9b11a000 - 0x9b147fff libsuncmm.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libsuncmm.jnilib
0x9b14f000 - 0x9b15afff libzip.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libzip.jnilib
0x9b31f000 - 0x9b40afff libawt.jnilib /System/Library/
Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libawt.jnilib
0x9cbba000 - 0x9cbc8fff libz.1.dylib /usr/lib/libz.1.dylib
====
James Closs, Director, bitBull Ltd
http://www.bitbull.com
07771 991171
====
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40criticalpath.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden