On Thu, 2005-03-17 at 17:21 -0600, Burton Strauss wrote:
> Tee hee hee... You forgot the "run" command to start the program... Of
> course nothing happens :-)
>
> After run, wait until ntop dies, then do the various info and bt full
> commands...
Ah, of course. /Aaron tries to remember college C classes/ OK, so
after a quick trip through 'man gdb' I did the following:
----------------------------------------------------------------------------
-----
#gdb -q /usr/bin/ntop
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) set args -K -u root -i eth1 @/etc/ntop.conf
(gdb) run
Starting program: /usr/bin/ntop -K -u root -i eth1 @/etc/ntop.conf
[Thread debugging using libthread_db enabled]
[New Thread -1208022816 (LWP 28886)]
Processing file /etc/ntop.conf for parameters...
Thu Mar 17 15:29:53 2005 [MSGID8469382] [globals-core:99] Initializing
gdbm databases
Thu Mar 17 15:29:53 2005 [MSGID0234024] [initialize:900] Opening
database '/usr/share/ntop/prefsCache.db'
Thu Mar 17 15:29:53 2005 [MSGID0234024] [initialize:900] Opening
database '/usr/share/ntop/ntop_pw.db'
Thu Mar 17 15:29:53 2005 [MSGID0364088] [prefs:280] NOTE: Calling
getopt_long to process parameters
[New Thread -1215145040 (LWP 28895)]
[New Thread -1225634896 (LWP 28896)]
[New Thread -1236124752 (LWP 28897)]
[New Thread -1246614608 (LWP 28898)]
[New Thread -1257104464 (LWP 28899)]
[New Thread -1268778064 (LWP 28900)]
Program received signal SIG33, Real-time event 33.
[Switching to Thread -1268778064 (LWP 28900)]
0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb)
----------------------------------------------------------------------------
-----
Interestingly, it hasn't crashed at this point, but it doesn't keep
going either. That is, if I hit the webpage it just hangs forever.
'list' at this point shows the contents of the main() function. If I
use 'c' to continue it will continue. The webpage populates, but
there's no hosts or traffic shown, just the interface without any data.
That doesn't seem like the right approach. OK, so now I read on about
the threads in the FAQ. So now we dive into the active thread and try
to figure out what's up, and why it seems hung in mid-flight.
----------------------------------------------------------------------------
-----
(gdb) info thread
* 7 Thread -1268794448 (LWP 31648) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
6 Thread -1258304592 (LWP 31647) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
5 Thread -1247814736 (LWP 31646) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
4 Thread -1237324880 (LWP 31645) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
3 Thread -1226835024 (LWP 31644) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
2 Thread -1215145040 (LWP 31643) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
1 Thread -1208022816 (LWP 31631) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
(gdb) thread 7
(gdb) bt
#0 0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x0031b541 in ___newselect_nocancel () from /lib/tls/libc.so.6
#2 0x00a8b855 in handleWebConnections (notUsed=0x0) at
webInterface.c:8904
#3 0x0068e3ae in start_thread () from /lib/tls/libpthread.so.0
#4 0x00322aee in clone () from /lib/tls/libc.so.6
(gdb) info stack
#0 0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x0031b541 in ___newselect_nocancel () from /lib/tls/libc.so.6
#2 0x00a8b855 in handleWebConnections (notUsed=0x0) at
webInterface.c:8904
#3 0x0068e3ae in start_thread () from /lib/tls/libpthread.so.0
#4 0x00322aee in clone () from /lib/tls/libc.so.6
(gdb)
(gdb) bt full
#0 0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
No symbol table info available.
#1 0x0031b541 in ___newselect_nocancel () from /lib/tls/libc.so.6
No symbol table info available.
#2 0x00a8b855 in handleWebConnections (notUsed=0x0) at
webInterface.c:8904
a_oset = {__val = {0 <repeats 32 times>}}
a_nset = {__val = {4096, 0 <repeats 31 times>}}
oset = (sigset_t *) 0xaff460
nset = (sigset_t *) 0xb45fb3c0
rc = -514
mask = {__fds_bits = {393216, 0 <repeats 31 times>}}
mask_copy = {__fds_bits = {393216, 0 <repeats 31 times>}}
topSock = 18
#3 0x0068e3ae in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#4 0x00322aee in clone () from /lib/tls/libc.so.6
No symbol table info available.
(gdb)
(gdb) print deviceId
No symbol "deviceId" in current context.
----------------------------------------------------------------------------
-----
Does any of that seem to shed any light, or am I missing something
obvious again?
Thanks Burton,
-Aaron
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop