Requested Info as
++++++++++++++++++++++++++++++++++++++++++++++++
Fri Jan 21 06:06:06 2005  Resetting stats on user request...
Fri Jan 21 06:06:06 2005  Resetting traffic statistics for device eth0
Fri Jan 21 06:06:06 2005  Resetting traffic statistics for device
sb-internet
Fri Jan 21 06:06:06 2005  User requested stats reset complete

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 131081 (LWP 22394)]
0x4177d6ba in netflowMainLoop (_deviceId=0x1) at netflowPlugin.c:1153
1153
if(FD_ISSET(myGlobals.device[deviceId].netflowGlobals->netFlowInSo
cket, &netflowMask)){

(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) print deviceId
No symbol "deviceId" in current context.
(gdb) print
The history is empty.
(gdb) print myGlobals.device[0x1].netflowGlobals
$1 = (NetFlowGlobals *) 0x0
(gdb) print myGlobals.device[1].netflowGlobals
$2 = (NetFlowGlobals *) 0x0
(gdb) print *myGlobals.device[0x1].netflowGlobals
Cannot access memory at address 0x0
(gdb)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++

\\ Naman
-----Original Message-----
From: Burton Strauss [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 1:18 PM
To: [email protected]
Subject: RE: [Ntop] NTOP 3.1 dies on Reset_Stats - PRQ5CVD8B

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
 

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to