Nmap Development mailing list archives

Re: Weird Crash - "WAITING_TO_RUNNING"


From: David Fifield <david () bamsoftware com>
Date: Wed, 17 Nov 2010 11:34:11 -0800

On Mon, Nov 15, 2010 at 02:53:59PM -0700, Nathan wrote:
On Tue, Nov 09, 2010 at 10:32:19AM -0800, David Fifield wrote:
Nathan, please try out this nse_main.lua. It's has a quick and dirty
modification that prevents the creation of more than 100 script threads
at a time. Run the scan so that it creates lots of spurious open ports
like before. It should not use up all your memory and should eventually
finish.

I think we will actually set the limit higher than 100 in practice.

Okay, it didn't change the accuracy (we didn't expect it too), so it
still thought all 65k+ ports were open.  But it certainly limited RAM
usage and actually finished!

It was using about 55MB RAM when it ended, and it took 5m23s -- a huge
improvement over using 4GB of RAM and crashing!

I just committed this as r21084. I increased the limit from 100 to
1,000. I also made some code changes so please test it again and see if
it works.

Patrick D.: I defined a new file-level local variable CONCURRENCY_LIMIT
in nse_main.lua. Is this the best place for it?

I hope this gets committed.  It certainly helps me in my situation -
now instead of having huge memory problems and crashes where I can't
find flags to fix the accuracy, I just get a lot of open ports in the
results -- which I can watch for and throw out.

As a workaround for the problem of finding too many open ports, let me
suggest the --max-rate option instead of --scan-delay. Setting a maximum
rate allows the timing to be somewhat more dynamic than setting a fixed
delay. Since you found that --scan-delay 1ms worked for you in some
cases, you would change that to

nmap --max-rate 1000

If that's still too fast, just reduce it, e.g.:

nmap --max-rate 800

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


Current thread: