Abap mem inspector find mem leaks step by step
Hi all!
I read this document ( http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f09ba798-2187-2b10-25a2-d3ecc0c19886?QuickLink=index&overridelayout=true ) and has identified the following sequence of steps in the search for memory leaks .
Please share your experience and correct me if I made a mistake somewhere. Thanks!!!
sequence:
1. start the transaction
2. for example i make an order to supply
3. without leaving the transaction i make memory snapshot /hmusa
4. without leaving the transaction, make a second order
5. without leaving the transaction i make second memory snapshot /hmusa
6. go to S_MEMORY_INSPECTOR
7. select for comparison both snapshots -> go to view Ranked list
8. the top place in red i have the biggest new objects in memory
9.Expanding these objects you can see the unused links which lead to memory leaks and that needs to be fixed this references
First of all: Should i install any products or pathches for ERP & CRM system for correct work of BusinesPartnerReplication scenario?
Second:
From link above
Customizing in the table CRMC_BUT_CALL_FU must be set up accordingly. Make the necessary settings in Customizing of the Business Partner under Data Distribution -> Activate Function Modules.
What customizing in CRMC_BUT_CALL_FU? And list of function modules for activation on ERP & CRM sides.
BR,
Dzmitry
Similar Messages
-
Execute ABAP Code Inspector from Outside of SAP
Hi all...
For reporting purpose, I would like to use ABAP Code Inspector (transaction SCI) for generating output as a file, it should call from outside of SAP through RFC function module and generate the list (output) as flat file (or XML), does anyone have been done with similar work like this? I wonder if you could share your experience with me...
thanks in advance,
yayan irianto.I managed to set up the variant, however found a problem.
I used "Search ABAP Statement Patterns" under "Search Functs" and set the pattern like followings.
SELECT + INTO *
SELECT SINGLE + INTO *
However following statements were detected.
SELECT * INTO TABLE IT_DRAW FROM DRAW.
SELECT MANDT INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE * INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE MANDT INTO TABLE IT_DRAW FROM DRAW.
It's because + means one ABAP token in the code inspector.
Is there anyway to find only "SELECT SINGLE *" and "SELECT *" ? -
Hi All ,
In our SAP application server (Solaris 10 X86 running on hardware HP ProLiant BL685c G5) physical memory available is day to day decreasing drastically. We suspect, there is a memory leak.
Could you please let us know how to find memory leak in Solaris.
Regards,
Rajesh.Hi Rajesh
Memory leaks have a large number of possible causes, including:
•Unsupported hardware or software
•Custom Scripting
•Misconfiguration
•Third party hardware and software issues
The prstat command can be used to gather basic performance data to help identify if there are any processes consuming a large amount of memory. For example, the data below is sorted by the SIZE column. SIZE is the total virtual memory size of the process:
prstat -s size
If you are experiencing some of the symptoms described above or if you suspect a memory leak, it is particularly important that performance data is captured so the memory leak can be confirmed. It is important to gather at least the following pieces of information:
•Process ID (PID)
•Size of the process
•The executing command
•The timestamp information showing exactly when the data was captured.
while true
do
for pid in `cat pids`
do var=`date|cut -d' ' -f4`
echo "$var :\c" >> ps.log.$pid
ps -eo pid,vsz,rss,pcpu,args | grep $pid |grep -v grep >> ps.log.$pid
done
sleep 30
done
You could check the memory utilisation details through
#mdb -k
::memstat
kmastatRegards
Sadiq -
Finding Memory leaks in C using Visual Studio 2013
I am using Visual Studio 2013, and taking a course in C programming and we started
talking about memory bugs detaction, in particular memory leaks, and how to detect them using Valgrind on Linux.
I want to know if there is a way to detect such memory leaks using VS 2013. I tried searching online but it just leads to lots of articles and blogs and msdn posts and blogs with lots of words like dump files, and analyzing them, etc which is weird
because:
1) It sounds so complex, convoluted and unintuitive it is actually hard to comprehend it.
2) The main reason this is weird is due to the fact that VS is the most advanced IDE around and Microsoft spends so much money on in, yet from what I have read it seems that there is no simple way to use VS to detect memory leaks
- certainly no way that's as simple as Valgrind where I only have to compile the program and run the command valgrind -leaks-check=yes ProgramName
and it simply prints to me all location it thinks there is a memory leak and describes the error (like not freeing memory after allocating it with malloc hence having "dead" memory after the program finishes, or accessing memory that's out of
the array bounds)
So my question is how to use VS 2013 in order to achieve the same results and to find out First in high level if there are memory leaks in the program, and Second - to detect in a simple manner where those leaks are- preferably without involving dump files
(not that I know how to use them anyway in VS).Hi MicrosoftLaw,
Thanks for your post.
Based on your issue, if you want to check if there are memory leaks in the C program from this VS2013. I suggest you could try to find Memory Leaks Using the CRT Library, for more information:
https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx?f=255&MSPPError=-2147217396
In addition, I find a similar thread about this issue, please you refer the Dusty's suggestion to check this issue.
http://stackoverflow.com/questions/45627/how-do-you-detect-avoid-memory-leaks-in-your-unmanaged-code
I did some research about this issue, I found that the Visual Leak Detector extension tool is a free, robust, open-source memory leak detection system for Visual C++. So if possible, I suggest you could try to use the Visual Leak Detector extension
tool to find the memory leak for Visual C/ C++ program.
https://visualstudiogallery.msdn.microsoft.com/7c40a5d8-dd35-4019-a2af-cb1403f5939c
However, if you have any issue about how to use this Visual Leak Detector extension tool to find the memory leak for C program. I suggest you could directly to write a review to this REVIEW tab in Visual Leak Detector site.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello,
I have a memory leak in my application. I have found other memory leaks in the software using JProfiler, but I have a problem with JProfiler finding this one. My biggest problem is the JProfiler itself. If I use short runs, the JProfiler works fine. If I run my application for more than half a day, the JProfiler eats up memory and after a while it stops responding.
I tried JProbe, but after profiling my application for 18 hours straight, it got buggy and wouldn't work correctly. It also ate up alot of memory, and couldn't process my snapshot after 18 hours of run. I saved all snapshots, and restarted JProbe. The initial snapshot was read correctly, but the final snapshot threw an NegativeArraySizeException.
So, now I am looking for other tools which are able to find memory leaks without hanging or crashing after running 24 hours. Any recommendations?I dont know any other profiler you can use, but how about using the divide and conquer approach?
Disable a significant section of your application and let it run for a day. If the leak occurs, its in the non disabled part.
If it doesn't, its in the disabled part. Next, enable all the code. Then disable about half of the half that failed and try that. Continue doing so until
you isolate the code enough that you can look at it and hopefully find the problem. Note you will need to keep track of what you previously enabled and disabled as a test (I put comments in the code).
Alternately, you can look at functions that perform complex functionality that you suspect might be the problem and have the function return
dummy data rather than perform the functionality. If the leak goes away, its that function(s).
Example:
public String getComplexData(String arg1, String arg2){
//this section bypasses the complex code and returns dummy data
boolean x1= true;
if(x1==true)
return new String("some dummy data");
//complex functionality goes here.
Also of help would be to list everything that can cause a memory leak (I assume its a memory leak and not a resource leak such as not closing connections).
Here are some ideas:
1) persistant class variables that are a collection that have objects added to them but never deleted and allowed to be garbage collected
such as static class variables, session scope variables, or application scope variables.
2) An object tree where one of its nodes is never set to null to be garbage collected (such as a static class variable).
If you are running a web application in a clustered enviornment, try running it on only one server. -
nothing new here. you have memory leaks and can't seem to fix them. Why?
Safari has add-ons and no memory leaks there. other browsers don't leak mem. why FF?tried resetting. that was stupid. took me 30 minutes to get my home page and addon back the way it was.
please don't try to tell me any more things that DON'T WORK. -
Freeing DVMA resource (mem leak??)
hi,
I'm unable to free DVMA resources associated with an DMA handle previously established by ddi_dma_addr_bind_handle(9F).
Here is a section of the driver code:
if((ddi_dma_alloc_handle(dip, &av276_dma_attr,
DDI_DMA_SLEEP, NULL,
&dma_chdes->iopbh))!= DDI_SUCCESS){
deallocate_dma_transaction_node(trnsp);
return(NULL);
if(ddi_dma_mem_alloc(dma_chdes->iopbh,
sizeof(struct av276_chain_des),
&av276_endian_attr, DDI_DMA_CONSISTENT,
DDI_DMA_SLEEP, NULL,
(caddr_t*)&dma_chdes->chdes,
&dma_chdes->length,
&dma_chdes->acch)!= DDI_SUCCESS){
deallocate_dma_transaction_node(trnsp);
return(NULL);
if(ddi_dma_addr_bind_handle(dma_chdes->iopbh, NULL,
(caddr_t)dma_chdes->chdes,
dma_chdes->length,
DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
DDI_DMA_SLEEP, NULL,
&dma_chdes->cookie,
&dma_chdes->cookie_cnt) != DDI_DMA_MAPPED){
deallocate_dma_transaction_node(trnsp);
return(NULL);
AV276_DEBUG2("Chain des DVMA address %x.",
dma_chdes->cookie.dmac_address);
AV276_DEBUG2("Chain des Cookie count %d.",
dma_chdes->cookie_cnt);
AV276_DEBUG2("Chain des Cookie Size %d.",
dma_chdes->cookie.dmac_size);
.............../* start DMA stuff */
/* free DMA resources associated with the handle */
ddi_dma_unbind_handle(dma_chdes->iopbh);
ddi_dma_mem_free(&dma_chdes->acch);
ddi_dma_free_handle(&dma_chdes->iopbh);
Here is the debug output between two DMA test runs:
Test run 1-
# Chain des DVMA address c0050fa0.
# Chain des Cookie count 1.
# Chain des Cookie Size 32.
Test run 2 -
# Chain des DVMA address c0060fa0.
# Chain des Cookie count 1.
# Chain des Cookie Size 32.
I see a memory leak (64K) for each run. Why in this case using ddi_dma_unbind_handle(9F) does not free the resources ? am I missing something else ?
Any suggetions ?
- vivekHi,
More information -
I further investigated why I get the DVMA address in increments of 64K (even after freeing the resource). The sun IOMMU documents describes that U2p supports two different page sizes, 8k and 64k. The bind handle returns in increments of 64K so I presume the TSB uses 64K page size. am I ok with this assumption ??
So I run another test and I noticed that the DVMA address returned by ddi_dma_addr_bind_handle(9F) always starts at 0xc0000000 in increments of 64K up to a maximum of 0xc1ff0000 (512 entries). Then the address resets back to 0xc0000000.
This not a leak as I previously assumed. The ddi_dma_addr_handle(9F) does free the resources but the alloc algorithm implements a circular counter.
Well, correct me if my assumptions are incorrect. thanks -
ABAP OO class-based workflow, wait step
Hello,
I'm hoping someone is able to help me. I've implemented a class which triggers a custom workflow through a custom event of the class. At one point during the workflow I want to use a wait step that waits for another custom event to occur. I've created my second event which I want to trigger from an ABAP ALV Grid report for users, that will allow them to select the specific workflows to trigger this event for. My problem is, I am having trouble figuring out how to find the correct object instance of my class from within the ABAP program and trigger the event specifically for that instance, so that the workflow can continue and eventually complete. I have implemented the IF_WORKFLOW interface and up to this point the workflow is functioning correctly.
Thanks,
LeslieHello,
Sorry, not sure where my brain was. Actually I do know: at two clients with projects going live this month, so apologies for a rushed and inaccurate response. It's CL_SWF_EVT_EVENT.
Jocelyn's blog I referred to includes a code sample using the same class on how to raise an event with an object key.
Regarding your second question: No you don't need to do any binding. Just use an instance of your object and it will wait for an event with the same key. The WF part is very straightforward and works exactly like BOR, it's just raising event that can't be done with the WAPI.
Cheers,
Mike -
Abap code inspector (tx : SCI) to detect certain patterns
Hello Experts,
I want to use SAP Code Inspector to detect common problematic ABAP codes for all developed programs.
But, I don't know how to make the check variant for detecting follwoing three patterns.
SELECT * FROM
SELECT * INTO
SELECT SINGLE * INTO
I guess I can use "Search for ABAP tokens" or "Search for ABAP statements paterns". But, It did'nt work because ' * ' represents any sequence of characters in the code inspector.
Anyone can help me?I managed to set up the variant, however found a problem.
I used "Search ABAP Statement Patterns" under "Search Functs" and set the pattern like followings.
SELECT + INTO *
SELECT SINGLE + INTO *
However following statements were detected.
SELECT * INTO TABLE IT_DRAW FROM DRAW.
SELECT MANDT INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE * INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE MANDT INTO TABLE IT_DRAW FROM DRAW.
It's because + means one ABAP token in the code inspector.
Is there anyway to find only "SELECT SINGLE *" and "SELECT *" ? -
Help pls... Need to find scenarios, processes & step names of a project
Hello SolMan-Development Gurus,
Hello Jurgen, Henry, Sangita, Pramod, Stephane,
I am sure somebody can help me. I am in a need to determine the hierarchy of scenarios/processes/process steps that I created in my project in an ABAP program.
Can you pls guide me? Seems like these details are not stored in any database table. If so, how to get these details?
best regds,
Alagammai.Those look like they're probably LaunchAgents or LaunchDaemons. In the Finder, choose Go -> Go to Folder, then paste in each of the following paths, one at a time:
~/Library/LaunchAgents
/Library/LaunchDaemons
In each of those folders, look for any files with names beginning with "com.mcafee" and remove them. Then log out and log back in (or just restart the computer).
Of course, that doesn't guarantee that nothing else was left behind somewhere else. -
Abap program to find the list of reports in complete
I know we can get from sap easy access in
information system but that is not all reports as I always find some report
which is not listed there so we want to freeze the list and we want to know
if we have any abap program If u can send me the code or any standard
program that find and list the reports
soniyaCheck the table TRDIR and write the select statements to display.
Check the fm :F4_PROGRAM: code.
Message was edited by: Eswar Kanakanti -
Standard iViews in WebDynpro for ABAP: where to find?
Dear Community,
does anybody know a source where to find information about SAP standard iViews shipped by SAP as WebDynpro for ABAP?
Thanx and regards,
Stefan
Edited by: Stefan Kaiser on Jun 25, 2008 2:28 PMi guess a bug
-
Finding Memory Leak in LabVIEW
Hi NG,
we wrote a sort of hugh application in labview that collaborates with our
..NET driven
device framework and a variaty of unmanged c++ libs.
As we are now close to the release we did performance testing and it showed
up that
the app is consuming more memory continously.
We used prefomance counter to check whether the managed objects might not
get garbage collected
but this is done OK, since the handle count stays at a constant level.
We tried to figure out whether one of the c++ libs is causing the problem
but this is not the case either, since
the memory leak exists even if the lib functions are just not being called.
Even labview profiler is not detecting any inconvenient memory consumption
of any of our vis but
windows task manager notices a constant memory consumtion of the executable
(or of labview.exe itselve when running in
dev. environment).
Does anybody know what this might be? Has anybody a clue what other tools we
could use to figure out
where the problem is?
Any help is greatly appreciated.
Thanks in advance, Sebastian Dau!"mfitzsimons" <[email protected]> wrote in message
news:[email protected]..
> Sebastian,
> Memory leaks can be VERY hard to find. I use the divide and conquer
> technique that involves chunking (make into smaller code segments) your
> code into smaller pieces and running the smaller pieces until you find the
> memory leak. It can take weeks to find the source.
you accelerate this process by using the labview profiler.
> The most common is arrays or any data that increases in size as the
> program runs. To fix this you can use a FIFO that allows only so
> many elements to be added before deleting data out of the array. The
> second source is opening references repeatedly and not closing them.
> Look closely at any VI that open anything. Do a search for "Memory
> Leak" on the discussion forum and you will find about 60 postings that may
> help.
> Matt
> If you are using DAQ-MX <a
> href="http://digital.ni.com/public.nsf/allkb/BAF29EE03747EE4B86256E9700541436?OpenDocument"
> target="_blank">http://digital.ni.com/public.nsf/allkb/BAF29EE03747EE4B86256E9700541436?OpenDocument</a>
>
>
arrays and refs have already been checked.
thanks, Sebastian -
CS6 can't find download - followed steps
Hi there, I purchased CS6 Standard for students and teachers. Followed the steps to find and download - but there was no link to download CS6.
Sorry I then noticed that where I follwed the steps it has this showed up "
Electronic Download(s) / Subscription(s): Expected Arrival Date Tuesday, January 29, 2013"
Does this just mean I won't be able to download product until then?
Sorry just one stressed student, new to Adobe
Thanks,
MelissaWhich exact Adobe product?
If you mean Adobe Creative Suite Design Standard CS6 then you can download the Trial from the Adobe website while waiting for your order to be sorted (an ESD should be immediate though unless verification checks are required).
http://www.adobe.com/go/trydesignstandard/ -
Is it possible to find the memory leak using the following command
java -Xprof <classname>Regards
ackumarHere is the output for one of my class. I didn't use any "java.net" class in my code.
But it shows java.net.SocketInputStream.socketRead() is interpreted 50.0%
I am in bit confusion . So plz help me.
Flat profile of 93.41 secs (4041 total ticks): main
Interpreted + native Method
50.0% 0 + 2012 java.net.SocketInputStream.socketRead0
0.0% 0 + 1 java.lang.ClassLoader$NativeLibrary.load
0.0% 0 + 1 java.net.SocketOutputStream.socketWrite0
0.0% 0 + 1 java.lang.ClassLoader.defineClass0
0.0% 0 + 1 sun.misc.URLClassPath$7.getInputStream
0.0% 0 + 1 com.mysql.jdbc.SingleByteCharsetConverter.<clinit>
0.0% 0 + 1 com.mysql.jdbc.MysqlIO.checkErrorPacket
0.0% 0 + 1 com.mysql.jdbc.Connection.<init>
50.2% 0 + 2019 Total interpreted
Compiled + native Method
0.4% 15 + 0 cern.colt.matrix.impl.DenseDoubleMatrix2D.zMult
0.2% 7 + 0 java.lang.FloatingDecimal.readJavaFormatString
0.1% 4 + 0 com.mysql.jdbc.ResultSet.getString
0.1% 0 + 3 java.lang.String.<init>
0.1% 3 + 0 com.mysql.jdbc.SingleByteCharsetConverter.toString
0.0% 2 + 0 cern.colt.matrix.impl.DenseDoubleMatrix2D.getQuick
0.0% 2 + 0 com.mysql.jdbc.Buffer.readFieldLength
0.0% 0 + 2 java.io.BufferedInputStream.read1
0.0% 1 + 1 java.lang.FloatingDecimal.doubleValue
0.0% 2 + 0 java.lang.Integer.parseInt
0.0% 1 + 0 java.util.ArrayList.get
0.0% 1 + 0 java.util.HashMap.hash
0.0% 1 + 0 com.mysql.jdbc.MysqlIO.readFully
0.0% 1 + 0 com.mysql.jdbc.Connection.getCharsetConverter
0.0% 1 + 0 com.mysql.jdbc.ResultSet.getInt
0.0% 1 + 0 cern.colt.matrix.impl.DenseDoubleMatrix1D.assign
1.2% 42 + 6 Total compiled
Stub + native Method
48.3% 0 + 1943 java.net.SocketInputStream.socketRead0
48.3% 0 + 1943 Total stub
Thread-local ticks:
0.4% 18 Blocked (of total)
0.0% 2 Interpreter
0.3% 11 Compilation
Flat profile of 0.01 secs (1 total ticks): DestroyJavaVM
Thread-local ticks:
100.0% 1 Blocked (of total)
Global summary of 93.43 seconds:
100.0% 4127 Received ticks
2.1% 85 Received GC ticks
0.0% 2 Interpreter
Maybe you are looking for
-
Message Mapping - To Retrieve IDoc No. using Meesage ID
Hi Experts, In a scenario where in File will be sent from Third Party to SAP which contains a Message ID, which is in reference to the acknowledgement of IDOC sent from SAP to Third Party. Now what I need to find out is using this Message ID I need t
-
Exported PDF's from FormsCentral show text until submitted to 3rd party application
Hello, I'm running into an issue when trying to export a group of PDF forms that were created in FormsCentral they do show text when opened with Adobe Reader. However if another program attempts to read the PDF it does not show the text input by end
-
What are Data sources for 0PUR_c10
Hi , Now iam activating BCT for 0PUR_c10 cube in BI 7.0 before activating in BI side can i know 1. what are the Data sources for can i activate in RSA5 in r/3 side for Tranastion data and master data ?for that 0PUR_c10 cube ? 2. plz tell me , what ar
-
How to get back my application ?
Hi everybody... I created an application in htmldb.oracle.com and made preferences as run application only after completing my whole project. Now i am unable to see my application in the application builder nor am unable to recollect the application
-
Informatica and sometimes i have ora-3135
hello gurus, when i download/upload data from database production to my datawarehouse, i receive ora-3135 then i suppose it is timeout problem. 1 - in the parameters informatica (client ) where my i increase the parameter timeout ? 2 - how may