Good... Well, at least that eliminates one class of problems.
These messages:
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: createNetFlowDevice(2)
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: createNetFlowDevice created device 1
Pretty well ensure that the deviceId[] 1 was created. If that worked (static
int createNetFlowDevice(int netFlowDeviceId) {} around line 2147), then the
allocation of memory worked and myGlobals.device[deviceId].netflowGlobals
should be valid. And yet to get the SIGSEGV, it's got to be bogus...
So... When it crashes, do this:
(gdb) print deviceId
(gdb) print myGlobals.device[deviceId].netflowGlobals
(gdb) print *myGlobals.device[deviceId].netflowGlobals
Thanks...
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Naman Latif
Sent: Thursday, January 20, 2005 2:43 PM
To: [email protected]
Subject: RE: [Ntop] NTOP 3.1 dies on Reset_Stats - PRQ5CVD8B
I re-tested on a new Linux Box. NTOP 3.1 still dies on "Reset Stats". In this
setup only 1 netflow device exists. Below is the relevant info
1. All related NETFLOW lines from the log file (when NTOP starts) show nothing
abnormal.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: Welcome to NetFlow.(C) 2002-04 by Lu
ca Deri
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: initializing '2' devices
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: createNetFlowDevice(2)
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: initializing deviceId=1
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: White list initialized to ''
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: Black list initialized to ''
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: Created a UDP socket (13)
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: Collector listening on port 2055
Jan 20 12:22:37 ravi ntop[6067]: NETFLOW: createNetFlowDevice created device 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2. The gdb trace\commands as below
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thu Jan 20 12:14:14 2005 Resetting stats on user request...
Thu Jan 20 12:14:14 2005 Resetting traffic statistics for device eth0 Thu Jan
20 12:14:14 2005 Resetting traffic statistics for device sb-internet Thu Jan
20 12:14:14 2005 User requested stats reset complete
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 131081 (LWP 5013)]
0x4177d6ba in netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:1153
1153 if(FD_ISSET(myGlobals.device[deviceId].netflowGlobals->netFlowInSo
cket, &netflowMask)){
(gdb)
(gdb)
(gdb)
(gdb) list
1148 maxSock = myGlobals.device[deviceId].netflowGlobals->netFlowInSc
tpSocket;
1149 }
1150 #endif
1151
1152 if((rc = select(maxSock+1, &netflowMask, NULL, NULL, NULL)) > 0) {
1153 if(FD_ISSET(myGlobals.device[deviceId].netflowGlobals->netFlowInSo
cket, &netflowMask)){
1154 len = sizeof(fromHost);
1155 rc = recvfrom(myGlobals.device[deviceId].netflowGlobals->netFlow
InSocket,(char*)&buffer, sizeof(buffer),
1156 0,(struct sockaddr*)&fromHost, &len);
1157 }
(gdb) info stack
#0 0x4177d6ba in netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:1153
#1 0x41286c60 in pthread_start_thread () from /lib/libpthread.so.0
#2 0x41286cdf in pthread_start_thread_event () from /lib/libpthread.so.0
(gdb)
(gdb) bt full
#0 0x4177d6ba in netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:1153
netflowMask = {__fds_bits = {262144, 0 <repeats 31 times>}}
rc = 1
len = 16
buffer =
"\0\005\0\036Âââ\210Aâ\021\024'Dââ\by\016\211\0\0\0\0ââÂââ\232N
'â\232N'\0\002\0\001\0\0\0\002\0\0\001\0Ââ\207KÂâ\207â\0P\234/=\032\006\0\0\0\0\
0\0\032fGâ\232N<âMNTâ\232Aâ\0\001\0\002\0\0\0\001\0\0\0hÂâ\207\233Âââ207\233\001
\001â6\020\021\0\0\0\0\0\032\0STââ\005râ\232N\005â\232N\005\0\002\0\001\0\0\0\00
1\0\0\0IÂâ\210\003Ââ\210\003\200\002\05M\020\021\0\0\0\0\0\0\032\003Jâ\232N\005â
â
\005r\0\0\0\0\0\001\0\0\0\0\0\001\0\0\0âÂâ\210\003Ââ\210\003"...
fromHost = {sin_family = 2, sin_port = 37594, sin_addr = {
s_addr = 3482996225}, sin_zero = "\0\0\0\0\0\0\0"}
#1 0x41286c60 in pthread_start_thread () from /lib/libpthread.so.0 No symbol
table info available.
#2 0x41286cdf in pthread_start_thread_event () from /lib/libpthread.so.0 No
symbol table info available.
(gdb)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3. "set args" were @/config -u root -K
Contents of "config" were
#--interface eth0,eth2
--interface eth0
--protocols /home/ntop/config/ntop-protocol_sb-internet.list
#--user ntop
--disable-sessions
--db-file-path /home/ntop/internet
--no-interface-merge
--http-server 172.17.4.51:3000
#--local-subnets "172.16.0.0/16,172.17.0.0/24,172.17.1.0/24,172.17.4.0/24,172.17
.5.0/24,172.29.1.0/24,192.168.0.0/24,192.168.1.0/24,192.168.5.0/24"
#--filter-expression "not net (10.3.0.0/16 or 192.168.50.0/24)"
#--track-local-hosts
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop