The Problems
Assembler is shown instead of source code
Check to make sure that you compiled your program using -g.
Error creating new process
- Increase the swap space on your machine. For details, see Swap Space.
- Increase the number of process slots in your system. See your operating system documentation for details.
- Check the xterm window to see if the execve() call failed, and if it did, set the PATH environment variable.
- Make sure that the /proc file system is mounted on your system. For details, see Mounting the /proc File System.
Error launching process
- Run your program from the UNIX command line prompt to see if it will load and start executing. (If it will not start from the UNIX command line, TotalView will not be able to start it.) If it does not run, make sure your program is built for the machine on which you are debugging. Or, an execv() system call fails because the file does not have execute permission. Or, maybe you are trying to run a 64-bit application on a machine that only runs 32-bit applications.
- Check that all shared libraries needed by your application are accessible. For example, you may not have properly set the dynamic library runtime loader path (which is LD_LIBRARY_PATH on most systems).
- Run your program from the UNIX command-line prompt to see if it will load and start executing. If it begins executing, you can start TotalView, and then attach to the executing program.
- TotalView cannot launch programs that are started by shell scripts. If it must be started by a shell script, you must manually start it and then attach to it from within TotalView.
Fatal error: Checkout ... failed
- Check the value of the LM_LICENSE_FILE environment variable. Make sure the value ends with the string license.dat. The default location for this file is in the flexlm-6.1 subdirectory within your TotalView installation directory.
- Make sure the TotalView license manager lmgrd is running on the license manager host machine. The name of this machine is listed in the SERVER line of your license.dat file. The default location for this daemon is in the flexlm-6.1/platform/bin subdirectory within your TotalView installation directory.
- Make sure that the lmgrd that is running matches the one that came with your TotalView distribution. That is, if you are running other software that uses the FLEXlm license manager or if you have not upgraded an older version of FLEXlm, you might not be running the latest version.
Fatal error in TotalView
Report this problem.
Hangs while debugging
If you use a process-level single-stepping command in a multiprocess program, TotalView may appear to be hung (it continuously displays the watch cursor). If you single-step a process over a statement that cannot complete without allowing another process to run and that process is stopped, the stepping process appears to hang. In parallel programs, this can occur when you try to single-step a process over a communication operation that cannot complete without the participation of another process. When this happens, you can abort the single-step operation by selecting yes from the question box that will appear. As an alternative, consider using a group-level single-step command instead.
Internal error in TotalView
Report this problem.
Invalid license key
Compare the format of your license.dat license key file with the one displayed in Chapter 2 of the TotalView Installation Guide. If you find stray characters in the file (for example "=3D"), use a text editor to remove them. After making these changes, stop the lmgrd license manager daemon and then restart it using the toolworks_init script.
License manager does not operate correctly
Set the LM_LICENSE_FILE environment variable to the path name of the TotalView license file. See the TotalView Installation Guide for details.
Out-of-memory error
Pressing Ctrl-C in an xterm window causes TotalView to exit
Start TotalView by using the -ignore_control_c command-line option.
Program behaves differently under TotalView control: setuid issues
Make sure your program does not execute the setuid or exec functions or invoke another program that does, for example, rsh. Normally, the operating system does not allow a debugger to debug a setuid executable nor allow a setuid system call while a program is being debugged. Often these operations fail silently. To debug setuid programs, log in as the target UID before starting TotalView.
Program behaves differently under TotalView control: SIGSTOP problems
TotalView uses the SIGSTOP signal to stop processes. On most UNIX systems, system calls can fail with errno set to EINTR when the process receives a SIGSTOP signal. You need to change your code so that it handles EINTR failures. For example:
do {
n = read(fd,buf,nbytes);
} while (n < 0 && errno == EINTR);
When a system call is interrupted with a signal (for example, errno == EINTR), you need to retry it. This problem occurs because TotalView stops processes when it updates the displays. If the process is in a system call, the system call fails with EINTR.
For example, assume that your program has the following code fragment:
printf("creating scheduler thread...");
if (0 != (status = pthread_create(
&scheduler_thread, &detached_attr,
&scheduler_thread_wrapper, (void *)scheduler))) {
error_func(ERR_LVL, __FILE__, __LINE__,
"Pthread_create sScheduler, %d, %s",
status, strerror(status));
}
You could restructure it to:
printf("creating scheduler thread...");
do {
status = pthread_create(
&scheduler_thread, &detached_attr,
&scheduler_thread_wrapper, (void *)scheduler);
} while (0 != status && errno == EINTR);
if (0 != status) {
error_func(ERR_LVL, __FILE__, __LINE__,
"Pthread_create sScheduler, %d, %s",
status, strerror(status));
}
Program symbols are not shown
Check to make sure that you compiled your program using -g.
Single-stepping is slow or TotalView is slow to respond to breakpoints
- Close some of the Variable Windows that you have open.
- The Globals Window is open and has a large number of variables. Close the Globals Window.
- If you set a breakpoint in a source file that has not yet been referenced or if you single-step into one, TotalView must read the file's symbol table. This can temporarily delay TotalView's response.
Source code does not appear in Source Pane
- Set the search path for directories with the File > Search Path command in the Process Window.
- TotalView may be in the kernel or in a library routine for which source is not available.
TotalView cannot find your source code
Set the search path for directories with the File > Search Path command in the Process Window.
TotalView server (tvdsvr) fails to start on a remote node
Edit the Server Launch string within the File > Preferences Launch Strings Page, and relaunch the server. For information, see Starting the TotalView Debugger Server.
When debugging HPF programs, HPF source code does not appear in the Process Window; only f77 code appears
When compiling HPF programs, be sure to set the -g and -Mtotalview options when compiling and linking your programs.
Windows do not appear or operate correctly
- Your DISPLAY environment variable is not set correctly.
- The resource totalview*useTransientFor is not set correctly. Change it from on to off, or from off to on.
- Use the xhost + command to allow all hosts to access your display.
X resources are not recognized