Observed on RDBMS

RDBMS

Yes/No

Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(tick)
CSS2(tick)
CSS1(tick)
Action Plan

Follow the below steps:

  1. Check if the problem files being analyzed are in 3rd party code directories.  If so, these should be excluded from the analysis as they are not items which should generally be measured.
  2. Check if issue occurs, due to specific source code files.

    1. For the following steps, an approximate calculation of the expected investigation time should be done, once the investigation method (file exclusion or dichotomy) has been determined . The analysis time can be found in the relevant information message at the end of the analysis log. For example:

      Execution duration=0 days, 03 hours, 17 mins, 07 secs

      1. Assume that the analysis is taking A hours, to reach the fatal error:
        1. If you are running with file exclusion the total analysis time = (B x analysis iterations)hours, where B
          1. If running for the whole analysis, B >=A
          2. If running for just one AU, B< A hours, but the exact time can only be determined only after running the analysis on the AU at least once
        2. If you are running with dichotomy, the time consumption of each iteration of the dichotomy can be described with the following examples
          1. If the issue is always reproduced for only one half of an one execution unit named EU. When EU 1 is split into two Execution Units and a test analysis is run, the first Execution Unit name EU 1-1 will take A/2 hours to fail, and the Execution Unit EU 1-2 will take A/2 hours to succeed.

            Split : Number of IterationsExecution Unit that failsExec. Unit. Split 1Analysis TimeExec. Unit. Split 2Analysis TimeTotal
            0EU 1----A hours
            1EU 1EU 1-1A/2 hoursEU 1-2A/2 hoursA hours
            2EU 1-1EU 1-1-1A/4 hoursEU 1-1-2A/4 hoursA/2 hours
            3

            EU 1-1-2

            EU 1-1-2-1A/8 hoursEU 1-1-2-2A/8 hoursA/4 hours
            4EU 1-1-2-1EU 1-1-2-1-1A/16 hoursEU 1-1-2-1-2A/16 hoursA/8 hours

            For this scenario total analysis time = A+A/2+A/4+A/8+...

          2. If the issue is reproduced for both half's of an execution unit, then you will need to continue investigation for both half. Let's assume that this investigation will continue until Iteration 3

            Split : Number of IterationsExecution Units that failExec. Unit. Split 1Analysis TimeExec. Unit. Split 2Analysis TimeTotal
            0EU 1----A hours
            1EU 1EU 1-1A/2 hoursEU 1-2A/2 hoursA hours
            2

            EU 1-1

            EU 1-2

            EU 1-1-1

            EU 1-2-1

            A/2 hours

            EU 1-1-2

            EU 1-2-2

            A/2 hoursA hours
            3

            EU 1-2-1

            EU 1-1-2

            EU 1-2-1-1

            EU 1-1-2-1


            A/4 hours

            EU 1-2-1-2

            EU 1-1-2-2

            A/4 hoursA/2 hours
            4

            EU 1-2-1-1

            EU 1-2-1-2

            EU 1-2-1-1-1

            EU 1-2-1-2-1

            A/8 hours

            EU 1-2-1-1-2

            EU 1-2-1-2-2

            A/8 hours

            A/4 hours

            For this scenario total analysis time = A+A+A/2+A/4+...

      2. This rough estimation should be taken into account in order to determine if the method selected can produce the result in regards to the time constraints of the project. If not, then contact CAST Technical Support with the following Relevant input.

    2. Take a backup of the Management Base, since for the following steps you will need to change the analysis configuration

    3. Verify if issue occurred during java file parsing or during resolving declarations in a java file. Open the analysis log and check the last information message before the error that contains parsing information. Depending on the CAST AIP version the initial parsing of java files is logged with the information message 'Parsing file' or 'Parsing Java file (phase 1)'. For example:
      Parsing file : C:\CAST_Template\Deploy\ANDROID PHONE\app\src\main\java\com\SomeSourceCodegmt.java
      Unable to process JSP analysis 'androidTest_66792039' (An exception occurred)
      Unexternalized exception - Message is 'access violation'.

      The resolving declarations phase is logged with the information message 'Parsing file (resolve declarations)', followed by one or several 'Parsing Java file (phase 2)' messages. For example:
      Parsing file (resolve declarations) : C:\CAST_Template\Deploy\ANDROID PHONE\app\src\main\java\com\SomeSourceCodegmt.java
      Parsing Java file (phase 2) : [ C:\CAST_Template\Deploy\ANDROID PHONE\\Jars\org\some-1.2.jar]\org\\json\Some.class
      Parsing Java file (phase 2) : [ C:\CAST_Template\Deploy\ANDROID PHONE\\Jars\org\someother.jar]\org\\json\Some.class
      Unable to process JSP analysis 'androidTest_66792039' (An exception occurred)
      Unexternalized exception - Message is 'access violation'


      1. If issue occurred during resolving declarations in a java file, first investigate by dichotomy in the classpath files and folders. You can find more information about the use of class paths in CMS+-+J2EE+Technology+options.
        1. Delete all the existing class path folders and files on the technology and analysis unit level
          1. If the issue is not reproduced, then the culprit files are one or several of the class path files. In this case you should investigate by dichotomy on the classpath
            1. Delete half of the class path folders and files and follow the dichotomy process for the classpath:
            2. Exclude the culprit .class file(s) from the analysis and rerun analysis
          2. If the issue is reproduced, then the culprit files are not in the classpath, proceed to next step
      2. Check if issue occurs for one analysis unit or can be reproduced for one analysis unit. In this case you should investigate with file exclusion or dichotomy at the file level

        1. Check if there is one or more analysis units contained in the execution unit. Using the analysis log filename, run the following query:

          Identify the failed Analysis Units ordered by log file
          SET search_path TO <your mngt db>; 
           
          SELECT object_name, execlog 
          FROM   cms_j2ee_analysis 
          WHERE  execlog like '%<Analysis Log file name>.castlog%'
          and execstatus = 'ExecutionFailureStatus'
          ORDER  BY execlog 

          Take for example the following result for the query




          -Execution Unit corresponding to analysis log "My Source file based execution unit 2_151907-20170717142603.castlog", contains only one Analysis Unit : framework.
          -Execution Unit corresponding to analysis log "My Source file based execution unit 3_155213-20170718095301.castlog", which contains several Analysis Units (CmdcProject,WS_TNPORT_EFMS, WS_TNPORT_GICM, appxxxWS...)

          1. If there is one Analysis Unit, exclude the last parsed file from analysis and rerun the analysis for the analysis unit. If this does not solve the issue, then apply dichotomy at the file level, running analysis for the failing analysis unit only.
          2. If there are several Analysis Units
            1. Locate the analysis unit(AU) where the last parsed file(the file mentioned in the information message) is belonging. DO NOT RELY ON THE PROJECT QUOTED IN THE FATAL ERROR MESSAGE TO FIND OUT THE FAILING ANALYSIS UNIT. You must compare the path of the file with the root path of the different analysis units. For this, you may sort the analysis units by root path in Cast-MS, tab Current Version.
            2. Check if issue is reproduced by annotating the AU and executing the analysis just for the annotated AU

              1. If the fatal error issue is reproduced with one AU. Exclude the last parsed file from analysis and rerun the analysis for the analysis unit. If this does not solve the issue, then apply dichotomy at the file level, running analysis for the failing analysis unit only.
              2. If the fatal error issue is not reproduced with one AU, then proceed to next step
      3. Investigate with Dichotomy at the application level
        1. Split the Execution Unit into multiple Execution Units to get one Analysis Unit per Execution Unit by running the following queries :

          ------------------------------------
          ----- SPLIT THE J2EE EXEC UNIT -----
          ------------------------------------
           
          UPDATE cms_j2ee_analysis                                 -- This table contains the list of J2EE Analysis Unit 
          SET    exectag = 'Split_1_annotation' || object_id       -- This field contains the Execution Unit Anotation 
          where execlog like '%<Analysis Log file name>.castlog%'
          and execstatus = 'ExecutionFailureStatus';
           
          UPDATE cms_j2ee_analysis     -- This table contains the list of J2EE Analysis Unit 
          SET    active = 0            -- This will deactivate the analysis units that do not need to run.
          where execlog not like '%<Analysis Log file name>.castlog%'
          or execlog is null;
        2. Open CAST Management Studio, go to 'Execute' tab and click 'Test analysis' in order to verify if the issue is reproduced
          1. If issue is reproduced, then it will have failed for a specific Execution Unit/Analysis unit. Apply dichotomy at the file level, running analysis for the failing analysis unit only.
          2. If issue is not reproduced, this means that you need to expand the scope of the Execution Unit to include more Analysis Units. The optimized way to do this is to apply dichotomy on the Execution Unit level
            1. Restore the management database

            2. Split the Execution Unit that has failed until you can reproduce issue with a minimum set of analysis units:



            3. Apply dichotomy at the file level, running analysis for the set of analysis units for which you can reproduce the issue


  3. If the below points do not help you to resolve the issue, contact CAST Technical Support with the following Relevant input.

Relevant input

  1. CAST Support Tool (CST) - alias Sherlock. Option to select : Export LogsExport CAST Database for Management Base and Knowledge Base, Export Configuration files, Export source code.