Almost certainly not related. And I still don't have a answer to my
questions...
Yes, the null mutex is a problem, but it's not what you think it is. The
message really means an un-initialized mutex:
int _accessMutex(PthreadMutex *mutexId, char* where,
char* fileName, int fileLine) {
int rc;
if(!mutexId->isInitialized) {
traceEvent(TRACE_ERROR,
"ERROR: accessMutex() call with a NULL mutex [%s:%d]\n",
fileName, fileLine);
return(-1);
}
...lock it
}
With the call to _accessMutex via a macro, is typically this:
#ifdef MULTITHREADED
accessMutex(&myGlobals.lsofMutex, "readLsofInfo");
#endif
As you can see, there isn't any action taken if it fails.
The mutex protects threads from updating the same data. So you could
certainly get bogus counts, lost packets, etc. but it shouldn't affect the
basic ntop processes. If it corrupted a pointer, I'd expect a segmentation
fault.
So, I don't think this is Bharat's problem. But without the information
I've asked for, I can't really go much further...
All that said, as to why mutexes are getting uninitialized, that's the key
question. This issue has surfaced periodically, but nobody's ever had a
reproducible way to cause it, so that I could try and capture the data...
If you CAN recreate it, the task is to run under gdb and put a watchpoint on
changing the value of isInitialized so we can see where it's getting
set/cleared... What I've done is to start ntop under gdb and then
immediately control-c to get attention back. Then issue the following
command:
watch myGlobals.addressResolutionMutex.isInitialized
You should see the 0->1 as it's created and then I'm interested in any
transition from 1->0...
But it doesn't fail for me <grin />
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Parker,
Michael
Sent: Thursday, March 28, 2002 2:27 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Ntop] When network service restarts.
I can verify that something is wrong with NTOP...I have the latest snapshot
(and the previous snapshot) 27/28 Mar 2002.
It seems if anybody accesses the ntop data through the web interface @ port
3000 I get buckets full of the attached over and over and over again.
Command line in use for the daemons:
/usr/local/bin/ntop -u root -n -w 3000 -r 600 -d -i
eth0 -M -P/var/log/ntop -E -e 2048
And the syslog output:
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [webInterface.c:232]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [webInterface.c:286]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [util.c:2490]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [util.c:2500]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [webInterface.c:232]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [webInterface.c:286]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [util.c:2490]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [util.c:2545]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [webInterface.c:232]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [webInterface.c:286]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [util.c:2490]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [util.c:2500]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [webInterface.c:232]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [webInterface.c:286]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [util.c:2490]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [util.c:2500]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: accessMutex() call with a NULL
mutex [webInterface.c:232]
Mar 28 11:32:20 snorty ntop[13105]: ERROR: releaseMutex() call with a NULL
mutex [webInterface.c:286]
-----Original Message-----
From: Burton M. Strauss III [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 6:13 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [Ntop] When network service restarts.
"... ping that machine which runs NTOP..."
ping is a program that comes with the OS and uses ICMP packets. It has
nothing to do with ntop...
If it's the ntop program that's died, that's a different story.
Of course, you haven't given us any information about what you're running
and how - check the "HOWTO ask for help" in the FAQs at
http://snapshot.ntop.org/.
Once ntop restarts, data is gone - check the back posts on the list and the
FAQs - there is information about the -S flag.
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bharat
Merja
Sent: Tuesday, March 26, 2002 3:27 AM
To: NTOP Querry
Subject: [Ntop] When network service restarts.
Hi!
Thanks to all in advance.
After starting NTOP we are seeing this error then after unable to ping that
machine which runs NTOP. the message by syslog is
**********************
Mar 26 14:29:38 Ns2 ntop[1656]: updateDbHostsTraffic(device=0)
Mar 26 14:30:09 Ns2 ntop[4353]: ERROR: accessMutex() call with a NULL mutex
[web
Interface.c:752]
Mar 26 14:30:09 Ns2 ntop[4353]: ERROR: releaseMutex() call with a NULL mutex
[we
bInterface.c:757]
Mar 26 14:30:09 Ns2 ntop[4353]: ERROR: accessMutex() call with a NULL mutex
[web
Interface.c:763]
Mar 26 14:30:09 Ns2 ntop[4353]: ERROR: releaseMutex() call with a NULL mutex
[we
bInterface.c:789]
*****************************
After restarting network service it stops to capturing data .. any shortcut
to restart NTOP again without lossing past data.
Coments from all are invited.
Thanking you
Regards
Bharat Merja.
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop