Rafal Ramocki | 2 Jan 2002 19:56

Bug repport or maybe my problem?

Hello!

- A have a streange problem. When i'm starting ntop it crashes with
message "Naruszenie ochrony pamici" in english that will be "Memory
Protection Folut". Tryeing multiple times i can run ntop. It is happening
since i recompiled my kernel. \

-It was crasheing in the same way during the work. Specialy during copying
big files in my 10Base-T (10Mbit)  network. I don't have that problem
since i turned on an CONFIG_NET_HW_FLOWCONTROL option.

- Some times web interface of ntop works very slow, for instance i can
request some page, go to the kichen, make a coffe, and when i return
the page will be in the final state of loading. :-)

- During the work I have some: 02/Jan/2002 19:20:47 Sanity check failed
(4) [Low memory?]. But I have 96MB of memory

Propobly thous information will help you:
I'm using:
- linux debian, with my compiled kernel 2.2.20
- libpcap Version: 0.6.2-2

My hardware is:
- Intel Celeron 300MHZ
- 96MB of RAM
- eth0 - a 10Mbit NIC
- ppp0 - a 115200 device

In attachement i will send you my kernel configuration - maybe it will
(Continue reading)

Burton M. Strauss III | 2 Jan 2002 21:54
Picon

RE: Bug report or maybe my problem?

96MB isn't a lot of memory for NTop - it takes a fair amount in the tables
that track hosts.  I have a 5 machine home LAN and I'm using as much as 25MB
if I'm busy doing things.  You don't indicate how many users or any
performance indicators...

I do see that you are extending the hash table:

02/Jan/2002 19:18:46 Extending hash: [old=48, new=72]
...
02/Jan/2002 19:21:42 Extending hash: [old=362, new=542]

