Skip to content

09 How to Report a Bug

Lorenzo Mangani edited this page Sep 27, 2015 · 1 revision

NTOP

How to report a bug on ntop apps?

Unfortunately it can happen that our apps have a bug that leads them to crash. This note explains how to generate crash information that can be used to reproduce and resolve the issue. Whenever you have a bug to report, we kindly ask you to file one request on our bug tracking system. Please open one bug per issue and do not collapse many issues into a single request as this will make support more complicated. Do not forget to report on the bug request, how you have started the application (complete command line options) and if the bug is easy to reproduce, how to do that.

Unix

In Unix (Linux, OSX, *BSD etc.) when an application crashes it is possible to instruct the system to create a core dump. The core is a file that contains a dump of the process memory and that it can be used for identifying the problem that lead the application to crash. In order to debug an application it is necessary to “prepare” a special version of the application (e.g. ntop, nProbe) for debugging. In order to do that you have to compile the application from source as follows:

  1. cd < yourappsourcecode >
  2. Configure the code using autogen.sh
  3. Before running make please edit the Makefile (in nProbe you need to edit also plugins/Makefile)
  4. In the above Makefile files please delete “-O2” (all platforms) and “-Os” (some OSs) if present.
  5. Make sure (this should always be the case) that you have defined “-g” in the CFLAGS
  6. Run make

At this point you can use this application to generate your core. Please make sure that you have deinstalled other application versions and that you use exactly this binary application.

The generation of the core is often disabled by default. So prior to run the application you have to perform the following steps (note that ntopng does not have plugins):

  1. start the bash shell: bash
  2. sudo su (you become root) on the shell you just started
  3. cd < yourappsourcecode >
  4. cd .libs
  5. ln -s ../plugins . (if you have them)
  6. ulimit -c unlimited
  7. Start the application to debug: ./ntopng (please note the “./” before the app)

As soon the application crashes, a new file named core should be created on the directory you started the application from. At this point, please create a tar file of the application directory (source code, binary application and core dump) and place it on a place we can reach (e.g. a shared dropbox directory) or attach it (if not too big, but we feel this is the case) to the bug you will file on our bug tracking system.

Another option is to report us the bug by providing a crash backtrace. Please read this article for learning how to produce it.

Please be aware that we mostly use x64 Linux (usually Ubuntu and CentOS) hence we might need your support for platforms we do not own.

Windows

Under windows, you do not have to compile the code from source as we provide you already a binary package. However, as you have access to the application source, you are free to debug the issue yourself and send us the code patch so that we can include it on future code versions.

On windows the procedure for creating a crash report is documented on this technical note. Then you can report the bug. Note that in some cases the issue cannot be easily debugged, thus we might need to provide you a new application binary with extra debug information. We will provide you this binary if needed. On our side we use Windows 7, so if possible we ask you to use the same OS to ease debugging.

Clone this wiki locally