Sie sind auf Seite 1von 28

Analyse Problem - Debugging Tool

Dump Analysis

Active Global Support


March 2009

Course Content (Current Highlighted)

Introduction

Dump Analysis

R/3 Basis Technological Overview

ABAP Trace (Runtime Analysis)

Debugger I

Performance Trace

Screens

Memory Management

ABAP Messages

Batch Processing

Debugger II

Updates

Dynpro Trace

User Exits

Syslog

Unit Objectives

This unit will prepare you to perform the following tasks:


Extract helpful information out of the dump
Quickly identify which part of the dump is important for you
Use dump information for note and message search

Dump Analysis

I got this dump during a batch run.


It aborted after 7h .
I can only send you the Dump to solve it.
We are Fort Knox and
we do not allow a remote connection.

At the end of this chapter you will hopefully be able to extract all the valuable info from a
short dump.
The above mentioned customer problem will be the last exercise of this chapter.

Dump Analysis - ST22

lock the
dump

Accessing the dump:


directly at the time of occurrence
or via TA ST22 (Tools->Administration -> Monitor-> Dump analysis)
Advantage of a fresh dump:
possibility to analyze the problem on abap level by pressing the debugging button
(authorization required)
Troubleshooting
the dump is empty (only are found everywhere) or you receive
SNAP_NO_NEW_ENTRY
the table SNAP which stores the dump analysis is filled up completely
reorganize the table to solve the problem via ST22: GOTO->REORGANIZE
Prevent reorganization (deletion) of a dump
lock it
either by selecting the the dump with the cursor and using the button lock to lock it
or by double clicking on the line to be locked

Access the Debugger From a fresh Dump

If you encounter a dump you


can switch to the debugger
and use the display features
of this tool

After terminating the internal session (/n) the environment of the dump is deleted and you
cannot access the debugger from ST22 any more.

Dump Analysis - ST22


Which information is available in the dump ?
Press F6 in the
DUMP text to get
an overview

The most valuable information are included in:


(3) Error analysis
(4) How to correct the error
(5) System environment
(6) User, transaction
(7) Information on where termination occurred
(8) Source code extract
(9) Contents of system fields
(10) Chosen variables
(11) Active calls / events
(12) Internal notes
(13) Active calls in SAP kernel
Part (1) and (2) include information for the customer.

Systematical Analysis of the Dump

Get the Dump header:


(e.g. CALL_FUNCTION_CONFLICT_TYPE)

Get the system environment (Release, OS..)


User, transaction ...

Read the error analysis / How to correct the error

Check the frequency of the dump and search for common


things. (server, transaction...)

Determine the effected program and the line of the source


code

Compare the code with our in-house test systems


Search for notes and calls.

Further analysis (code analysis, field checks, call stack,


reproduce problem ...)

Some remarks to point 3. The other points are described in detail afterwards.
If you start transaction st22 and select all e.g. CALL_FUNCTION_CONFLICT_LEN Dumps
of the last days then you get a list like this
Date

Time

Machine

12.07.1999 11:47:01 pawdf025


12.07.1999 11:48:11 pawdf025
12.07.1999 11:51:17 pawdf025

User

Clt

FRANKM
FRANKM
FRANKM

X Error ID

000 C CALL_FUNCTI ...


000 C CALL_FUNCTI ...
000 C CALL_FUNCTI ....

Please check if all Dumps occur on one machine or only only one user is involved ...

Dump Analysis (1):


System Environment / User, Transaction

Attention:
This is not the current database version,
and os-version but the enviroment the
kernel has been linked with.
Use ST06 for the actual os-version and
ST04 for db-version

Collect the information regarding the System environment


SAP release, kernel release, patch level
Operating system, database type
Application server
Is the error server dependent, or do you find the same dump on other application servers
too ?

Collect the information regarding the user and transaction


Client, user, transaction
This will help to reproduce the problem
Get the screen number and the main program, if the problem occurs depending on a
dynpro

Dump Analysis (2):


Error Analysis / How ot Correct the Error

The Error analysis is one of the most valuable information sources:


