Dear Ladies and Gentlemen, Here is an attempt at an Ntop PR for the current CVS (24 Sep 2003 -2.2.95) on FreeBSD 4.8-p7.
Synopis: Ntop stops with a SEGV after initialising threads Log mesages: Sep 25 13:44:54 pc09011 /kernel: fxp0: promiscuous mode enabled Sep 25 13:46:33 pc09011 /kernel: pid 15700 (ntop), uid 0: exited on signal 11 (core dumped) Sep 25 13:46:33 pc09011 /kernel: pid 15692 (ntop), uid 0: exited on signal 11 Sep 25 13:46:35 pc09011 /kernel: pid 15699 (ntop), uid 0: exited on signal 11 (core dumped) Sep 25 13:47:13 pc09011 /kernel: fxp0: promiscuous mode disabled pc09011> gdb: pc09011# gdb ntop/bin/ntop GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf (gdb) set args set args -K -c -u root -P /var/log/ntop -w 3000 -i fxp0 (gdb) q pc09011# gdb ntop/bin/ntop GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf (gdb) set args -K -c -u root -P /var/log/ntop -w 3000 -i fxp0 (gdb) r Starting program: /usr/local/ntop/bin/ntop -K -c -u root -P /var/log/ntop -w 3000 -i fxp0 25/Sep/2003 13:44:54 ntop v.2.2.95 MT (SSL) [i386-unknown-freebsd4.8] (09/24/03 07:54:17 PM build) 25/Sep/2003 13:44:54 Copyright 1998-2003 by Luca Deri <[EMAIL PROTECTED]> 25/Sep/2003 13:44:54 Get the freshest ntop from http://www.ntop.org/ 25/Sep/2003 13:44:54 Initializing ntop 25/Sep/2003 13:44:54 **WARNING** Truncated network size (device fxp0) to 1024 hosts (real netmask 255.0.0.0) 25/Sep/2003 13:44:54 Resetting traffic statistics for device fxp0 25/Sep/2003 13:44:54 Initializing gdbm databases 25/Sep/2003 13:44:54 Now running as requested user 'root' (0:0) 25/Sep/2003 13:44:54 VENDOR: Loading MAC address table. 25/Sep/2003 13:44:54 VENDOR: Checking './specialMAC.txt.gz' 25/Sep/2003 13:44:54 VENDOR: Checking '/usr/local/ntop-2.2.95/etc/ntop/specialMAC.txt.gz' 25/Sep/2003 13:44:54 VENDOR: File '/usr/local/ntop-2.2.95/etc/ntop/specialMAC.txt.gz' does not need to be reloaded 25/Sep/2003 13:44:54 VENDOR: Checking './oui.txt.gz' 25/Sep/2003 13:44:54 VENDOR: Checking '/usr/local/ntop-2.2.95/etc/ntop/oui.txt.gz' 25/Sep/2003 13:44:54 VENDOR: File '/usr/local/ntop-2.2.95/etc/ntop/oui.txt.gz' does not need to be reloaded 25/Sep/2003 13:44:54 **WARNING** AS: Unable to open file 'AS-list.txt.gz'. 25/Sep/2003 13:44:54 I18N: This instance of ntop does not support multiple languages 25/Sep/2003 13:44:54 IP2CC: Looking for IP address <-> Country code mapping file 25/Sep/2003 13:44:54 IP2CC: reading file '/usr/local/ntop-2.2.95/etc/ntop/p2c.opt.table.gz' 25/Sep/2003 13:44:55 IP2CC: 49056 records read 25/Sep/2003 13:44:55 Initializing external applications 25/Sep/2003 13:44:55 Initializing semaphores, mutexes and threads 25/Sep/2003 13:44:55 NOTE: atfork() handler registered for mutexes, rc 0 Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) 25/Sep/2003 13:44:55 THREADMGMT: Packet processor thread running... (gdb) (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. 25/Sep/2003 13:46:12 THREADMGMT: Started thread (1026) for network packet analyser 25/Sep/2003 13:46:12 THREADMGMT: Started thread (2051) for idle hosts detection 25/Sep/2003 13:46:12 THREADMGMT: Idle host scan thread running... Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. 25/Sep/2003 13:46:19 THREADMGMT: Started thread (3076) for DNS address resolution 25/Sep/2003 13:46:19 THREADMGMT: Address resolution thread running... Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGUSR2, User defined signal 2. 0x2830aa48 in sigsuspend () from /usr/lib/libc.so.4 (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0xbfbfffa8 in ?? () (gdb) list 870 int ntop_main(int argc, char *argv[]) { 871 #else 872 int main(int argc, char *argv[]) { 873 #endif 874 int i, rc, userSpecified; 875 #ifndef WIN32 876 int effective_argc; 877 char **effective_argv; 878 #endif 879 char ifStr[196] = {0}; (gdb) info stack #0 0xbfbfffa8 in ?? () #1 0x282c35f7 in __pthread_suspend_old () from /usr/local/lib/liblthread.so.2 #2 0x282c0445 in flockfile () from /usr/local/lib/liblthread.so.2 #3 0x283456f6 in vfprintf () from /usr/lib/libc.so.4 #4 0x28332f76 in printf () from /usr/lib/libc.so.4 #5 0x28111355 in traceEvent (eventTraceLevel=3, file=0x2811c0e8 "plugin.c", line=385, format=0x2811c420 "Calling plugin start functions (if any)") at util.c:2024 #6 0x28107493 in startPlugins () at plugin.c:385 #7 0x280f703b in initNtop (devices=0x8074100 "") at globals-core.c:553 #8 0x804cb02 in main (argc=11, argv=0xbfbffba4) at main.c:1096 #9 0x804ac02 in _start () (gdb) bt full #0 0xbfbfffa8 in ?? () No symbol table info available. #1 0x282c35f7 in __pthread_suspend_old () from /usr/local/lib/liblthread.so.2 No symbol table info available. #2 0x282c0445 in flockfile () from /usr/local/lib/liblthread.so.2 No symbol table info available. #3 0x283456f6 in vfprintf () from /usr/lib/libc.so.4 No symbol table info available. #4 0x28332f76 in printf () from /usr/lib/libc.so.4 No symbol table info available. #5 0x28111355 in traceEvent (eventTraceLevel=3, file=0x2811c0e8 "plugin.c", line=385, format=0x2811c420 "Calling plugin start functions (if any)") at util.c:2024 theTime = 1064461592 t = {tm_sec = 32, tm_min = 46, tm_hour = 13, tm_mday = 25, tm_mon = 8, tm_year = 103, tm_wday = 4, tm_yday = 267, tm_isdst = 0, tm_gmtoff = 36000, tm_zone = 0x282d032c "EST"} bufTime = "25/Sep/2003 13:46:32", '\000' <repeats 27 times> buf = "25/Sep/2003 13:46:32 Calling plugin start functions (if any)", '\000' <repeats 962 times> bufMsg = "Calling plugin start functions (if any)", '\000' <repeats 984 times> bufMsgID = '\000' <repeats 63 times> beginFileIdx = 0 mFile = 0x0 va_ap = 0xbfbff8a8 "\034�\021( \023\022(�\222\021(\003" #6 0x28107493 in startPlugins () at plugin.c:385 flows = (FlowFilterList *) 0x0 #7 0x280f703b in initNtop (devices=0x8074100 "") at globals-core.c:553 No locals. #8 0x804cb02 in main (argc=11, argv=0xbfbffba4) at main.c:1096 value = "\000�\a(\000�\a(\000�\a(\000�\a(\230���\001\000\000\000\234�������" i = 11 rc = 4 userSpecified = 1 effective_argc = 672273184 effective_argv = (char **) 0x8075000 ifStr = '\000' <repeats 195 times> lastTime = 1064461494 cmdLineBuffer = 0x0 readBuffer = 0x0 readBufferWork = 0x28121320 "\224\020\a\b" fd = (FILE *) 0x78e530f fileStat = {st_dev = 2, st_ino = 671588352, st_mode = 41216, st_nlink = 10247, st_uid = 671588864, st_gid = 671513870, st_rdev = 671575144, st_atimespec = { tv_sec = 671589376, tv_nsec = 671513870}, st_mtimespec = {tv_sec = 671575144, tv_nsec = 671588352}, st_ctimespec = {tv_sec = 134518509, tv_nsec = 672038944}, st_size = 2894480595768288000, st_blocks = 2884453306767145652, st_blksize = 673924116, st_flags = 16777232, st_gen = 671589120, st_lspare = -1077937652, st_qspare = { 17179869200, 2884100482698050276}} #9 0x804ac02 in _start () No symbol table info available. (gdb) q The program is running. Exit anyway? (y or n) y pc09011# I am not sure if I have operated gdb correctly. Your advice is welcome if what has been posted is stupid. Yours sincerely. -- Stanley Hopcroft WHAT CAN I DO FOR YOU? (Words and Music by Bob Dylan) You have given everything to me. What can I do for You? You have given me eyes to see. What can I do for You? Pulled me out of bondage and You made me renewed inside, Filled up a hunger that had always been denied, Opened up a door no man can shut and You opened it up so wide And You've chosen me to be among the few. What can I do for You? You have laid down Your life for me. What can I do for You? You have explained every mystery. What can I do for You? Soon as a man is born, you know the sparks begin to fly, He gets wise in his own eyes and he's made to believe a lie. Who would deliver him from the death he's bound to die? Well, You've done it all and there's no more anyone can pretend to do. What can I do for You? _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop-dev
