Need Help?


FAQ


Visit the nmon Knowledgebase archive.

Bug Reports


Bugzilla

Note: in order to fill-in bug reports you must first create a new bugzilla account

Groups


Facebook

LinkedIn

What To Do In Case of Crash


In the unlikely case of crash, we need to apply a code patch. In addition to reporting the problem verbally, it is helpful to also try to debug the application so that we can have an idea of where the problem could be. You do not have to be a programmer to do that, as with some simple steps you can help us making debugging easier.

Step 1. Enable Debugging In The Code

By default the GNU toolchain enables debugging symbols in the Makefile. Unfortunately it also enables code optimization that makes debugging difficult. Thus you need to remove optimization doing these simple steps:

  1. cd <ntop or nProbe directory>
  2. ./autogen.sh
  3. ./configure
  4. Edit Makefile and plugins/Makefile files and remove from it -O2 and -Os. Note that depending on your platform it might be that -Os is no present. Save the Makefile‘s.
  5. make

Step 2. Run The Application

The GNU toolchain creates the binary files inside the .libs directory. You need to run the code from such directory and not from the directory where you have compiled ntop or nProbe. Most platforms do not generate core dumps in case of crash thus it’s also necessary to enable core dump generation prior to run the code. This is done in different wait depending on the shell you use.

  1. cd <ntop or nProbe directory>/.libs
  2. ln -s ../plugins . (nProbe with Plugins and ntop)
  3. ln -s ../html . (ntop only)
  4. sudo su (become root)
  5. ulimit -c unlimited (bash) or limit coredumpsize unlimited (tcsh)
  6. export LD_LIBRARY_PATH=. (Linux) or export DYLD_LIBRARY_PATH=. (Mac OS X).
  7. Finally run the application: ./ntop <put your options here>

Step 3. Wait Until The Problem Shows Up

Crashing the application is something that can take some time. Thus you have to be patient, and use the application as usual. When the crash happens a core dump should be generated. Depending on the platform the core is saved into the same directory where you have started the application, or on MacOS X it can be found in the /cores directory. Usually the core file is named core, sometimes it has a PID (process ID) appended to it cores.<PID>

Step 4. Analyze The Core File

In order to analyze the core file you need to install the gdb debugger. Done that you can debug the core as follows (we suppose you use the bash shell and that you are still in the cd <ntop or nProbe directory>/.libs directory).:

  1. Run the gdb: gdb ntop core. At this point the debugger will open a shell where you can run commands.
  2. Backtrace
    (gdb) bt
    #0 0x00007fff96a6ee42 in __semwait_signal ()
    #1 0x00007fff92d55dea in nanosleep ()
    #2 0x00000001060d7601 in _ntopSleepMSWhileSameState (file=0x105fa8d82 "main.c", line=678, ulDelay=5000) at util.c:4103
    #3 0x00000001060d77e9 in _ntopSleepWhileSameState (file=0x105fa8d82 "main.c", line=678, secs=5) at util.c:4131
    #4 0x0000000105f9eb09 in main (argc=6, argv=0x7fff65b99ae0) at main.c:678
  3. Show threads information
    (gdb) info threads
    6 0x00007fff96a6faf2 in read ()
    5 0x00007fff96a6edf2 in select$DARWIN_EXTSN ()
    4 0x00007fff96a6ebca in __psynch_cvwait ()
    3 0x00007fff96a6ee42 in __semwait_signal ()
    2 0x00007fff96a6ee42 in __semwait_signal ()
    * 1 0x00007fff96a6ee42 in __semwait_signal ()

Step 5. Contact Us

Package the above trace information and contact us, or post a bug request so we can track it.