In this example you get the information that the function module
F4IF_INT_TABLE_VALUE_REQUEST has a formal parameter RETFIELD. The imported
field R_OBJTYP-LOW has a non compatible type to RETFIELD.
With the normal ABAP tools (SE38 / SE37 / extended program check (SLIN)) you can
detect the error source.
Unfortunately the How to correct the error area asks you only to search for notes.
But nevertheless check this part for information too.

10

Dump Analysis (3):


Where did Error occur?/Source Code Extract

current program

current event
(form, function,...)

main program.
Head of the program
group

current include
and source line

Use transaction SE38 with the Include name to access the source.
With the known line of source you can navigate directly to the guilty statement.
There you can set a breakpoint for debugging, or check the surrounding code.
Use both the current program name and the include name if you search for notes.
(additionally use the transaction for note search)
Please be careful, sometimes the displayed line of source is one statement behind the
guilty one.

11

Dump Analysis (4):


Contents of System Fields/Chosen Variables

Read the
hex code
vertically
e.g.
SPACE =

For information about system fields, please use F1-help (in SE38) with
ABAP System Fields
In our example we learn from the system fields that the program BGTEST5 looped
1000 times until it failed. (sy-index = 1000).
In a LOOP AT ITAB loop sy-tabix would be essential.
If you have problems with memory consumption of large lists please have a look at sy-linno
and sy-colno. (Line number, column number)
The chosen variables display some variables in the surrounding of the guilty statement.
The first line (blue) of the field contents displays the character representation of the
underlying hex-value. Please read the hex values vertically.
In our case the interesting field p has the hex-value = 99 9C.
Since we have a packed number and no character the first (blue) line of the field p shows
only senseless symbols. 99 9C is the hex-representation of the packed number 999.
We deal with a packed number with length 2. This means we can only use 3 digits.
Therefore we cannot exceed the number 999 and our program fails at the 1000th execution
of the adding procedure.

12

Dump Analysis (5):


Active Calls/Events

event
program
include

The call stack shows you the flow of the program. With this information you can e.g. display
(via transaction SE38 ) the include LCATREF20 line 655 in order to check how the form
CALL_DYNAMIC_FUNCTION_UNIT was called.
Please note that only the call stack is available. If a function is called and then the runtime
returns from this function and goes on you will not find this function in the stack.
If you have e.g. a CALL_FUNCTION_CONFLICT_TYPE then the called function is not on
the top of the stack because the call itself failed.

13

Dump Analysis (6): List of Programs


Effected/List of Internal Tables

Generation time must


always be more
recent than the
Changed time !

Display of header
information of
internal tables

The list of programs affected displays all programs which were loaded during the
runtime of the main-program.
If you think there may be an inconsistency between some ABAPs then compare
Generation and Changed time.
(The report RSDEPEND will provide additional details about inconsistencies if you have a
suspicious program).
The list of internal tables displays some internal tables in the surrounding of the guilty
statement. Especially if you have problems with memory consumption please check the
number of lines of the internal tables.
But please keep in mind, that some internal tables are freed if there is no more memory
available (we need some memory to create the Dump).

14

Dump Analysis
RSDEPEND - Check if the program needs to be generated
Start the report RSDEPEND and fill in the interesting program

F8
The header includes the last modification
(Over all timestamp) of any involved part
of SAPMV45A.
Additionally you get the last generation time.
This time must be fresher then the overall time
stamp. If not then this line has a red
background.
Get all Includes, DDIC elements and Dynpros
which are linked to this program.
Furthermore you get the last modification time
stamp.

If e.g. a customer transports a changed DDIC structure in the running system then
sometimes
persistent inconsistencies are the result. Some running ABAP programs are not informed
about the DDIC changes. That may result in Dumps like
CALL_FUNCTION_CONFLICT_TYPE,
CONNE_IMPORT_WRONG_COMP_LENG, GETWA_CANT_CLEAR...
If you want to generate all programs which depend on a special DDIC structure/table then
please use the report TOUCHTAB and have a look at note 0162991 and 144918 .

15

Dump Analysis (7):


Internal Notes/Active Calls in SAP Kernel

Some dumps provide very


useful information in the
internal notes area
SYSTEM_CORE_DUMPED
The C-Stack is essential to analyze
the problem.

These parts contain very specific details about the abortion in the kernel.
In some Dumps you get very useful information in the area Internal notes.
In our example we get the information:
The call of function CV140_LINKS_DELETE failed, since the formal parameter PF_OBJKY
is specified as type c(50) but the function input (actual parameter) as type C(22).
If you have to deal with a SYSTEM_CORE_DUMPED or other internal (BASIC) errors
please get the C-stack and forward the call to the responsible basis group.

16

Dump Analysis (8): Directory of Application


Tables and Data Areas

Tables-workareas of the
different loaded programs

The directory of application tables contains all table work areas of all loaded programs.
Unfortunately you get only the first 40 bytes of their contents.
The Directory of data areas (administration / contents) is quite specific and only useful for
ABAP compiler experts. It shows the data segments of the different programs (global data,
tables, field-symbols...)
The last part of the Dump ABAP control block CONT is only useful for the compiler experts.

17

Dump Analysis DUPREC - Technical


Information
DUPREC - Overview
There are two reasons why you can get a shortdump telling you that the
program is aborted with reason DUPREC
1)The processing logic is wrong the program tries to insert the same
record twice.
2)The record the program wants to insert is already in the database.
1) Processing logic - check:

2) Record is already in DB - check:


check existence of a record with the
specific key fields
Check existence of an unique index
for the db-table

if a refresh is missing
if the same processing is done twice in a
loop wrong limit criteria
if the lock is set correctly

Processing logic check: Use SE30 for call hierarchy or structure analysis
Record in database: Select SE16 with key entry

18

Dump Analysis DUPREC - Technical Information


How to analyze DUPRECs:
Check the short dump for relevant source code
SE11
Analyze the database table: Get the key fields.
Is there a secondary unique index ?
Debug
Get the internal table which should be inserted and check if
there are duplicate lines or if one line already exists on the
database
ST05
Get the real SQL statement with the current values

19

Dump Analysis: DUPREC - Example


Detailed description:
Start report ZST05_05 to fill table tabna
No matter what range is chosen the execution is resulting in
a DUPREC
Where in the flowchart are we now?
We know:
The name of the program started
The range of keys to be inserted into table tabna
The values which can not be inserted into the table
We really want to know
Is the program not working correctly?
Is the key value already there?

Approach:
get the values from ST22 short dump or if hard to read from SQL trace
check with SE16 if key entry is there
If key entry is not there check with ST05 and debugger why the insert is aborting

20

Exercise - ZST22_DUPREC
ZST22_DUPREC cancels with the Dump
SAPSQL_ARRAY_INSERT_DUPREC.
Please evaluate the reason for this error and try to
find a solution.
I checked all entries
of the internal table,
which should be updated
and I checked the database
contents.
I couldn't find any error !

21

Solution - ZST22_DUPREC
ZST22_DUPREC cancels with the Dump
SAPSQL_ARRAY_INSERT_DUPREC.
Reason:
There is an unique index ZDB for the database table ZDEBARFC
which includes the fields:
MANDT, CARRID, CONNID, PLANETYPE
(check it via: se11/Button Index)
The line which should be inserted is not unique concerning these
fields (PLANETYPE is essential)

22

Exercise: TABLE_INVALID_INDEX
If you run report ZST22_INVALIDINDEX you receive the
DUMP TABLE_INVALID_INDEX from FORT Knox.
(remember the introducing story)
Do not debug the program.
Only analyzing the Dump text is allowed.
Find out why this DUMP occurs and how the program should be
corrected (OSS-note)

23

Solution: TABLE_INVALID_INDEX
Analyse the Dump
We learn from the dump:
Insert with Index 0 because
sy-tabix = 0.
Sy tabix = 0 because the read failed.
(target structure my_flight is empty !)

24

The new Dump Analysis (4.70)

25

The new Dump Analysis (4.70)

26

Summary

Now you are able to:


Access ABAP Short dumps and protect them against
unintended reorganisation
Extract all the valuable info from a short dump.
Perform a systematic dump analysis
Solve problems with common Short dumps!

27

Copyright 2009 SAP AG


All Rights Reserved
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein
may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries,
eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+,
POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex,
MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other
countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos
are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and
services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries.
Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only.
National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only,
without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group
products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed
as constituting an additional warrant.

28

Das könnte Ihnen auch gefallen