Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

Java profiling crash

Gilles_D_
Beginner
613 Views

Hello,

I am usint VTune 2013 update 3 to profile some java application.
Unfortunately, everytime i do, just when the profiled application is going to finish VTunes reports a Segmentation fault in libabstract.so
This does not happen when i debug one of the sample C++ programs. But it deos happen even if i try to profile just "java -version".
I'm using java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

Does anyone knows what could be the problem?

0 Kudos
7 Replies
Bernard
Valued Contributor I
613 Views

>>>Segmentation fault>>>

Do you have Linux OS?

0 Kudos
Peter_W_Intel
Employee
613 Views

I cannot reproduce this problem by using latest VTune(XE) Amplifier XE 2013 Update 3, and Java 1.7.0 Update 11.

# /home/peter/jdk1.7.0_11/bin/java -versionjava version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

# amplxe-cl -version
Intel(R) VTune(TM) Amplifier XE 2013 Update 3 (build 261256) Command Line Tool
Copyright (C) 2009-2012 Intel Corporation. All rights reserved.

# amplxe-cl -collect hotspots -- /home/peter/jdk1.7.0_11/bin/java -version
Picked up JAVA_TOOL_OPTIONS: -agentlib:amplxe_tpssmrte_javaprof_1.0 -Dsun.boot.library.path=/opt/intel/vtune_amplifier_xe_2013/lib32/runtime:/opt/intel/vtune_amplifier_xe_2013/lib64/runtime
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
amplxe: Using result path `/home/peter/problem_report/r003hs'
amplxe: Executing actions 33 % Resolving information for `libc-2.3.4.so'      
amplxe: Warning: Cannot locate symbols for file `/opt/intel/vtune_amplifier_xe_2013/lib64/pinruntime/glibc/libc-2.3.4.so'.
amplxe: Executing actions 34 % Resolving information for `libdl-2.12.so'      
amplxe: Warning: Cannot locate symbols for file `/lib64/libdl-2.12.so'.
amplxe: Executing actions 35 % Resolving information for `java'               
amplxe: Warning: Cannot locate symbols for file `/home/peter/jdk1.7.0_11/bin/java'.
amplxe: Executing actions 35 % Resolving information for `libamplxe_tpssmrte_ja
amplxe: Warning: Cannot locate symbols for file `/opt/intel/vtune_amplifier_xe_2013/lib64/runtime/libamplxe_tpssmrte_javaprof_1.0.so'.
amplxe: Executing actions 35 % Resolving information for `libtpsstool.so'     
amplxe: Warning: Cannot locate symbols for file `/opt/intel/vtune_amplifier_xe_2013/lib64/libtpsstool.so'.
amplxe: Executing actions 35 % Resolving information for `libc-2.12.so'       
amplxe: Warning: Cannot locate symbols for file `/lib64/libc-2.12.so'.
amplxe: Executing actions 36 % Resolving information for `ld-2.12.so'         
amplxe: Warning: Cannot locate symbols for file `/lib64/ld-2.12.so'.
amplxe: Executing actions 36 % Resolving information for `libjvm.so'          
amplxe: Warning: Cannot locate symbols for file `/home/peter/jdk1.7.0_11/jre/lib/amd64/server/libjvm.so'.
amplxe: Executing actions 37 % Resolving information for `libpthread-2.12.so' 
amplxe: Warning: Cannot locate symbols for file `/lib64/libpthread-2.12.so'.
amplxe: Executing actions 39 % Resolving information for `libstdc++.so.6.0.13'
amplxe: Warning: Cannot locate symbols for file `/home/peter/jdk1.7.0_11/jre/lib/amd64/server/libjvm.so'.
amplxe: Executing actions 50 % Generating a report                            
Summary
-------

Elapsed Time:  0.317
CPU Time:      0.120
CPU Usage:     0.410
amplxe: Executing actions 100 % done   

# amplxe-cl -report hotspots
amplxe: Using result path `/home/peter/problem_report/r003hs'
amplxe: Executing actions 50 % Generating a report                            
Function             Module          CPU Time:Self
-------------------  --------------  -------------
LoadJavaVM           libjli.so               0.050
JavaMain             libjli.so               0.030
Interpreter          [Dynamic code]          0.020
__vdso_gettimeofday  [vdso]                  0.010
mprotect             libc-2.3.4.so           0.010
amplxe: Executing actions 100 % done        

 

 

0 Kudos
Peter_W_Intel
Employee
613 Views

It also worked on real example application:

# amplxe-cl -collect hotspots -- /home/peter/jdk1.7.0_11/bin/java gsexample2a datafile.txt
Picked up JAVA_TOOL_OPTIONS: -agentlib:amplxe_tpssmrte_javaprof_1.0 -Dsun.boot.library.path=/opt/intel/vtune_amplifier_xe_2013/lib32/runtime:/opt/intel/vtune_amplifier_xe_2013/lib64/runtime

