Menu

ArrayIndexOutOfBoundsException when collating

Help
2012-07-16
2013-05-13
  • Michael Hirsch

    Michael Hirsch - 2012-07-16

    Running Jensor 2.0 under Linux with either java 1.5 or 1.6 I get an ArrayIndexOutOfBoundsException as soon as I try to collate the demo.

    I'm trying to work my way through the example in the documentation.  I've set the JENSOR_HOME correctly.  The demo runs and starts outputting data.  I can open the demo project and when I try to collate it prompts me for the IP address and port number.

    When I click "OK" I get this output, ending with ArrayIndexOutOfBoundsException:

    Socket is connected : true
    String sent : colloc,Administrator,perf123
    Local machine no need for transfer.
    PROJECT HOME : /opt/Jensor/projects/demo
    CAZ-1 : demo
    Reader/Writer for file /opt/Jensor/output/JensorProfile.txt closed.
    The key value is 1342475938591 - 1342475982206
    Reader/Writer for file /opt/Jensor/output/memusage.csv closed.
    Reader/Writer for file /opt/Jensor/output/topNMethods.csv closed.
    Reader/Writer for file /opt/Jensor/output/ObjectInst.txt closed.
    Before copy of Hash files
    Checking /opt/Jensor/output/SystemUtilization.txt
    Copying /opt/Jensor/output/SystemUtilization.txt
    Checking /opt/Jensor/output/SystemUtilization.txt
    Copying /opt/Jensor/output/thrd_hash.txt
    Checking /opt/Jensor/output/thrd_hash.txt
    Copying /opt/Jensor/output/func_hash.txt
    Checking /opt/Jensor/output/func_hash.txt
    Copying /opt/Jensor/output/exceptions.txt
    Checking /opt/Jensor/output/exceptions.txt
    Segregating
    THREAD_HASH_NAME is /opt/Jensor/projects/demo/bin/temp/thrd_hash.txt
    FUNC_HASH_NAME is /opt/Jensor/projects/demo/bin/temp/func_hash.txt
    Number of threads is 3
    Number of functions are 60
    0 : File Name : /opt/Jensor/projects/demo/bin/mainthread
    1 : File Name : /opt/Jensor/projects/demo/bin/Introthread
    2 : File Name : /opt/Jensor/projects/demo/bin/AWT-EventQueue-0thread
    Time taken for Plot File generation is 14 msecs
    Number of threads is 3
    Number of functions are 60
    Preparing Exesummary………..
    Exesummary does not exist…….Creating from JensorProfile.txt
    JAW-001 : JensorProfile.txt reader initialized
    Max Pattern Depth is 3
    In initHash
    Number of plot files is : 3
    Processed file /opt/Jensor/projects/demo/bin/temp/AWT-EventQueue-0.plot in 6:5 msecs
    Processed file /opt/Jensor/projects/demo/bin/temp/Intro.plot in 0:0 msecs
    Processed file /opt/Jensor/projects/demo/bin/temp/main.plot in 7:5 msecs
    Object data for this session not available.
    Charts
    Coding completed……
    Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 1
            at com.tcs.perc.jensor.UI.CopyAnalyzeZip.SessionNum(CopyAnalyzeZip.java:197)
            at com.tcs.perc.jensor.UI.CopyAnalyzeZip.analyzeZip(CopyAnalyzeZip.java:441)
            at com.tcs.perc.jensor.UI.CopyAnalyzeZip.run(CopyAnalyzeZip.java:580)

    I never get any results and the output freezes at about 80% done.

    This ought to be simple, so no doubt I'm doing something wrong.  Any hints?

    Thanks,

    Michael

     
  • chetan phalak

    chetan phalak - 2012-07-17

    Hi Michael,

    During the collation process, somewhere the link seems to be broken. For each session the session details gets stored in zip.props file present in bin directory of every project. In this case, this process does gets completed due to some reasons.

    Another way to work around the same is offline collation( session 3.2.1 in Usage Manual). One can start/stop session, without collation and later create zip file of the files present in the $JENSOR_HOME/output directory. This zip file will be the input for the offline collation process.

    Once the offline collation complets, one can analyze the results through JAW.

    Regards,
    Chetan.

     
  • Amol Khanapurkar

    Hi Micheal,

    Just to add further to Chetan's point…

    Offline collation is a mechanism to ensure that the profiling data is not lost. Whenever the Collate fails or if logged in profiling data is huge, offline collation becomes a useful workaround. Usage manual describes how to use this feature in detail in section 3.2.1.

    As for the root cause, it goes something like this. Jensor Analysis Workbench (JAW) tried to collect data from the server (your app JVM) over default Jensor TCP/IP port. This communication broke for whatever reasons. Now Jensor client i.e JAW gets a entry in its session manager (zip.props), but the corresponding data has failed to arrive. Hence the UI fails, throwing this exception.

    If the data is too precious to lose, use the offline collation option. If error persists let us know. Jensor has been tested on Linux running inside VMs. May be its time to test on physical hosts as well.

    - Amol

     
  • Michael Hirsch

    Michael Hirsch - 2012-07-18

    Thanks for the responses.

    I may give the offline mode a try, but I'm confused as to why the online collation keeps breaking.  I'm not doing anything special and am just trying it on the supplied demo code.  It's hard to imagine that it is a hardware vs. VM problem, but I suppose that is possible.

    Is there any further logging I could turn on?  Or something I can do to help find the cause?  It is quite consistent for me.

    Thanks,

    Michael

     

Log in to post a comment.