Well, it lived a bit longer, but the results ended up more or less the
same. When the RH8 workaround didn't work I also tried including the
additional -l line from the RHEL3 configureextra file. I didn't really
expect it to matter, since it's probably there to fix a build-bomb
rather than a runtime issue. And lo and behold, it didn't matter.
Here's what I got out of it this time:
gdb -q /usr/bin/ntop
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) set args -K -u root @/etc/ntop.conf
(gdb) run
Starting program: /usr/bin/ntop -K -u root @/etc/ntop.conf
[Thread debugging using libthread_db enabled]
[New Thread -1208022816 (LWP 705)]
Processing file /etc/ntop.conf for parameters...
Fri Mar 18 10:19:18 2005 Initializing gdbm databases
[New Thread -1215145040 (LWP 708)]
[New Thread -1225634896 (LWP 709)]
[New Thread -1236124752 (LWP 710)]
[New Thread -1246614608 (LWP 711)]
[New Thread -1257104464 (LWP 712)]
[New Thread -1268778064 (LWP 713)]
Program received signal SIG33, Real-time event 33.
[Switching to Thread -1268778064 (LWP 713)]
0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) info threads
* 7 Thread -1268778064 (LWP 713) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
6 Thread -1257104464 (LWP 712) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
5 Thread -1246614608 (LWP 711) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
4 Thread -1236124752 (LWP 710) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
3 Thread -1225634896 (LWP 709) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
2 Thread -1215145040 (LWP 708) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
1 Thread -1208022816 (LWP 705) 0x004c37a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
(gdb) thread 7
[Switching to thread 7 (Thread -1268778064 (LWP 713))]#0 0x004c37a2 in
_dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) list
259 /* ************************************ */
260
261 /* That's the meat */
262 #ifdef WIN32
263 int ntop_main(int argc, char *argv[]) {
264 #else
265 int main(int argc, char *argv[]) {
266 #endif
267 int i, rc, userSpecified;
268 char ifStr[196] = {0};
(gdb) info stack
#0 0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x0059b541 in ___newselect_nocancel () from /lib/tls/libc.so.6
#2 0x00c2b855 in handleWebConnections (notUsed=0x0) at
webInterface.c:8904
#3 0x0068e3ae in start_thread () from /lib/tls/libpthread.so.0
#4 0x005a2aee in clone () from /lib/tls/libc.so.6
(gdb) bt full
#0 0x004c37a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
No symbol table info available.
#1 0x0059b541 in ___newselect_nocancel () from /lib/tls/libc.so.6
No symbol table info available.
#2 0x00c2b855 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 *) 0xc9f480
nset = (sigset_t *) 0xb45ff3c0
rc = -514
mask = {__fds_bits = {98304, 0 <repeats 31 times>}}
mask_copy = {__fds_bits = {98304, 0 <repeats 31 times>}}
topSock = 16
#3 0x0068e3ae in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#4 0x005a2aee in clone () from /lib/tls/libc.so.6
No symbol table info available.
(gdb)
On Thu, 2005-03-17 at 18:08 -0600, Burton Strauss wrote:
> Actually it is ... _dl_sysinfo_int80 is the syscall interface (userland
> requests kernel services, Milord) ... That info threads usually means it's
> deadlocked. And the most common culprit lately is: older glibc's which
are
> not thread-safe in the syslog calls!
>
> So, you need to activate the work-around.
>
> In the source, configureextra/LINUXredhat8.0 file is this:
>
> #!/bin/sh
>
> echo " Setting RedHat 8.0 specific flag values"
>
> CPPFLAGS="${CPPFLAGS} -DFORPRENPTL"
>
>
> That -D activates a work around.
>
> You need to create a similar file for RHEL 4. But what to name it...
Ah...
> The secret grasshopper is to use the same file ./configure uses:
>
> Go to your ntop source directory and:
>
> $ utils/linuxrelease --distro
> fedora
> $ utils/linuxrelease --release
> 2
>
> That tells you that, for example, the magic name for MY system would be
>
> Configureextra/LINUXfedora2
>
> Make it, do the ./configure && make && make install dance and see if that
> doesn't fix things.
>
> If so, we'll add your file to the cvs.
>
>
> -----Burton
>
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
> Aaron Grewell
> Sent: Thursday, March 17, 2005 5:54 PM
> To: [email protected]
> Subject: RE: [Ntop] NTop dies on RHEL 4
>
>
>
> 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
>
> _______________________________________________
> Ntop mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop