Memory debugging operations performed on multi-threaded programs can cause the target program to crash with a floating point exception. On the terminal where you started MemoryScape, you will see the error message:
TV_AVL: insert: duplicate key. (bug 10288)
If you receive a memory event such as trying to free a block not on the heap and you look at the Process Event dialog and click on the Block Details tab, MemoryScape crashes with an internal error.
mpirun -tv ...
and TotalView is in your PATH, even if you set the environment variable TOTALVIEW to memscape, it will launch MemoryScape. To workaround this problem, start MemoryScape on a LAM/MPI job as follows:
memscape mpirun -a ...
An alternative is to use the New Program dialog box. Please see the TotalView Users Guide or your online help for more information.
If you use MemoryScape on a 64-bit application and that application execs a 32-bit application, the 32-bit application fails to load and the 64-bit application does not function properly. This is also true for 32-bit applications execing 64-bit applications.
You can work around this issue by permanently linking your application with the heap interposition agent (HIA). Please refer to the "Debugging Memory Problems with MemoryScape" guide for instructions on how to do this.
A problem with the user malloc() replacement on AIX 5.3 prevents us from being able to construct a working Heap Interposition Agent. You may see Illegal Instruction errors if you try to use MemoryScape. For MemoryScape to work correctly it must have the following fixes installed:
% instfix -k IY66938 -i -v IY66938 Abstract: user-defined malloc does not work in AIX 53 Fileset bos.adt.prof:5.3.0.30 is applied on the system. Fileset bos.rte.libc:5.3.0.30 is applied on the system. % instfix -k IY78436 -i -v IY78436 Abstract: User Defined MALLOC doesn't work with _malloc_user_defined_Fileset bos.adt.prof:5.3.0.41 is applied on the system. Fileset bos.rte.libc:5.3.0.41 is applied on the system.
If you run MemoryScape on AIX, it may fail when attempting to debug code that contains valloc() or posix_memalign().
Installing tvheap_mr.a requires that the system have the System Calls Application Development Toolkit package installed (bos.adt.syscalls). Installing tvheap_mr.a is a requirement for memory debugging. If you don't install this toolkit, you will probably get a message such as:
% ./aix_install_tvheap_mr.sh ./tvheap_mr.tar /tmp building 32-bit malloc replacement for the TotalView Heap Tracker ld: 0706-003 Cannot find or read import file: /usr/lib/lowsys.exp ld:accessx(): A file or directory in the path name does not exist.
Fortran programs that use Cray pointers may behave incorrectly or crash when run under MemoryScape. This is due to an issue with pass-by-value and pass-by-reference from the malloc() call in the program.
To work around the issue, explicitly pass arguments to malloc by value using the Fortran intrinsic %VAL() function. For example, the following code:
parray = malloc( 4 )
becomes
parray = malloc( %VAL(4) )
Executables that link with the linuxthreads library may deadlock under MemoryScape control on the first call to pthread_create() if the application has blocked a special signal used by the thread library. This is a problem with the glibc implementation in that the library should not allow pthread_sigmask to block the signal. The problem can be resolved by not blocking the signal __SIGRTMIN+2, or by modifying linuxthreads/signals.c in glibc to prevent blocking __pthread_sig_debug.
Using the -fomit-frame-pointer compiler option with GCC can cause the stack backtraces shown by MemoryScape to be incomplete. It can also result in false positive memory leaks. You can disable this compiler option by using the -fnoomit-frame-pointer flag.