Nmap Development mailing list archives

Re: Weird Crash - "WAITING_TO_RUNNING"


From: Nathan <nathan.stocks () gmail com>
Date: Tue, 2 Nov 2010 16:24:41 -0600

On Tue, Nov 2, 2010 at 2:17 PM, Patrick Donnelly <batrick () batbytes com> wrote:
Hi Nathan,

On Mon, Nov 1, 2010 at 4:12 PM, Nathan <nathan.stocks () gmail com> wrote:
Anyone know why I would get the following crash using the options "-sS
-sV -T4 -p 1-65535" with nmap 5.35DC1?

"nse_restore: WAITING_TO_RUNNING error!
not enough memory"

I've got 16GB of RAM on the box (2.6.23 linux kernel), with 10GB
free...so "not enough memory" must not be talking about total system
RAM...

It is referring to system memory. I don't know why you got that error
though. Do you have ulimit turned on? Are you able to reproduce this
error repeatedly and reliably?

To my knowledge, ulimit is not turned on in any fashion:

$ ulimit
unlimited

I can indeed reproduce this error repeatedly and reliably.  Here's the
full output of it crashing three times in a row.  Note that it takes
about 13 minutes until it crashes.

====> First time <====
$ /usr/bin/sudo /usr/bin/nmap -sS -sV -T4 -p 1-65535 74.62.92.70 -P0

Starting Nmap 5.35DC1 ( http://nmap.org ) at 2010-11-02 15:19 MDT
nse_restore: WAITING_TO_RUNNING error!
not enough memory
QUITTING!
Realloc Failed! Probably out of space.
QUITTING!

====> Second time, this time I "time"d it <====
$ time /usr/bin/sudo /usr/bin/nmap -sS -sV -T4 -p 1-65535 74.62.92.70 -P0

Starting Nmap 5.35DC1 ( http://nmap.org ) at 2010-11-02 15:34 MDT
nse_restore: WAITING_TO_RUNNING error!
not enough memory
QUITTING!
Realloc Failed! Probably out of space.
QUITTING!

real    13m17.923s
user    7m54.814s
sys     0m10.121s

====> Third time -- note that this time I watched the memory usage in
a separate terminal during the run <===
$ time /usr/bin/sudo /usr/bin/nmap -sS -sV -T4 -p 1-65535 74.62.92.70 -P0

Starting Nmap 5.35DC1 ( http://nmap.org ) at 2010-11-02 15:51 MDT
nse_restore: WAITING_TO_RUNNING error!
not enough memory
QUITTING!
Realloc Failed! Probably out of space.
QUITTING!

real    13m55.784s
user    8m14.395s
sys     0m5.804s


====> Here's what I did to watch the memory during the third run.
You'll notice that while a ton of memory was used, there was still
over 2GB completely free.  There was also a lot of memory in the disk
cache that could have been used if necessary <====

$ while /bin/true ; do sleep 1 && echo "---------" && date && cat
/proc/meminfo  | grep MemFree ; done
[snipped about 13 minutes worth of output right here]
---------
Tue Nov  2 16:04:52 MDT 2010
MemFree:       2414796 kB
---------
Tue Nov  2 16:04:53 MDT 2010
MemFree:       2401568 kB
---------
Tue Nov  2 16:04:54 MDT 2010
MemFree:       2383420 kB
---------
Tue Nov  2 16:04:55 MDT 2010
MemFree:       2365096 kB              <==== (crash!)
---------
Tue Nov  2 16:04:56 MDT 2010
MemFree:       5509820 kB
---------
Tue Nov  2 16:04:57 MDT 2010
MemFree:       5510040 kB
---------
Tue Nov  2 16:04:58 MDT 2010
MemFree:       5510180 kB
---------

Any ideas???


Oh!  Just as another point of data, the same thing crashes on Nmap
5.10BETA2 on OS X 10.6.4 installed via MacPorts.  It takes a bit
longer than 13 minutes on my mac laptop, since I'm on a crappy comcast
connection, while the linux server is on a nice datacenter connection
with lots of bandwidth.

$ /usr/bin/sudo nmap -sS -sV -T4 -p 1-65535 74.62.92.70 -P0

Starting Nmap 5.10BETA2 ( http://nmap.org ) at 2010-11-02 15:19 MDT
Warning: Unable to open interface vmnet1 -- skipping it.
Warning: Unable to open interface vmnet8 -- skipping it.
nmap(68370) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
nse_restore: WAITING_TO_RUNNING error!
not enough memory
QUITTING!

~ Nathan
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: