Nmap Development mailing list archives
Re: Assertion `pt->down_this_block > 0' failed.
From: Fyodor <fyodor () insecure org>
Date: Mon, 5 Jul 2004 18:47:47 -0700
On Thu, May 20, 2004 at 07:21:14PM -0400, Beirne Konarski wrote:
I'm running nmap-3.50, built by hand, on several Compaqs running RedHat AS2.1. I'm scanning large numbers of systems looking for several ports. I'm running it in the form: nmap --randomize_hosts -n -iL file_of subnets -sU -sS -p 135,139,445 -oG - What often happens is I get the following assertion failure: nmap: targets.cc:196: int hostupdate (Target **, Target *, int, int, int, timeout_info *, timeval *, timeval *, pingtune *, tcpqueryinfo *, pingstyle): Assertion `pt->down_this_block > 0' failed. Apparently the host number is losing synchronization with the range of current hosts. What can I do about this problem?
Thanks for the report. These assertion failures are always a
bug in Nmap that needs to be fixed. I have been able to repduce this
problem and have a fix for the next version of Nmap (which I hope to
release today or tomorrow). Or you can apply the following patch to
your version of Nmap:
--- targets.cc 5 Jul 2004 08:24:21 -0000 1.33
+++ targets.cc 6 Jul 2004 01:46:06 -0000
@@ -195,8 +195,14 @@
target->flags &= ~HOST_DOWN; /* Kill the host_down flag */
target->flags |= HOST_UP;
if (hostnum >= pt->group_start) {
- assert(pt->down_this_block > 0);
- pt->down_this_block--;
+ /* The pt.block_tries was added because it is possible for a
+ host to be marked down in the first block try, then
+ down_this_block will be reset to 0 for the next try, in which
+ a late packet could cause the box to be marked up. In that
+ case, down_this_block could legitimately be 0. */
+ assert(pt.block_tries > 0 || pt->down_this_block > 0);
+ if (pt->down_this_block > 0)
+ pt->down_this_block--;
pt->up_this_block++;
}
} else if (newstate == HOST_DOWN) {
Cheers,
-F
---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to
nmap-dev-help () insecure org . List archive: http://seclists.org
Current thread:
- Re: Assertion `pt->down_this_block > 0' failed. Fyodor (Jul 05)
