Nmap Development mailing list archives

Re: many scripts with output cause abort


From: Brandon Enright <bmenrigh () ucsd edu>
Date: Tue, 17 Mar 2009 05:57:16 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 16 Mar 2009 23:50:30 -0600 or thereabouts Patrick Donnelly
<batrick () batbytes com> wrote:

On Mon, Mar 16, 2009 at 6:15 PM, Brandon Enright <bmenrigh () ucsd edu>
wrote:
I've noticed that with a large --min-parallelism and a large
- --min-hostgroup NSE seems to overload Nsock and causes Nmap to
corrupt mammary.  David and I looked at it a little but never
really pursued it as a bug.

min-hostgroup shouldn't affect the nsock exclusion mechanism which
ensures only --max-parallelism OR 10 threads have open sockets. The
problem is threads may then open as many sockets as they want. This
was a design decision I made last summer due to deadlocks occurring
when threads would compete for the maximum 10 sockets but some needed
2. It seemed reasonable since all scripts up to that point had at most
2 sockets open at any time. Of course, this may not actually be the
problem you are experiencing? Is nsock allocating too many open
sockets?


It's possible Nsock had too many open sockets.  I have my max
file handles set to 65535.  I don't know how many ephemeral ports Linux
has available by default.  I am recycling and reusing tw buckets to
help take the pressure off sockets.

If I run with a --min-hostgroup 2048 --min-parallelism 2048 Nsock blows
up when NSE starts working.  David and I ran into this while
troubleshooting something else so we didn't look at it too hard.

If you're interested I'll test tomorrow in your nse-lua-merge branch
and see what happens.

Brandon

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkm/O8MACgkQqaGPzAsl94LULgCgqYC0T/z3KO2iGV9CGSxSegrg
UwUAoKszUfH+KrjIF9Zep50v6tfKoQU5
=oC2U
-----END PGP SIGNATURE-----

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

Current thread: