Hello,
I am running Ntop RC2 built from current 6/29/2002 source on a Redhat 7.3
system (Pentium III 866 with 128M) and am getting a segmentation fault.
(I am monitoring three interfaces here but it faults even if I monitor one)
(I was getting the same error on RedHat 7.0 too)
Here is the configuration file and gdb trace.
let me know if more is needed. I am not on the list so please email me
seperately.
thanks
Earl
ntop version.....2.0.99
Built on.....07/01/02 02:21:08 PM
OS.....i686-pc-linux-gnu
Command line
Started as..../usr/local/bin/ntop
-i
eth0,eth1,eth2
-P
/temp
-u
root
-K
Command line parameters are:
-a | --access-log-path.....(default) (nil)
-b | --sql-host.....(default) Inactive
-c | --sticky-hosts.....(default) No
-d | --daemon.....No
-e | --max-table-rows.....(default) 128
-f | --traffic-dump-file.....(default) (nil)
-i | --interface (effective).....eth0
-j | --border-sniffer-mode.....(default) Inactive
-k | --filter-expression-in-extra-frame.....(default) No
-l | --pcap-log.....(default) (nil)
-m | --local-subnets (effective).....(default) (nil)
-n | --numeric-ip-addresses.....(default) No
-p | --protocols.....(default) internal list
-q | --create-suspicious-packets.....(default) Disabled
-r | --refresh-time.....(default) 120
-s | --no-promiscuous.....(default) No
-t | --trace-level.....(default) 3
-u | --user.....root (uid=0, gid=0)
-v | --mysql-host.....(default) Inactive
-w | --http-server.....(default) Active, all interfaces, port 3000
-B | --filter-expression.....(default) none
-D | --domain.....none
-E | --enable-external-tools.....(default) No
-F | --flow-spec.....(default) none
-K | --enable-debug.....Yes
-L | --use-syslog.....No
-M | --no-interface-merge (effective).....(parameter -M set, Interfaces
separate) No
-N | --no-nmap (effective).....No (nmap will not be used)
-O | --pcap-file-path.....(default) /usr/local/var/ntop
-P | --db-file-path...../temp
-S | --store-mode.....(default) 0 (none)
-U | --mapper.....(default) (nil)
-W | --https-server.....Uninitialized
--throughput-chart-type.....(default) Area
--ignore-sigpipe.....(default) No
Note: (effective) means that this is the value after ntop has processed
the parameter.
(default) means this is the default value, usually (but not always) set by a
#define in globals.h.
Run time/Internal
External tool: lsof.....(no -E parameter): Disabled
External tool: nmap.....(no -E parameter): Disabled
Web server URL.....http://<any>:3000
SSL Web server (https://).....Not Active
GDBM version.....This is GDBM version 1.8.0, as of May 19, 1999.
OpenSSL Version.....OpenSSL 0.9.6b [engine] 9 Jul 2001
zlib version.....1.1.4
TCP Session Handling.....Enabled
Protocol Decoders.....Enabled
Fragment Handling.....Enabled
Tracking only local hosts.....No
# IP Protocols Being Monitored.....16
# Protocol slots.....994
# IP Ports Being Monitored.....946
# Ports slots.....1892
# Handled SIGPIPE Errors.....0
# Handled HTTP Requests.....27
Host Memory Cache Size.....0
Devices (Network Interfaces).....3
Domain name (short).....
Packet queue
Queued to Process.....0
Maximum queue.....0
Host Hash counts
Actual Hash Size.....512
Stored hosts.....193 [37 %]
Purge idle hosts.....Enabled
Purged hosts.....0
TCP Session counts
Sessions.....5
Terminated.....2467
Address counts
Queued.....11
Resolved with DNS.....109
Kept Numeric.....99
Found in Cache.....0
Dropped.....0
Thread counts
Active.....8
Dequeue.....1
Children (active).....0
Directory (search) order
Data files.....
0. .
1. /usr/local/share/ntop
Config files.....
0. .
1. /usr/local/etc/ntop
2. /etc
Plugins.....
0. ./plugins
1. /usr/local/lib/ntop/plugins
Compile Time: ./configure
./configure parameters.....
Built on (Host).....i686-pc-linux-gnu
Built for (Target).....i686-pc-linux-gnu
compiler (cflags).....gcc -g -O2 -pipe -DHAVE_CONFIG_H
include path.....-I/usr/include/pcap -I/opt/ntop/ntop-current/gdchart0.94c
-I/opt/ntop/ntop-current/gdchart0.94c/zlib-1.1.4 -I/usr/include/openssl
core libraries.....-lpcap -lgdbm
system libraries.....-lpthread -lresolv -lnsl -ldl -L/usr/lib/mysql
-lmysqlclient
additional libraries.....-lcrypt -lm -lz -L/opt/ntop/ntop-current/gdchart0.94c
-lgdchart -L/opt/ntop/ntop-current/gdchart0.94c/gd-1.8.3 -lgd
-L/opt/ntop/ntop-current/gdchart0.94c/gd-1.8.3/libpng-1.2.1 -lpng
-L/opt/ntop/ntop-current/gdchart0.94c/zlib-1.1.4 -lz -lssl -lcrypto
install path...../usr/local
Compile Time: Debug settings in ntop.h
DEBUG.....no
ADDRESS_DEBUG.....no
DNS_DEBUG.....no
DNS_SNIFF_DEBUG.....no
FRAGMENT_DEBUG.....no
FTP_DEBUG.....no
GDBM_DEBUG.....no
HASH_DEBUG.....no
HOST_FREE_DEBUG.....no
HTTP_DEBUG.....no
MEMORY_DEBUG.....no
NETFLOW_DEBUG.....no
PACKET_DEBUG.....no
SEMAPHORE_DEBUG.....no
SESSION_TRACE_DEBUG.....no
STORAGE_DEBUG.....no
UNKNOWN_PACKET_DEBUG.....no
PRINT_ALL_SESSIONS.....no
PRINT_RETRANSMISSION_DATA.....no
FORK_CHILD_PROCESS.....yes (normal)
Compile Time: Debug settings in ntop.h
DEBUG.....no
ADDRESS_DEBUG.....no
DNS_DEBUG.....no
DNS_SNIFF_DEBUG.....no
FTP_DEBUG.....no
GDBM_DEBUG.....no
HASH_DEBUG.....no
HOST_FREE_DEBUG.....no
HTTP_DEBUG.....no
MEMORY_DEBUG.....no
NETFLOW_DEBUG.....no
SEMAPHORE_DEBUG.....no
SESSION_TRACE_DEBUG.....no
STORAGE_DEBUG.....no
UNKNOWN_PACKET_DEBUG.....no
PRINT_ALL_SESSIONS.....no
PRINT_RETRANSMISSION_DATA.....no
FORK_CHILD_PROCESS.....yes (normal)
Compile Time: config.h
ASYNC_ADDRESS_RESOLUTION.....yes
CONFIGFILE_DIR - config file directory...../usr/local/etc/ntop
DATAFILE_DIR - data file directory...../usr/local/share/ntop
DBFILE_DIR - database file directory...../usr/local/var/ntop
DEBUG.....no
SUPPORT_SSLV3.....no
ETHER_HEADER_HAS_EA.....no
HAVE_ALLOCA_H.....present
HAVE_ARPA_INET_H.....present
HAVE_ARPA_NAMESER_H.....present
HAVE_BACKTRACE.....present
HAVE_CRYPT_H.....present
HAVE_CTIME_R.....present
HAVE_DIRENT_H.....present
HAVE_DLFCN_H.....present
HAVE_DL_H.....absent
HAVE_ERRNO_H.....present
HAVE_ETHERTYPE_H.....absent
HAVE_FCNTL_H.....present
HAVE_GDBM_H.....present
HAVE_GDCHART.....present
HAVE_GETIPNODEBYADDR.....absent
HAVE_GETOPT_LONG.....present
HAVE_IF_H.....absent
HAVE_INTxx_T Signed ints.....64 present, 32 present, 16 present,8 present
HAVE_U_INTxx_T Unsigned ints.....64 present, 32 present, 16 present,8 present
HAVE_LIBC.....absent
HAVE_LIBC_R.....absent
HAVE_LIBDL.....present
HAVE_LIBGDBM.....absent
HAVE_LIBKSTAT.....absent
HAVE_LIBNSL.....present
HAVE_LIBPCAP.....absent
HAVE_LIBPOSIX4.....absent
HAVE_LIBPTHREAD.....present
HAVE_LIBPTHREADS.....absent
HAVE_LIBRESOLV.....present
HAVE_LIBSOCKET.....absent
HAVE_LIBWRAP (TCP Wrappers).....absent
HAVE_LOCALTIME_R.....present
HAVE_MYSQL.....present
HAVE_MYSQL_MYSQL_H.....present
HAVE_NCURSES_H.....present
HAVE_NETDB_H.....present
HAVE_NETINET_IF_ETHER_H.....present
HAVE_NETINET_IN_H.....present
HAVE_NETINET_IN_SYSTM_H.....present
HAVE_NETINET_IP_H.....present
HAVE_NETINET_IP_ICMP_H.....present
HAVE_NETINET_TCP_H.....present
HAVE_NETINET_UDP_H.....present
HAVE_NET_BPF_H.....absent
HAVE_NET_ETHERNET_H.....present
HAVE_NET_IF_H.....present
HAVE_OPENSSL.....present
HAVE_PTHREAD_H.....present
HAVE_PWD_H.....present
HAVE_READLINE.....present
HAVE_READLINE_READLINE_H.....present
HAVE_REGEX.....present
HAVE_SCHED_H.....absent
HAVE_SECURITY_PAM_APPL_H.....present
HAVE_SEMAPHORE_H.....present
HAVE_SHADOW_H.....present
HAVE_SIGNAL_H.....present
HAVE_SNPRINTF.....present
HAVE_STDIO_H.....present
HAVE_STDLIB_H.....present
HAVE_STRING_H.....present
HAVE_STRSEP.....present
HAVE_STRTOK_R.....present
HAVE_SYSLOG_H / HAVE_SYS_SYSLOG_H.....present / present
HAVE_SYS_IOCTL.....absent
HAVE_SYS_LDR_H.....absent
HAVE_SYS_SCHED_H.....absent
HAVE_SYS_SELECT_H.....present
HAVE_SYS_SOCKET_H.....present
HAVE_SYS_SOCKIO_H.....absent
HAVE_SYS_STAT_H.....present
HAVE_SYS_TIME_H.....present
HAVE_SYS_TYPES_H.....present
HAVE_SYS_UN_H.....present
HAVE_SYS_WAIT_H.....present
HAVE_TCPD_H.....absent
HAVE_UNISTD_H.....present
HAVE_ZLIB (HTTP gzip compression).....present
HAVE_ZLIB_H.....present
MULTITHREADED.....yes
YES_IGNORE_SIGPIPE.....no
NEED_GETDOMAINNAME (getdomainname(2) function).....yes
NEED_INET_ATON.....no
NTOP_xxxxxx_ENDIAN (Hardware Endian).....little
PLUGIN_DIR (plugin file directory...../usr/local/lib/ntop/plugins
RUN_DIR (run file directory)...../usr/local/var/ntop
STDC_HEADERS (ANSI C header files).....yes
Compile Time: Switches, Limits, etc. (various #defines)
CGI Scripts.....globals.h: #define USE_CGI
Alternate row colors.....globals.h: #undef USE_COLOR
Buggy gethostbyaddr() - use alternate implementation.....globals.h: #undef
USE_HOST
Chart Format.....globals-report.h: #define CHART_FORMAT ".png"
Bad IP Address table size.....globals.h: #define MAX_NUM_BAD_IP_ADDRESSES 3
Bad IP Address timeout (seconds).....ntop.h: #define
NTOP_DEFAULT_BAD_ACCESS_TIMEOUT 300
Hosts Cache table size.....ntop.h: #define MAX_HOSTS_CACHE_LEN 512
Minimum refresh interval (seconds).....ntop.h: #define MIN_REFRESH_TIME 15
Maximum # of Protocols to show in graphs.....ntop.h: #define MAX_NUM_PROTOS 64
Maximum # of routers (Local Subnet Routers report).....ntop.h: #define
MAX_NUM_ROUTERS 512
Maximum # of network interface devices.....ntop.h: #define MAX_NUM_DEVICES 32
Maximum # of processes for lsof report.....ntop.h: #define MAX_NUM_PROCESSES
1024
Maximum network size (hosts per interface).....ntop.h: #define
MAX_SUBNET_HOSTS 1024
Allocated # of passive FTP sessions.....ntop.h: #define NUM_SESSION_INFO 128
Maximum # of passive FTP sessions (not used).....ntop.h: #define
MAX_NUM_SESSION_INFO 256
Inactive passive FTP session timeout (seconds).....ntop.h: #define
PASSIVE_SESSION_PURGE_TIMEOUT 60
Compile Time: Hash Table Sizes
Initial size.....ntop.h: #define HASH_INITIAL_SIZE 32
After 1st extend.....ntop.h: #define HASH_MINIMUM_SIZE 512
Intermediate increase factor.....ntop.h: #define HASH_INCREASE_FACTOR 2
Factor growth until.....ntop.h: #define HASH_FACTOR_MAXIMUM 4096
Then grow (linearly) by.....ntop.h: #define HASH_TERMINAL_INCREASE 4096
Mutexes:
Mutex gdbmMutex, is unlocked.
locked: 2847 times, last was http.c:1829
unlocked: 2847 times, last was http.c:1852
longest: 3 sec from address.c:545
Mutex addressResolutionMutex, is unlocked.
locked: 949 times, last was sql.c:105
unlocked: 949 times, last was sql.c:121
longest: 0 sec from sql.c:121
Mutex hashResizeMutex, is locked.
locked: 3449 times, last was http.c:1164
unlocked: 3448 times, last was sessions.c:516
longest: 0 sec from sessions.c:516
Mutex hostsHashMutex, is unlocked.
locked: 306830 times, last was pbuf.c:1649
unlocked: 306830 times, last was pbuf.c:2271
longest: 3 sec from pbuf.c:2271
[root@NovatekServer ntop]# gdb /usr/local/bin/ntop
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 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-redhat-linux"...
(gdb) set args -i "eth0,eth1,eth2" -P /temp -u root -K
(gdb) run
Starting program: /usr/local/bin/ntop -i "eth0,eth1,eth2" -P /temp -u root -K
[New Thread 1024 (LWP 18981)]
Wait please: ntop is coming up...
01/Jul/2002 15:02:14 Initializing IP services...
SSL is present but https is disabled: use -W <https port> for enabling it
01/Jul/2002 15:02:14 Initializing GDBM...
01/Jul/2002 15:02:14 Initializing network devices...
01/Jul/2002 15:02:14 ntop v.2.0.99 MT (SSL) [i686-pc-linux-gnu] (07/01/02
02:21:08 PM build)
01/Jul/2002 15:02:14 Listening on [eth0,eth1,eth2]
01/Jul/2002 15:02:14 Copyright 1998-2002 by Luca Deri <[EMAIL PROTECTED]>
01/Jul/2002 15:02:14 Get the freshest ntop from http://www.ntop.org/
01/Jul/2002 15:02:14 Initializing...
01/Jul/2002 15:02:14 Truncated network size to 1024 hosts (real netmask
255.255.255.0)
01/Jul/2002 15:02:14 Truncated network size to 1024 hosts (real netmask
255.255.255.0)
01/Jul/2002 15:02:14 Truncated network size to 1024 hosts (real netmask
255.255.255.0)
01/Jul/2002 15:02:14 Loading plugins (if any)...
01/Jul/2002 15:02:14 Searching plugins in /usr/local/lib/ntop/plugins
01/Jul/2002 15:02:15 Welcome to icmpWatchPlugin. (C) 1999 by Luca Deri.
01/Jul/2002 15:02:15 Welcome to LastSeenWatchPlugin. (C) 1999 by Andrea
Marangoni.
01/Jul/2002 15:02:16 Welcome to NetFlow. (C) 2002 by Luca Deri.
01/Jul/2002 15:02:16 Welcome to nfsWatchPlugin. (C) 1999 by Luca Deri.
01/Jul/2002 15:02:17 Welcome to PDAPlugin. (C) 2001-2002 by L.Deri and W.Brock
01/Jul/2002 15:02:18 Welcome to sFlowPlugin. (C) 2002 by Luca Deri.
01/Jul/2002 15:02:18 Resetting traffic statistics...
[New Thread 2049 (LWP 18988)]
[New Thread 1026 (LWP 18989)]
01/Jul/2002 15:02:18 Started thread (1026) for network packet analyser.
[New Thread 2051 (LWP 18990)]
01/Jul/2002 15:02:18 Started thread (2051) for idle hosts detection.
[New Thread 3076 (LWP 18991)]
01/Jul/2002 15:02:18 Started thread (3076) for DNS address resolution.
[New Thread 4101 (LWP 18992)]
01/Jul/2002 15:02:18 Started thread (4101) for address purge.
01/Jul/2002 15:02:18 Initializing plugins (if any)...
01/Jul/2002 15:02:18 NetFlow export disabled
01/Jul/2002 15:02:18 Waiting for HTTP connections on port 3000...
[New Thread 5126 (LWP 18993)]
01/Jul/2002 15:02:18 Started thread (5126) for web server.
01/Jul/2002 15:02:18 Sniffying...
[New Thread 6151 (LWP 18994)]
01/Jul/2002 15:02:18 Started thread (6151) for network packet sniffing on
eth0.
[New Thread 7176 (LWP 18995)]
01/Jul/2002 15:02:18 Started thread (7176) for network packet sniffing on
eth1.
[New Thread 8201 (LWP 18996)]
01/Jul/2002 15:02:19 Started thread (8201) for network packet sniffing on
eth2.
01/Jul/2002 15:02:19 Extending hash size [newSize=512][deviceId=2]
01/Jul/2002 15:02:19 Extending hash size [newSize=512][deviceId=1]
01/Jul/2002 15:02:32 Extending hash size [newSize=512][deviceId=0]
01/Jul/2002 15:06:17 Extending hash size [newSize=1024][deviceId=2]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2051 (LWP 18990)]
0x405877c3 in chunk_free () from /lib/libc.so.6
(gdb) list
723 /* ************************************ */
724
725 /* That's the meat */
726 #ifdef WIN32
727 int ntop_main(int argc, char *argv[]) {
728 #else
729 int main(int argc, char *argv[]) {
730 #endif
731 int i, userSpecified;
732 char ifStr[196] = {0};
(gdb) info stack
#0 0x405877c3 in chunk_free () from /lib/libc.so.6
#1 0x40587548 in free () from /lib/libc.so.6
#2 0x402b7591 in ntop_safefree (ptr=0xbf5ffa4c, file=0x402d9359 "sessions.c",
line=251) at leaks.c:511
#3 0x402c47a8 in freeSession (sessionToPurge=0x8c88c78, actualDeviceId=2,
allocateMemoryIfNeeded=1 '\001')
at sessions.c:251
#4 0x402c4998 in scanTimedoutTCPSessions (actualDeviceId=2) at sessions.c:320
#5 0x402b37a6 in purgeIdleHosts (actDevice=2) at hash.c:471
#6 0x402ba99d in scanIdleLoop (notUsed=0x0) at ntop.c:619
#7 0x40230f77 in pthread_start_thread () from /lib/libpthread.so.0
(gdb)
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev