Dear Sir,
On Thu, Sep 19, 2002 at 06:49:50AM -0500, Burton M. Strauss III wrote:
> (I changed the subject to something meaningful... Bad user, no biscuit)
>
Quite right. ( <inanity> perhaps you would like 'A walk across America'
by Peter Jenkins </inanity>
> 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) ) {
>
>
Done almost as specified but won't build: can't find backtrace
backtrace_symbola
pc09011> diff -u config.h config.h.dist
--- config.h Fri Sep 20 12:00:05 2002
+++ config.h.dist Fri Sep 20 11:55:26 2002
@@ -89,7 +89,6 @@
/* Define if you have backtrace */
/* #undef HAVE_BACKTRACE */
-#define HAVE_BACKTRACE 1
/* Defines for endian-ness... */
#define NTOP_LITTLE_ENDIAN 1
pc09011> diff -u ntop.c ntop.c.dist
--- ntop.c Fri Sep 20 12:03:10 2002
+++ ntop.c.dist Fri Sep 20 11:57:15 2002
@@ -755,7 +755,7 @@
}
#ifdef HAVE_BACKTRACE
- if ( (signo == SIGSEGV) || (signo == SIGBUS) ) {
+ if (signo == SIGSEGV) {
void *array[20];
size_t size;
char **strings;
pc09011> diff -u initialize.c initialize.c.dist
--- initialize.c Fri Sep 20 11:56:57 2002
+++ initialize.c.dist Fri Sep 20 11:56:09 2002
@@ -1270,7 +1270,6 @@
if(myGlobals.debugMode) {
/* Activate backtrace trap on -K flag */
setsignal(SIGSEGV, cleanup);
- setsignal(SIGBUS, cleanup);
}
#endif
}
pc09011>
gcc -shared emitter.lo globals-report.lo graph.lo http.lo report.lo
reportUtils.lo webInterface.lo -lcrypt -lm -lz
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/gd-1.8.3 -lgd
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/gd-1.8.3/libpng-1.2.1
-lpng -L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/zlib-1.1.4
-lz -lc_r -lcrypt -lm -lz -lgd -lpng -lz -Wl,-soname
-Wl,libntopreport-2.1.so.2 -o .libs/libntopreport-2.1.so.2
(cd .libs && rm -f libntopreport-2.1.so && ln -s libntopreport-2.1.so.2
libntopreport-2.1.so)
(cd .libs && rm -f libntopreport.so && ln -s libntopreport-2.1.so.2
libntopreport.so)
ar cru .libs/libntopreport.a emitter.o globals-report.o graph.o http.o
report.o reportUtils.o webInterface.o
ranlib .libs/libntopreport.a
creating libntopreport.la
(cd .libs && rm -f libntopreport.la && ln -s ../libntopreport.la
libntopreport.la)
gcc -DHAVE_CONFIG_H -I. -I/usr/local/include
-I/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c
-I/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/zlib-1.1.4 -g
-O2 -pipe -c main.c
gcc -DHAVE_CONFIG_H -I. -I/usr/local/include
-I/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c
-I/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/zlib-1.1.4 -g
-O2 -pipe -c admin.c
/bin/sh ./libtool --mode=link gcc -g -O2 -pipe -o ntop main.o admin.o
libntopreport.la libntop.la -lc_r -lcrypt -lm -lz
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c -lgdchart
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/gd-1.8.3 -lgd
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/gd-1.8.3/libpng-1.2.1
-lpng -L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/zlib-1.1.4
-lz
gcc -g -O2 -pipe -o .libs/ntop main.o admin.o ./.libs/libntopreport.so
-lcrypt -lm -lz -L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c
-lgdchart -L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/gd-1.8.3
-lgd
-L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/gd-1.8.3/libpng-1.2.1
-lpng -L/usr/home/anwsmh/build/ntop-2.0.99-rc1/gdchart0.94c/zlib-1.1.4
-lz -lcrypt -lm -lz -lgdchart -lgd -lpng -lz ./.libs/libntop.so -lpcap
-L/usr/local/lib -lgdbm -lcrypt -lm -lz -lgdchart -lgd -lpng -lz -lc_r
-lcrypt -lm -lz -lgdchart -lgd -lpng -lz -Wl,--rpath
-Wl,/usr/local/ntop-2.1.2/lib
/usr/lib/libc.so: WARNING! setkey(3) not present in the system!
/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider
using mkstemp()
/usr/lib/libc.so: WARNING! des_setkey(3) not present in the system!
/usr/lib/libc.so: WARNING! encrypt(3) not present in the system!
/usr/lib/libc.so: warning: tmpnam() possibly used unsafely; consider
using mkstemp()
/usr/lib/libc.so: warning: this program uses f_prealloc(), which is not
recommended.
/usr/lib/libc.so: WARNING! des_cipher(3) not present in the system!
/usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider
using mkstemp()
/usr/libexec/elf/ld: warning: libpng.so.5, needed by
/usr/local/lib/libgd.so.2, may conflict with libpng.so.3
../.libs/libntop.so: undefined reference to `backtrace_symbols'
../.libs/libntop.so: undefined reference to `backtrace'
gmake[2]: *** [ntop] Error 1
gmake[2]: Leaving directory `/usr/home/anwsmh/build/ntop-2.1.2/ntop'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/anwsmh/build/ntop-2.1.2/ntop'
gmake: *** [all-recursive-am] Error 2
pc09011>
The same result follows gmake clean; gmake.
> 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
>
Option 2.
Grrr. It works flawlessly on my test build.
Will try on problem host(s).
Thank you,
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