Tue Jan 15 05:01:17 CST 2013: Processing file 'datafile.txt' for 10 seconds, please wait...


*****************************************
* Elapsed time was 10.0 seconds
* Calculated chksum: 0
* File character count: 10126
* File processed 303930 times
* Total characters processed: 3077595180
*
* Average characters/sec: 3.0775952E8
* Average loop iterations/sec: 30393.0
*****************************************
amplxe: Using result path `/home/peter/problem_report/r005hs'
amplxe: Executing actions 34 % Resolving module symbols                       
amplxe: Warning: Cannot locate file `[Compiled Java code]'.
amplxe: Executing actions 34 % Resolving information for `libc-2.3.4.so'      
amplxe: Warning: Cannot locate symbols for file `/opt/intel/vtune_amplifier_xe_2013/lib64/pinruntime/glibc/libc-2.3.4.so'.
amplxe: Executing actions 34 % Resolving information for `libdl-2.12.so'      
amplxe: Warning: Cannot locate symbols for file `/lib64/libdl-2.12.so'.
amplxe: Executing actions 35 % Resolving information for `java'               
amplxe: Warning: Cannot locate symbols for file `/home/peter/jdk1.7.0_11/bin/java'.
amplxe: Executing actions 35 % Resolving information for `libamplxe_tpssmrte_ja
amplxe: Warning: Cannot locate symbols for file `/opt/intel/vtune_amplifier_xe_2013/lib64/runtime/libamplxe_tpssmrte_javaprof_1.0.so'.
amplxe: Executing actions 35 % Resolving information for `libtpsstool.so'     
amplxe: Warning: Cannot locate symbols for file `/opt/intel/vtune_amplifier_xe_2013/lib64/libtpsstool.so'.
amplxe: Executing actions 35 % Resolving information for `libc-2.12.so'       
amplxe: Warning: Cannot locate symbols for file `/lib64/libc-2.12.so'.
amplxe: Warning: Cannot locate file `[vsyscall]'.
amplxe: Executing actions 36 % Resolving information for `ld-2.12.so'         
amplxe: Warning: Cannot locate symbols for file `/lib64/ld-2.12.so'.
amplxe: Executing actions 36 % Resolving information for `libjvm.so'          
amplxe: Warning: Cannot locate symbols for file `/home/peter/jdk1.7.0_11/jre/lib/amd64/server/libjvm.so'.
amplxe: Executing actions 36 % Resolving information for `libpthread-2.12.so' 
amplxe: Warning: Cannot locate symbols for file `/lib64/libpthread-2.12.so'.
amplxe: Executing actions 39 % Resolving information for `libstdc++.so.6.0.13'
amplxe: Warning: Cannot locate symbols for file `/home/peter/jdk1.7.0_11/jre/lib/amd64/server/libjvm.so'.
amplxe: Executing actions 50 % Generating a report                            
Summary
-------

Elapsed Time:  10.315
CPU Time:      10.670
CPU Usage:     0.980
amplxe: Executing actions 100 % done                                          

# amplxe-cl -report hotspotsamplxe: Using result path `/home/peter/problem_report/r005hs'
amplxe: Executing actions 50 % Generating a report                            
Function                                                        Module                              CPU Time:Self
--------------------------------------------------------------  ----------------------------------  -------------
gsexample2a::ProcessBuffer                                      [Compiled Java code]                        3.641
java::io::FileInputStream::readBytes                            [Compiled Java code]                        3.428
java::io::UnixFileSystem::getBooleanAttributes0                 [Compiled Java code]                        0.802
java::io::FileInputStream::open                                 [Compiled Java code]                        0.540
arrayof_jint_fill                                               [Dynamic code]                              0.310
java::io::UnixFileSystem::checkAccess                           [Compiled Java code]                        0.299
Interpreter                                                     [Dynamic code]                              0.220
java::io::FileInputStream::close0                               [Compiled Java code]                        0.170
SpinPause                                                       libjvm.so                                   0.150
java::lang::ref::Finalizer::invokeFinalizeMethod                [Compiled Java code]                        0.130
gsexample2a::ProcessFile                                        [Compiled Java code]                        0.100
PSPromotionManager::copy_to_survivor_space<(bool)0>             libjvm.so                                   0.070
_register_finalizer_Java                                        [Dynamic code]                              0.070
LoadJavaVM                                                      libjli.so                                   0.050
java::lang::StringCoding$StringEncoder::encode                  [Compiled Java code]                        0.050
PSPromotionManager::drain_stacks_depth                          libjvm.so                                   0.040
ParallelTaskTerminator::offer_termination                       libjvm.so                                   0.040
instanceKlass::oop_push_contents                                libjvm.so                                   0.040
java::lang::ref::Reference$ReferenceHandler::run                [Compiled Java code]                        0.030
gsexample2a::ProcessBuffer                                      [Compiled Java code]                        0.030
call_stub                                                       [Dynamic code]                              0.029
JavaMain                                                        libjli.so                                   0.020
ReferenceProcessor::enqueue_discovered_reflist                  libjvm.so                                   0.020
_complete_monitor_locking_Java                                  [Dynamic code]                              0.020
java::lang::ThreadLocal$ThreadLocalMap::getEntry                [Compiled Java code]                        0.020
java::lang::StringCoding::encode                                [Compiled Java code]                        0.010
DynamicCodeGeneratedHandler                                     libamplxe_tpssmrte_javaprof_1.0.so          0.010
PhaseIdealLoop::build_and_optimize                              libjvm.so                                   0.010
java::lang::ref::ReferenceQueue::remove                         [Compiled Java code]                        0.010
DictI::operator++                                               libjvm.so                                   0.010
IdealLoopTree::beautify_loops                                   libjvm.so                                   0.010
Node::clone                                                     libjvm.so                                   0.010
Node::destruct                                                  libjvm.so                                   0.010
PSKeepAliveClosure::do_oop                                      libjvm.so                                   0.010
PhaseCCP::analyze                                               libjvm.so                                   0.010
PhaseChaitin::bias_color                                        libjvm.so                                   0.010
PhaseChaitin::post_allocate_copy_removal                        libjvm.so                                   0.010
PhaseIdealLoop::split_if_with_blocks                            libjvm.so                                   0.010
PhaseIterGVN::optimize                                          libjvm.so                                   0.010
ReferenceProcessor::discover_reference                          libjvm.so                                   0.010
Type::hashcons                                                  libjvm.so                                   0.010
[[vsyscall]]                                                    [vsyscall]                                  0.010
_IO_file_read                                                   libc-2.3.4.so                               0.010
__pthread_getspecific                                           libpthread-2.12.so                          0.010
java::lang::ref::ReferenceQueue::enqueue                        [Compiled Java code]                        0.010
readFully                                                       libzip.so                                   0.010
specialized_oop_push_contents<unsigned int>                     libjvm.so                                   0.010
java::lang::ref::Finalizer::register                            [Compiled Java code]                        0.010
java::lang::String::charAt                                      [Compiled Java code]                        0.010
java::io::FileInputStream::<init>                               [Compiled Java code]                        0.010
java::io::UnixFileSystem::getBooleanAttributes                  [Compiled Java code]                        0.010
java::lang::ref::ReferenceQueue::reallyPoll                     [Compiled Java code]                        0.010
java::lang::ref::Finalizer::add                                 [Compiled Java code]                        0.010
java::lang::ThreadLocal::get                                    [Compiled Java code]                        0.010
gsexample2a::Store2Load                                         [Compiled Java code]                        0.010
__vdso_gettimeofday                                             [vdso]                                      0.010
MachNode::rematerialize                                         libjvm.so                                   0.010
gsexample2a::ProcessBuffer                                      [Compiled Java code]                        0.010
java::util::concurrent::atomic::AtomicInteger::decrementAndGet  [Compiled Java code]                        0.010
I2C/C2I adapters                                                [Dynamic code]                              0.010
amplxe: Executing actions 100 % done        

 

0 Kudos
Gilles_D_
Beginner
613 Views

For me it only happens when i am using the GUI. I tried with the command line and it passed fine also on my machine.

It also happens with 1.7.0_11.
Yes i am on linux (3.6.11-1.fc17.x86_64) 

To reproduce:

  • Launch amplxe-gui
  • File, New, Project, i named it test2, Create Project
  • Application: /path/to/jdk/bin/java (for me /usr/java/jdk1.7.0_11/bin/java)
  • Application parameters: -version
  • Check allow multiple runs
  • All other left to their default value
  • OK 
  • Right-click on the project, New Analysis
  • General Exploration under Sandy Bridge / Ivy Bridge
  • Check "collect stakcs"
  • Start
  • A dialog opens : Intel VTune Amplifier experianced an unexpected error...
0 Kudos
Peter_W_Intel
Employee
613 Views

This is a valuable report, I can reproduce this in command line:

# amplxe-cl -collect snb-general-exploration -knob enable-stack-collection=true -allow-multiple-runs -- /home/peter/jdk1.7.0_11/bin/java -version

Segementation fault,

However if you remove "-allow-mutiple-runs" option, it works. (as a workaround)

This should be a bug in the tool, need to report dev team.

 Thank you to let me know this, I will keep to update - if the problem is resolved.

0 Kudos
Gilles_D_
Beginner
613 Views

Thank you very much.

Indeed since my last post i noticed that both -knob enable-stack-collection=true and -allow-multiple-runs are needed to reproduce.

0 Kudos
Peter_W_Intel
Employee
613 Views

Final I got info that option "-allow-multiple-runs" mode does not support call stack collection.

This is not the Java specific issue. I wrote a KB to describe this more detail.

0 Kudos
Reply