And there is no log message about the mutex before it dies?

   ERROR: accessMutex() call with a NULL mutex [%s:%d]
or
   ERROR: accessMutex() call with an UN-INITIALIZED mutex [%s:%d]
?

The code is SO simple:

#ifdef MULTITHREADED
    accessMutex(&myGlobals.gdbmMutex, "updateOSName");
#endif

    if(myGlobals.gdbm_file == NULL) {
#ifdef MULTITHREADED
      releaseMutex(&myGlobals.gdbmMutex);
#endif
      return; /* ntop is quitting... */
    }

    data_data = gdbm_fetch(myGlobals.gdbm_file, key_data);

#ifdef MULTITHREADED
    releaseMutex(&myGlobals.gdbmMutex);
#endif


Are you SURE you are tracing the RIGHT thread?

Do a "show threads" first, then id which one is 3076 and do a "thread 3" or
whatever the # is, before the bt full...


-----Burton



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Earl C. Terwilliger
Sent: Monday, July 15, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [Ntop-dev] NTOP 2.1 segmentation fault


Hello,

Got a trace this time!
let me know if more is needed
Earl


gdb /usr/local/bin/ntop

set args ntop -d  -i "eth0,eth1,eth2" -S 1 -b localhost:4000 -m
"xxxx.xx.21.0/24,xxxx.xx.22.0/24,xxxx.xx.23.0/24" -n -M -P /temp -u ntop -W
0
--ignore-sigpipe

run

---lots of inserts deleted

15/Jul/2002 14:36:45 INSERT INTO TCPsessions (Client, Server, ClientPort,
ServerPort, DataSent, DataRcvd, FirstSeen, LastSeen) VALUES ('200.62.22.25',
'200.62.10.15', '48911', '80', '9220', '27112', '2002-07-15 14:29:11',
'2002-07-15 14:36:43')

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3076 (LWP 22880)]
0x404a0e58 in __pthread_alt_unlock () from /lib/libpthread.so.0
(gdb) list
735     /* ************************************ */
736
737     /* That's the meat */
738     #ifdef WIN32
739     int ntop_main(int argc, char *argv[]) {
740     #else
741     int main(int argc, char *argv[]) {
742     #endif
743       int i, userSpecified;
744       char ifStr[196] = {0};
(gdb) info stack
#0  0x404a0e58 in __pthread_alt_unlock () from /lib/libpthread.so.0
#1  0x4049d158 in pthread_mutex_unlock () from /lib/libpthread.so.0
#2  0x40257de5 in _releaseMutex (mutexId=0x8052320, fileName=0x4025f1aa
"util.c", fileLine=2983)
    at util.c:1068
#3  0x4025b098 in updateOSName (el=0x414abb58) at util.c:2983
#4  0x402564bb in updateDbHostsTraffic (deviceToUpdate=2) at traffic.c:548
#5  0x40247362 in updateDBHostsTrafficLoop (notUsed=0x0) at ntop.c:595
#6  0x4049bf77 in pthread_start_thread () from /lib/libpthread.so.0
(gdb)
(gdb) bt full
#0  0x404a0e58 in __pthread_alt_unlock () from /lib/libpthread.so.0
No symbol table info available.
#1  0x4049d158 in pthread_mutex_unlock () from /lib/libpthread.so.0
No symbol table info available.
#2  0x40257de5 in _releaseMutex (mutexId=0x8052320, fileName=0x4025f1aa
"util.c", fileLine=2983)
    at util.c:1068
        mutexId = (PthreadMutex *) 0x8052320
        fileName = 0x4025f1aa "util.c"
        rc = 609483071
#3  0x4025b098 in updateOSName (el=0x414abb58) at util.c:2983
        theName = 0x0
        tmpBuf = "@9.77.251.101", '\0' <repeats 179 times>, "2002-07-15
14:34:43\0ul/2002 14:32002-07-15 14:34:46\0\0\0\0\0��?���(@"
        key_data = {dptr = 0xbf3ff9ac "@9.77.251.101", dsize = 14}
        data_data = {dptr = 0x0, dsize = 0}
#4  0x402564bb in updateDbHostsTraffic (deviceToUpdate=2) at traffic.c:548
        deviceToUpdate = 2
        i = 379
        el = (HostTraffic *) 0x414abb58
#5  0x40247362 in updateDBHostsTrafficLoop (notUsed=0x0) at ntop.c:595
        i = 2
#6  0x4049bf77 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
(gdb)

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

Reply via email to