so you should be tracking some source/destination pairs. However - both the
sanity check messages you indicate come from pbuf.c where the lookup of the
src or dst return null (can't be found).

Try running with a lower accuracy level (-A 1 or even -A 0).

If that fails... there is *I THINK* an unchecked malloc in hash.c that
**MIGHT** be relevant.  I haven't tested it, but in reading the code, it
*looks* like it might miss a failed extend of the hash table and use the
pointer anyway, at which time all bets are off.  You might TRY the following
patch and let me know...

--- 2.0-released/hash.c Thu Dec 27 08:42:10 2001
+++ work-stable/hash.c  Mon Dec 31 17:38:06 2001
 <at>  <at>  -1070,4 +1081,5  <at>  <at> 
     /* Fine we can enlarge the table now */
     IPSession** tmpSession;
+    IPSession** newSession;
     int i, newLen, idx;
(Continue reading)

Rafal Ramocki | 2 Jan 2002 23:17

RE: Bug report or maybe my problem?

On Wed, 2 Jan 2002, Burton M. Strauss III wrote:

> 96MB isn't a lot of memory for NTop - it takes a fair amount in the tables
> that track hosts.  I have a 5 machine home LAN and I'm using as much as 25MB
> if I'm busy doing things.  You don't indicate how many users or any
> performance indicators...

I think that that 96 Meg of RAM is enaught. I think that because NTop and
none of my other processes don't use any SWAP space.
That is memory usage without NTop:
cerber:/# free
             total       used       free     shared    buffers     cached
Mem:         95788      93676       2112      63128       5912      41056
-/+ buffers/cache:      46708      49080
Swap:       400256          0     400256

And that is memory usage just before crash:
cerber:/# free
             total       used       free     shared    buffers     cached
Mem:         95788      92848       2940      63128       7296      38316
-/+ buffers/cache:      47236      48552
Swap:       400256          0     400256

> Try running with a lower accuracy level (-A 1 or even -A 0).

Still the same problem.

> If that fails... there is *I THINK* an unchecked malloc in hash.c that
> **MIGHT** be relevant.  I haven't tested it, but in reading the code, it
> *looks* like it might miss a failed extend of the hash table and use the
(Continue reading)

Burton M. Strauss III | 3 Jan 2002 15:36
Picon

RE: Bug report or maybe my problem?

See my in-line notes... >*>s

But, basically, you're well beyond my knowledge of NTop -- you need Luca or
somebody who really knows what's up to help at this point...

-----Burton

-----Original Message-----
From: Rafal Ramocki [mailto:maniac666 <at> cerber.w-sieci.eu.org]
Sent: Wednesday, January 02, 2002 4:17 PM
To: BStrauss <at> acm.org
Cc: Ntop-Dev
Subject: RE: [Ntop-dev] Bug report or maybe my problem?

On Wed, 2 Jan 2002, Burton M. Strauss III wrote:

> 96MB isn't a lot of memory for NTop - it takes a fair amount in the tables
> that track hosts.  I have a 5 machine home LAN and I'm using as much as
25MB
> if I'm busy doing things.  You don't indicate how many users or any
> performance indicators...

I think that that 96 Meg of RAM is enaught. I think that because NTop and
none of my other processes don't use any SWAP space.
That is memory usage without NTop:
cerber:/# free
             total       used       free     shared    buffers     cached
Mem:         95788      93676       2112      63128       5912      41056
-/+ buffers/cache:      46708      49080
Swap:       400256          0     400256
(Continue reading)

Rafal Ramocki | 4 Jan 2002 00:30

RE: Bug report or maybe my problem?

On Thu, 3 Jan 2002, Burton M. Strauss III wrote:

> >*>   I'll look into this this morning and see what I can find!

I hope you will find something.

> >*> Peak of 1 Mbps - that's in the same ball park as me - I'm capped at 1.5
> Mbps by AT&T...

That's 10 mbit network ntop crashes after a few seconds of generated by
me heavy network traffic using samba file transwer (from server to my
workstation)

>
> I have to notise that my friend have the same problem with NTop. we are
> running it on similar network situation. Similar numer of users similar
> network use, the same kernel versions, the same linux distributions.
>
> >*> Well, I guess then the ? is MORE INFO:
>
> >*> Exact version of ntop (2.0 released, I hope)

Downloaded form ftp.it.ntop.org version 2.0

> >*> Linux Distribution

Linux debian
	ME: Stable (potato) with some packages from testing (woody)
	MY FRIEND: whole testing distribution

(Continue reading)

araho | 4 Jan 2002 01:00

Angelo Raho/ITALY/ARROW è assente dall'ufficio.

Sarò assente dall'ufficio a partire da  31/12/2001 e non verrà restituito
fino al 07/01/2002.

Risponderò al messaggio al mio ritorno.

Rafal Ramocki | 4 Jan 2002 01:02

RE: Bug report or maybe my problem?

I think i know when exacly the NTop crashes. Well when i'm tryeing to
sniff on devices eth0 and ppp0 NTop crashes. Problem is when i'm tryeing
to sniff on both devices, and thereis no problem when i trye to sniff on
any of them separately.

I have to notice that my limux is masquerading box. It act as a file
server for local network, it act as a gateway to internet, and it serves
internet services. I have to notice that I'm using squid as a proxy, but
not normal proxy but transparent proxy (everything what gos out is maped
to the local port and squid sends the request).

I have one more suggestion
In web interface there are national flags based on the IP addres. But ip
addresses from my local network are market as they come from the USA
(172.16.0.0/16).

---
Z powazaniem
Rafal Ramocki			IRC: #stalowka
maniac666 <at> mail.w-sieci.eu.org	ICQ: 113472101

Scott Renfro | 4 Jan 2002 06:11

FW: Problem with Ntop Mingw makefile ?

Lachlan Kidd correctly pointed out that ntop 2.0 fails to build on win32
since protocols.c is missing from the CSRC variable in
ntop/Makefile.mingw.

In general, when files get added to a Makefile.in, a corresponding entry
should be made in the Makefile.mingw.

Attached is a patch to fix it.

Thanks Lachlan.

--Scott

--

-- 
Scott Renfro <scott <at> renfro.org>
--- ntop/Makefile.mingw.orig	Thu Jan  3 21:05:49 2002
+++ ntop/Makefile.mingw	Thu Jan  3 21:06:06 2002
 <at>  <at>  -85,7 +85,7  <at>  <at> 
 	 <at> rm -f $ <at> 
 	$(CC) $(CFLAGS) -o $ <at>  -c $<

-CSRC =	ntop.c pbuf.c util.c http.c vendor.c report.c qsort.c \
+CSRC =	ntop.c protocols.c pbuf.c util.c http.c vendor.c report.c qsort.c \
 	globals-core.c globals-report.c address.c admin.c \
 	dataFormat.c emitter.c event.c graph.c hash.c \
 	initialize.c leaks.c logger.c main.c ntop_win32.c \
Jac Engel | 4 Jan 2002 21:54
Picon
Favicon

RE: FW: Problem with Ntop Mingw makefile ?

Scott,
Yes this fixed the make problem...........
Thanks
Jac 

-----Original Message-----
From: ntop-dev-admin <at> unipi.it [mailto:ntop-dev-admin <at> unipi.it]On Behalf
Of Scott Renfro
Sent: Friday, January 04, 2002 6:11 AM
To: ntop-dev <at> unipi.it
Subject: [Ntop-dev] FW: Problem with Ntop Mingw makefile ?

Lachlan Kidd correctly pointed out that ntop 2.0 fails to build on win32
since protocols.c is missing from the CSRC variable in
ntop/Makefile.mingw.

In general, when files get added to a Makefile.in, a corresponding entry
should be made in the Makefile.mingw.

Attached is a patch to fix it.

Thanks Lachlan.

--Scott

--

-- 
Scott Renfro <scott <at> renfro.org>

Burton M. Strauss III | 4 Jan 2002 22:56
Picon

[2.0ENH] -p (protocols list) from multiple line file

This patch allows the protocols list file (-p option) to occupy multiple
lines.  Comments (anything after a #) are ignored.

This patch also adds reporting of the # of protocols being monitored to the
configuration report.

Comments welcomed!

-----Burton

============================================================================
=====
--- 2.0-released/webInterface.c Thu Dec 27 01:54:29 2001
+++ work/webInterface.c Fri Jan  4 15:24:05 2002
 <at>  <at>  -799,4 +799,9  <at>  <at> 
 #endif

+  if(snprintf(buf, sizeof(buf), "<TR><TH "TH_BG" align=left>IP Protocols
Being Monitored</TH>"
+             "<TD "TD_BG"  align=right>%d</TD></TR>\n",
numIpProtosToMonitor) < 0)
+    traceEvent(TRACE_ERROR, "Buffer overflow!");
+  sendString(buf);
+
 #ifdef MEMORY_DEBUG
   if(snprintf(buf, sizeof(buf), "<TR><TH "TH_BG" align=left>Allocated
Memory</TH>"
--- 2.0-released/ntop.c Thu Dec 27 07:41:28 2001
+++ work/ntop.c Fri Jan  4 15:24:57 2002
 <at>  <at>  -422,10 +423,20  <at>  <at> 
(Continue reading)


Gmane