(I changed the subject to something meaningful... Bad user, no biscuit)

Without something from the child, it's going to be near impossible to figure
out.

My siginfo.h has this (but it's Linux):

/*
 * SIGBUS si_codes
 */
#define BUS_ADRALN      (__SI_FAULT|1)  /* invalid address alignment */
#define BUS_ADRERR      (__SI_FAULT|2)  /* non-existant physical address */
#define BUS_OBJERR      (__SI_FAULT|3)  /* object specific hardware error */
#define NSIGBUS         3


So -- two ways to do this (I've not tried either, but they should work):

1. Try running with -K -- that should enable the automatic backtrack, if
possible.

(Check config.h:

           config.h:    90   /* Define if you have backtrace */
           config.h:    91   #define HAVE_BACKTRACE 1

You may need to add SIGBUS to the code in initialize.c:

#ifndef WIN32
  /* Setup signal handlers */
  setsignal(SIGTERM, cleanup);
  setsignal(SIGINT,  cleanup);
  setsignal(SIGHUP,  handleSigHup);
  setsignal(SIGPIPE, ignoreThisSignal);
  setsignal(SIGABRT, ignoreThisSignal);
  if(myGlobals.debugMode) {
    /* Activate backtrace trap on -K flag */
    setsignal(SIGSEGV, cleanup);
  }
#endif

e.g.

  if(myGlobals.debugMode) {
    /* Activate backtrace trap on -K flag */
    setsignal(SIGSEGV, cleanup);
    setsignal(SIGBUS, cleanup);
}

And again in ntop.c:

  if (signo == SIGSEGV) {

e.g.

  if ( (signo == SIGSEGV) || (signo == SIGBUG) ) {


Option 2.

Comment out the definition of FORK_CHILD_PROCESS in ntop.h.  This should
stop ntop from forking to handle the "read only" URL.

Then run under gdb (instructions are at http://snapshot.ntop.org)



If it works (i.e. still fails the same way), #2 will give better info.


-----Burton




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Stanley Hopcroft
Sent: Thursday, September 19, 2002 1:38 AM
To: [EMAIL PROTECTED]
Subject: Re: [Ntop-dev] 2.1.50 .tgz and rpms - are available on
SourceForge - finally


Dear Ladies and Gentlemen,

I am writing to report what may be a minor bug in ntop-2.1.50.

The extraction of data using the URL

http://NtopHost:3000/dumpTrafficData.html?language=perl&key=InterfaceName

no longer works.

pc09011> lwp-request -x
'http://tssyd:3000/dumpTrafficData.html?language=perl&key=fxp0'
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::simple_request: GET
http://tssyd:3000/dumpTrafficData.html?language=perl&key=fxp0
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::http::request: GET
/dumpTrafficData.html?language=perl&key=fxp0 HTTP/1.0
Host: tssyd:3000
User-Agent: lwp-request/1.39

LWP::Protocol::http::request: reading response
LWP::Protocol::http::request: HTTP/1.0 200 OK
LWP::Protocol::http::request: HTTP/1.0 200 OK
LWP::Protocol::http::request: need more header data
LWP::UserAgent::request: Simple response: OK
pc09011>

(The same result happens if I use a slighlty modified version of
protoUsage.pl in /ntop/www/RRD. I have been using this for some days on
2.1.2 systems and apart from the occasional signal 11, from 2.1.2
there have been no problems)

Each request forks a new ntop that abends with signal 10 (SIGBUS on this
FreeBSD 4.6.1-RELEASE system)

Sep 19 16:08:53 tssyd ntop[18372]: Extending hash size
[newSize=512][deviceId=0]
Sep 19 16:10:02 tssyd /kernel: pid 18464 (ntop), uid 65534: exited on
signal 10
Sep 19 16:10:02 tssyd /kernel: pid 18465 (ntop), uid 65534: exited on
signal 10
Sep 19 16:15:01 tssyd /kernel: pid 18507 (ntop), uid 65534: exited on
signal 10
Sep 19 16:15:01 tssyd /kernel: pid 18508 (ntop), uid 65534: exited on
signal 10
Sep 19 16:20:03 tssyd /kernel: pid 18558 (ntop), uid 65534: exited on
signal 10
Sep 19 16:20:03 tssyd /kernel: pid 18559 (ntop), uid 65534: exited on
signal 10
Sep 19 16:20:33 tssyd /kernel: pid 18562 (ntop), uid 65534: exited on
signal 10
Sep 19 16:21:22 tssyd /kernel: pid 18569 (ntop), uid 65534: exited on
signal 10
Sep 19 16:23:49 tssyd /kernel: pid 18578 (ntop), uid 65534: exited on
signal 10
Sep 19 16:23:55 tssyd /kernel: pid 18579 (ntop), uid 65534: exited on
signal 10
Sep 19 16:25:02 tssyd /kernel: pid 18596 (ntop), uid 65534: exited on
signal 10
Sep 19 16:25:02 tssyd /kernel: pid 18597 (ntop), uid 65534: exited on
signal 10
Sep 19 16:25:32 tssyd /kernel: pid 18600 (ntop), uid 65534: exited on
signal 10

However, ntop is still responds as expected with other HTTP requests:
the graphs and pie charts look fine.

The details

. the URL above works fine with 2.1.2 and 2.1-1 on the same system (no
change in OS, build method - apart from the new libpng, or hardware)

. ntop built from source from SourceForge.Net

. ./buildAll.sh in gdchart

. ./configure --prefix=/usr/local/ntop-2.1.50 --disable-ssl

. gmake complains about missing HTTP prototypes but builds Ok

inter-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-fPIC -Wp,-MD,.deps/http.pp -c http.c  -fPIC -DPIC -o .libs/http.lo
http.c:670: warning: no previous prototype for `returnHTTPbadRequest'
http.c:674: warning: no previous prototype for `returnHTTPaccessDenied'
http.c:678: warning: no previous prototype for
`returnHTTPaccessForbidden'
http.c:682: warning: no previous prototype for `returnHTTPpageNotFound'
http.c:686: warning: no previous prototype for `returnHTTPpageGone'
http.c:690: warning: no previous prototype for
`returnHTTPrequestTimedOut'
http.c:694: warning: no previous prototype for
`returnHTTPnotImplemented'
http.c:698: warning: no previous prototype for
`returnHTTPversionNotSupported'

Yours sincerely.


--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

Reply via email to