static void updateElementHashItem(ElementHash **theHash,
u_short srcId, u_short dstId,
Counter numPkts, Counter numBytes, u_char dataSent) {
u_int myIdx = 0, idx = srcId % MAX_ELEMENT_HASH;
ElementHash *hash, *prev;
while(1) {
if((theHash[idx] == NULL) || (theHash[idx]->id == srcId))
break;
idx = (idx+1) % MAX_ELEMENT_HASH;
if(++myIdx == MAX_ELEMENT_HASH) {
traceEvent(CONST_TRACE_WARNING, "updateElementHash(): hash full!");
return;
}
}
Basically, it's not finding an empty or matching element in the hash
table... The hash limit is set in globals-defines.h:
/*
* Size of the AS and VLAN hashes, created by allocateElementHash() and
dumped by
* dumpElementHash().
*/
#define MAX_ELEMENT_HASH 4096
I know of no reason you couldn't make it larger - it's a memory trade off.
If it allocates anything, it allocates that many entries
void allocateElementHash(int deviceId, u_short hashType) {
int memLen = sizeof(ElementHash*)*MAX_ELEMENT_HASH;
switch(hashType) {
case 0: /* AS */
if(myGlobals.device[deviceId].asHash == NULL) {
myGlobals.device[deviceId].asHash = (ElementHash**)malloc(memLen);
memset(myGlobals.device[deviceId].asHash, 0, memLen);
}
break;
case 1: /* VLAN */
if(myGlobals.device[deviceId].vlanHash == NULL) {
myGlobals.device[deviceId].vlanHash = (ElementHash**)malloc(memLen);
memset(myGlobals.device[deviceId].vlanHash, 0, memLen);
}
break;
}
}
(All code from util.c)
-----Burton
|\ _,,,---,,_ "If I purr, you must have fed me.
/,`.-'`' -. ;-;;,_ If the network purrs, it must
<|,4- ) )-,_..;\ ( `'-' be ntop!" -----Pixel
'---''(_/--' `-'\_)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tony
Hernandez
Sent: Wednesday, February 26, 2003 2:38 PM
To: [EMAIL PROTECTED]
Subject: [Ntop] updateElementHash(): hash full!
Hey all, I am running Ntop v2.1.55 ( latest snap wont compile ) I get these
messages in the log:
Feb 26 15:22:06 graback ntop[209]: updateElementHash(): hash full!
Feb 26 15:22:30 graback last message repeated 1484 times
Feb 26 15:22:46 graback last message repeated 1100 times
Feb 26 15:22:46 graback ntop[209]: WARNING: accessMutex() call with a
self-LOCKED mutex [from 209 at pbuf.c:551 updateInterfacePorts]
As you can see, they happen a LOT.
I just got netflows running on it, and sometimes it just bombs without a
trace, not leaving much in the line of *why it crashed in the logs not
really much debug. Seems to run ok when its not listening for netflows tho.
anyone have a clue about this or experiences ?
This is all the logs say when it dumps -
Feb 26 15:27:26 graback /kernel: pid 209 (ntop), uid 65534: exited on signal
11
Feb 26 15:27:26 graback /kernel: dc0: promiscuous mode disabled
--
Tony Hernandez (53:61:72:67:65:6E:74)
Computer Programmer Analyst
Division of Housing
University of Florida
"All your base are belong to us!" - Zero Wing
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop