Actually, it really does pretty much mean what the message said...
thePtr = malloc(sz);
if(thePtr == NULL) {
traceEvent(CONST_TRACE_ERROR, "malloc(%d) @ %s:%d returned NULL [no more
memory?]",
Check the man page - a null return from malloc() means that the OS could not
allocate the requested memory.
The %d should really be %u so that we get the right printed value, but ...
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul
Aviles
Sent: Tuesday, July 26, 2005 2:56 PM
To: [email protected]
Subject: [Ntop] http.c:2144 returned NULL
Any ideas what this could mean? The server is a FC1 with 1Gb of RAM. I doubt
is running out of memory.
This happens every time I do IP/Local/Network Traffic Map/networkMap.html
I have posted my configuration below.
-pa
[EMAIL PROTECTED] /]# tail -f /var/log/messages | grep ntop
Jul 26 15:29:40 miaids ntop[9751]: THREADMGMT[t3144588208]: NPS(1):
Started thread for network packet sniffing
Jul 26 15:29:40 miaids ntop[9751]: Note: SIGPIPE handler set (ignore)
Jul 26 15:29:40 miaids ntop[9751]: THREADMGMT[t3197037488]: SFP:
Fingerprint scan thread running [p9751]
Jul 26 15:29:40 miaids ntop[9751]: THREADMGMT[t3165567920]: WEB:
Server connection thread running [p9751]
Jul 26 15:29:40 miaids ntop[9751]: WEB: ntop's web server is now
processing requests
Jul 26 15:29:40 miaids ntop[9751]: THREADMGMT[t3186547632]: SIH: Idle
host scan thread running [p9751]
Jul 26 15:29:50 miaids ntop[9751]: THREADMGMT[t3134098352]: RRD:
Throughput data collection: Thread starting [p9751]
Jul 26 15:29:50 miaids ntop[9751]: THREADMGMT[t3134098352]: RRD:
Throughput data collection: Thread running [p9751]
Jul 26 15:29:50 miaids ntop[9751]: THREADMGMT[t3134098352]: RRD:
Started thread for throughput data collection
Jul 26 15:29:50 miaids ntop[9751]: THREADMGMT[t3155078064]: RRD: Data
collection thread running [p9751]
Jul 26 15:30:27 miaids kernel: application bug: ntop(9871) has SIGCHLD set
to SIG_IGN but calls wait().
Jul 26 15:30:30 miaids ntop[9751]: **ERROR** malloc(-1129402448) @
http.c:2144 returned NULL [no more memory?]
Jul 26 15:30:30 miaids ntop[9751]: **WARNING** ntop packet capture
STOPPED
Jul 26 15:30:30 miaids ntop[9751]: NOTE: ntop web server remains up
Jul 26 15:30:30 miaids ntop[9751]: NOTE: Shutdown gracefully and
restart with more memory
Jul 26 15:30:30 miaids ntop[9751]: THREADMGMT[t3165567920]: ntop
RUNSTATE: STOPCAP(5)
Or
Jul 26 15:47:19 miaids ntop[10769]: THREADMGMT[t3186924464]: SIH: Idle
host scan thread running [p10769]
Jul 26 15:47:23 miaids ntop[10769]: **ERROR** ECONNRESET during
sending of page to web client
Jul 26 15:47:24 miaids ntop[10769]: **ERROR** malloc(-1129025616) @
http.c:2144 returned NULL [no more memory?]
Basic Information
ntop Version 3.1.50
Configured on Jul 25 2005 15:33:48
Built on Jul 25 2005 15:35:22
OS i686-pc-linux-gnu
libpcap version libpcap version 0.8.3
Running from /usr/local/bin
Libraries in /usr/local/bin
ntop Process Id 10949
http Process Id 10949
Command line
Started as.... /usr/local/bin/ntop -i eth0 @/etc/ntop.conf -d --use-syslog
Resolved to.... /usr/local/bin/ntop -i eth0 --user ntop --daemon
--db-file-path /usr/share/ntop --interface eth0 --trace-level 3
--http-server 3000 --disable-schedyield -d --use-syslog Preferences used
NOTE: (effective) means that this is the value after ntop has processed the
parameter.(default) means this is the default value, usually (but not
always) set by a #define in globals-defines.h.
-a | --access-log-file (default) (nil)
-b | --disable-decoders Yes
-c | --sticky-hosts (default) No
-d | --daemon Yes
-e | --max-table-rows (default) 128
-f | --traffic-dump-file (default) (nil) -g | --track-local-hosts (default)
Track all hosts -o | --no-mac (default) Trust MAC Addresses -i | --interface
(effective) eth0 -j | --create-other-packets (default) Disabled -l |
--pcap-log (default) (nil) -m | --local-subnets (effective) (default) (nil)
-n | --numeric-ip-addresses (default) No -p | --protocols (default) internal
list -q | --create-suspicious-packets (default) Disabled -r | --refresh-time
(default) 120 -s | --no-promiscuous (default) No -t | --trace-level
(default) 3 -u | --user ntop (uid=101, gid=101) -w | --http-server (default)
Active, all interfaces, port 3000 -z | --disable-sessions Yes -B |
--filter-expression (default) none -D | --domain adjoined.com -F |
--flow-spec (default) none -K | --enable-debug (default) No -L |
--use-syslog daemon -M | --no-interface-merge (effective) (parameter -M set,
Interfaces
separate) No
-N | --wwn-map (default) (nil)
-O | --pcap-file-path (default) /usr/local/var/ntop -P | --db-file-path
/usr/share/ntop -Q | --spool-file-path /usr/share/ntop -U | --mapper
(default) (nil) --disable-schedYield Yes --disable-instantsessionpurge
(default) No --disable-mutexextrainfo (default) No --disable-stopcap Yes
--fc-only (default) No --instance (default) (nil) --no-fc (default) No
--no-invalid-lun (default) No --p3p-cp (default) none --p3p-uri (default)
none --pcap-nonblocking (default) No --skip-version-check Yes --w3c
(default) No
NOTE: The --w3c flag makes the generated html MORE compatible with the w3c
recommendations, but it in no way addresses all of the compatibility and
markup issues. We would like to make ntop more compatible, but some basic
issues of looking decent on real-world browsers mean it will never be 100%.
If you find any issues, please report them to ntop-dev.
Run time/Internal
Web server URL http://any:3000
GDBM version This is GDBM version 1.8.0, as of May 19, 1999.
zlib version 1.2.0.7
gd version (guess) 2.0.12-2.0.15
Protocol Decoders Disabled
Fragment Handling Enabled
Tracking only local hosts No
# IP Protocols Being Monitored 20
# Protocol slots 954
# IP Ports Being Monitored 177
# IP Ports slots 354
WebServer Request Queue 10
Devices (Network Interfaces) 1
Domain name (short) com
IP to country flag table (entries) 52395 Total Hash Collisions
(Vendor/Special) (lookup) 0 ntop Web Server Item http:// https:// # Handled
Requests 1 - # Successful requests (200) 0 - # Bad (We don't want to talk
with you) requests 0 - # Invalid requests - 403 FORBIDDEN 0 - # Invalid
requests - 404 NOT FOUND 0 -
NOTE: Counts may not total because of in-process requests.
Each request to the ntop web server - page, chart, etc. is counted
separately
# SSI Requests 0
# Bad SSI Requests 0
# Handled SSI Requests 0
# Handled SIGPIPE Errors 0
Memory allocation - data segment
arena limit, getrlimit(RLIMIT_DATA, ...) -1 Allocated blocks (ordblks) 3
Allocated (arena) 6004736 Used (uordblks) 5889176 Free (fordblks) 115560
Memory allocation - mmapped Allocated blocks (hblks) 4 Allocated bytes
(hblkhd) 2027520 Host Memory Cache Limit #define MAX_HOSTS_CACHE_LEN 512
Current Size 0 Maximum Size 0 # Entries Reused 0 Packets Received 3,035
Processed Immediately 3,035 (100.0 %) Queued 0 (0.0 %) Current Queue 0
Maximum Queue 0 (Limit 2048) Packet Processing Queue (pre-process)
Processing Minimum 0.000008 0.000008 Average 0.000230 0.000134 Maximum
0.014940 0.015161 Standard Deviation 0.001427 0.000702 Maximum ever 0.014940
0.015161 Min Estimated Thpt (pps) 0.000000 6693.440430 Average Estimated
Thpt (pps) 0.000000 7444.000000
NOTE: 'Queue' time is the elapsed time between the packet arrival
(libpcap) and the gettimeofday() value as the packet starts processPacket().
For a queued packet, this includes the time in queue.
'Processing' time is the elapsed time between starting and finishing
processPacket(). Errors and/or unrecognized packets may cause processing to
be abandoned and those packets are not counted in the 'processing'
averages. This means that the 1024 packets for the 'queue' and 'processing'
calculations are not necessarily the same physical packets, and may lead to
over estimation of the per-packet 'processing' time.
Small averages are good, especially if the standard deviation is small
(standard deviation is a measurement of the variability of the actual values
around the average). The computations are based only on the most recent 1024
packets processed.
Maximum ever ignores the first 100 packets for each device - this lets ntop
get over startup agony.
What does this mean? Not much. Still, 1/(queue-average+process-average)
(i.e. 2747.3) gives a very rough indication of the packet per second rate
this instance of ntop can handle.
Host/Session counts - global
Purged Hosts 0
Host/Session counts - Device 0 (eth0)
Hash Bucket Size 1.9 KB
Actual Host Hash Size 32768
Stored hosts 126
Host Bucket List Length [min 1][max 3][avg 1.0] Max host lookup 2
----- Address Resolution -----
DNS Sniffing (other hosts requests)
DNS Packets sniffed 0
DNS Packets processed 0
Stored in cache (includes aliases) 0
Queued - dequeueAddress()
Total Queued 11
Not queued (duplicate) 0
Maximum Queued 11
Current Queue 11
DNS Lookup Calls:
DNS resolution attempts 1
....Success: Resolved 0
....Failed 0
DNS lookups stored in cache 0
Host addresses kept numeric 0
NOTE: 'DNS lookups stored in cache' includes HOST_NOT_FOUND replies.
Thus it may be larger than the number of 'Success: Resolved' queries.
Thread counts
Active 7
Dequeue 1
Children (active) 0
Directory (search) order
Data Files .
/usr/local/share/ntop
Config Files .
/usr/local/etc/ntop
/etc
Plugins ./plugins
/usr/local/lib/ntop/plugins
NOTE: REMEMBER that the . (current working directory) value will be
different when you run ntop from the command line vs. a cron job or startup
script!
Compile Time: ./configure
./configure parameters --with-gdbm-include=/usr/include/gdbm
Built on (Host) i686-pc-linux-gnu
Built for(Target) i686-pc-linux-gnu
preprocessor (CPPFLAGS) gcc -E -DLINUX -I/usr/local/include
-I/usr/include/gdbm compiler (CFLAGS) gcc -g -O2 -I/usr/local/include
-Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fPIC -DPIC -DHAVE_CONFIG_H include path
-I/usr/include/gdbm system libraries -L/usr/local/lib -lpthread -lresolv
-lnsl -lcrypt -lc -lpcap -lgdbm -lgd -lpng -lz install path /usr/local GNU C
(gcc) version 3.3.2 20031022 (Red Hat Linux 3.3.2-1) (3.3.2) uname data
sysname(Linux) release(2.4.22-1.2174.nptl) version(#1 Wed Feb
18 16:38:32 EST 2004) machine(i686)
Internationalization (i18n)
i18n enabled No
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop