Nmap Development mailing list archives

Possible script deadlock while testing in nse-lua-merge


From: Brandon Enright <bmenrigh () ucsd edu>
Date: Thu, 19 Mar 2009 06:55:22 +0000

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

Patrick, this question is mostly directed at you.

While testing my output table memory patch in your nse-lua-merge branch
I ran into what appears to be a deadlock.  When I turn on packet
tracking (runtime interaction) nothing is being sent or received.

I noticed that there is (new?) output listing the number of script
waiting:

Stats: 1:56:29 elapsed; 370 hosts completed (120 up), 1 undergoing Script Scan
NSE: Active NSE Script Threads: 30 (30 waiting)

I assume this means that I've run into a deadlock.  I've done a heck of
a lot of testing in this branch and this is the first time I've seen a
deadlock like this so I assume the conditions to cause it are pretty
involved.

My goal now is to find out what script(s) are active to figure out what
script may have a race/deadlock bug.  The way I'm trying to do that is
by attaching GDB and setting a breakpoint on run_main and script_scan
and then continuing.  I hope that when the deadlocked scripts time out
(in about an hour) I'll get a nice long list of what was running.

My question is, is this the only way to get the list?  At a high
debugging level can we make runtime interaction print the active
scripts?  Perhaps adding a 's' or a 'c' to interaction to print them
would be reasonable.

Brandon

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

iEYEARECAAYFAknB7GQACgkQqaGPzAsl94LcUwCguYG9KeFYxypcuCkEudqeC29R
YPEAoMBDBSldFBQ24DXWf1eKDMSRu1tl
=JNk0
-----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: