Hi,
 For the last few weeks I've been trying to get ntop 3.1 to work with a SMP 
kernel on slackware 10.1.  The hardware is a Dell 1850, dual Xeon processors.  
It works fine if the kernel is compiled without SMP support.  Tested kernels 
are 2.4.29, 2.4.31, 2.6.12.3.  The symptom I'm having is not being able to 
make a successful connection to the system on port 3000.  The connection is 
accepted, but hangs.   I believe this is related to the multithreading, and 
the strace indicates that it is hanging waiting to make a call to syslog. 

First a bit of backgroung.....

Running it with the following command:

ntop -u ntop -w 3000 -a /usr/local/lib/ntop/access.log -P /home/ntop -i eth2 
-O /home/ntop

Yields the following results:

Wed Aug  3 23:29:53 2005  Initializing gdbm databases
Wed Aug  3 23:29:53 2005  ntop v.3.1 ST (SSL)
Wed Aug  3 23:29:53 2005  Configured on Jul 29 2005  8:58:46, built on Jul 29 
2005 09:24:54.
Wed Aug  3 23:29:53 2005  Copyright 1998-2004 by Luca Deri <[EMAIL PROTECTED]>
Wed Aug  3 23:29:53 2005  Get the freshest ntop from http://www.ntop.org/
Wed Aug  3 23:29:53 2005  Initializing ntop
Wed Aug  3 23:29:53 2005  Checking eth2 for additional devices
Wed Aug  3 23:29:53 2005  Resetting traffic statistics for device eth2
Wed Aug  3 23:29:53 2005  DLT: Device 0 [eth2] is 1, mtu 1514, header 14
Wed Aug  3 23:29:53 2005  Initializing gdbm databases
Wed Aug  3 23:29:53 2005  VENDOR: Loading MAC address table.
Wed Aug  3 23:29:53 2005  VENDOR: Checking for MAC address table file
Wed Aug  3 23:29:53 2005  VENDOR: File './specialMAC.txt.gz' does not need to 
be reloaded
Wed Aug  3 23:29:53 2005  VENDOR: ntop continues ok
Wed Aug  3 23:29:53 2005  VENDOR: Checking for MAC address table file
Wed Aug  3 23:29:53 2005  VENDOR: File './oui.txt.gz' does not need to be 
reloaded
Wed Aug  3 23:29:53 2005  VENDOR: ntop continues ok
Wed Aug  3 23:29:53 2005  Fingeprint: Loading signature file.
Wed Aug  3 23:29:53 2005  Fingeprint: ...loaded 1697 records
Wed Aug  3 23:29:53 2005  ASN: Checking for Autonomous System Number table 
file
Wed Aug  3 23:29:53 2005  ASN: Loading file './AS-list.txt.gz'
Wed Aug  3 23:29:54 2005  ASN: ...found 111435 lines
Wed Aug  3 23:29:54 2005  ASN: ....Used 3780 KB of memory (12 per entry)
Wed Aug  3 23:29:54 2005  I18N: This instance of ntop does not support 
multiple languages
Wed Aug  3 23:29:54 2005  IP2CC: Checking for IP address <-> Country Code 
mapping file
Wed Aug  3 23:29:54 2005  IP2CC: Loading file './p2c.opt.table.gz'
Wed Aug  3 23:29:54 2005  IP2CC: ...found 52395 lines
Wed Aug  3 23:29:54 2005  GDVERCHK: Guessing at libgd version
Wed Aug  3 23:29:54 2005  GDVERCHK: ... as 2.0.21+
Wed Aug  3 23:29:54 2005  Initializing external applications
Wed Aug  3 23:29:54 2005  Calling plugin start functions (if any)
Wed Aug  3 23:29:54 2005  CHKVER: 
**********************PRIVACY**NOTICE**********************
Wed Aug  3 23:29:54 2005  CHKVER: * ntop instances may record individually 
identifiable     *
Wed Aug  3 23:29:54 2005  CHKVER: * information on a remote system as part of 
the version   *
Wed Aug  3 23:29:54 2005  CHKVER: * check.                                      
            
*
Wed Aug  3 23:29:54 2005  CHKVER: *                                             
            
*
Wed Aug  3 23:29:54 2005  CHKVER: * You may request - via the 
--skip-version-check option   *
Wed Aug  3 23:29:54 2005  CHKVER: * that this check be skipped and that no 
individually     *
Wed Aug  3 23:29:54 2005  CHKVER: * identifiable information be recorded.       
            
*
Wed Aug  3 23:29:54 2005  CHKVER: *                                             
            
*
Wed Aug  3 23:29:54 2005  CHKVER: * In general, we ask you to permit this 
check because it  *
Wed Aug  3 23:29:54 2005  CHKVER: * benefits both the users and developers of 
ntop.         *
Wed Aug  3 23:29:54 2005  CHKVER: *                                             
            
*
Wed Aug  3 23:29:54 2005  CHKVER: * Review the man ntop page for more 
information.          *
Wed Aug  3 23:29:54 2005  CHKVER: *                                             
            
*
Wed Aug  3 23:29:54 2005  CHKVER: 
**********************PRIVACY**NOTICE**********************
Wed Aug  3 23:29:54 2005  CHKVER: Checking current ntop version at 
version.ntop.org/version.xml
Wed Aug  3 23:29:59 2005  CHKVER: Version file is from 'version.ntop.org'
Wed Aug  3 23:29:59 2005  CHKVER: as of date is '2004-12-01T17:00:00'
Wed Aug  3 23:29:59 2005  CHKVER: This version of ntop is the CURRENT stable 
version
Wed Aug  3 23:29:59 2005  SSL is present but https is disabled: use -W <https 
port> for enabling it
Wed Aug  3 23:29:59 2005  INITWEB: Initializing web server
Wed Aug  3 23:29:59 2005  INITWEB: Initializing tcp/ip socket connections for 
web server
Wed Aug  3 23:29:59 2005  INITWEB: Initialized socket, port 3000, address 
(any)
Wed Aug  3 23:29:59 2005  INITWEB: Waiting for HTTP connections on port 3000
Wed Aug  3 23:29:59 2005  Listening on [eth2]
Wed Aug  3 23:29:59 2005  Loading Plugins
Wed Aug  3 23:29:59 2005  Searching for plugins in ./plugins
Wed Aug  3 23:29:59 2005  ICMP: Welcome to icmpWatchPlugin. (C) 1999-2004 by 
Luca Deri
Wed Aug  3 23:29:59 2005  LASTSEEN: Welcome to LastSeenWatchPlugin. (C) 1999 
by Andrea Marangoni
Wed Aug  3 23:29:59 2005  NETFLOW: Welcome to NetFlow.(C) 2002-04 by Luca Deri
Wed Aug  3 23:29:59 2005  PDA: Welcome to PDAPlugin. (C) 2001-2004 by L.Deri 
and W.Brock
Wed Aug  3 23:29:59 2005  RRD: Welcome to rrdPlugin. (C) 2002-04 by Luca Deri.
Wed Aug  3 23:29:59 2005  SNMP: Welcome to snmpPlugin. (C) 2004 by F.Fusco and 
G.Giardina
Wed Aug  3 23:29:59 2005  **WARNING** Unable to load plugin 
'./plugins/sflowPlugin.so'
Wed Aug  3 23:29:59 2005  **WARNING** Message is './plugins/sflowPlugin.so: 
undefined symbol: queuePacket'
Wed Aug  3 23:29:59 2005  XML: Welcome to xmldump plugin. (C) 2003-2004 by 
Burton Strauss
Wed Aug  3 23:29:59 2005  Calling plugin start functions (if any)
Wed Aug  3 23:29:59 2005  RRD: Welcome to the RRD plugin
Wed Aug  3 23:29:59 2005  RRD: Mask for new directories is 0700
Wed Aug  3 23:29:59 2005  RRD: Mask for new files is 0066
Wed Aug  3 23:29:59 2005  Now running as requested user 'ntop' (1001:105)
Wed Aug  3 23:29:59 2005  INIT: Created pid file (/home/ntop/ntop.pid)
Wed Aug  3 23:29:59 2005  Note: Reporting device initally set to 0 [eth2] 
(merged)

At this point it just hangs. At first I thought it was related to the network 
card (intel 1000), so I tried on a Dell 6650 that has Broadcom ethernet 
interfaces with the same results.

After more experimentation, I realized the non-SMP kernel worked fine.  Armed 
with that information I searched the archives again, and came up with this 
post....

http://www.mail-archive.com/ntop-dev%40unipi.it/msg04267.html 
 
An strace confirms that the problem seems to be syslog being blocked from 
another thread already writing to syslog.  Strace available on request.

I downloaded the newest CVS version (3.1.50), compiled with the -DFORPRENPTL 
added to the configureextra/LINUXslackware file, did a ./configure;make;make 
install, and still have the same results.

I upgraded glibc to 2.3.5 from slackware-current with the following packages:

glibc-2.3.5-i486-4.tgz
glibc-i18n-2.3.5-noarch-4.tgz
glibc-profile-2.3.5-i486-4.tgz
glibc-solibs-2.3.5-i486-4.tgz
glibc-zoneinfo-2.3.5-noarch-4.tgz

I recompiled ntop, changing the top level Makefile to use NPTL
( -I/usr/include/nptl -L/usr/lib/nptl).  I also recompiled libpcap with the 
same flags.

No success.  

I am considering recompiling syslog, but am looking for some guidance 
(patches) to make that work with NPTL if that's possible.

I'm fairly sure I'm going down the right path, but not totally convinced.  The 
strange thing is that if I run it as root (-u root) then all is well, even 
with the SMP kernel.  That tends to make me think it's a permission issue 
(possibly of the interface?) but doesn't explain the strace problem with 
syslog.

Other things I've tried....

./configure --disable-mt

This works with:

ntop -u ntop -w 3000 -a /usr/local/lib/ntop/access.log -P /home/ntop -i eth2 
-O /home/ntop

for a short time, then ntop crashes.

These don't work (mt enabled):

ntop -L -d -u ntop -w 3000 -a /usr/local/lib/ntop/access.log -P /home/ntop -i 
eth2 -O /home/ntop t 0

ntop -d -u ntop -w 3000 -a /usr/local/lib/ntop/access.log -P /home/ntop -i 
eth2 -O /home/ntop

Any help anyone could offer would be greatly appreciated.

-- 


   ---dan
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to