Nmap Development mailing list archives

Re: too many open files


From: Vasiliy Kulikov <segoon () openwall com>
Date: Wed, 2 Nov 2011 21:07:40 +0400

On Wed, Nov 02, 2011 at 05:30 -0700, David Fifield wrote:
On Wed, Nov 02, 2011 at 04:16:15PM +0400, Vasiliy Kulikov wrote:
Hi,

Today I've caught a bug:

# ./nmap -sC --script 'not brute' 127.0.0.1 -vv

...
NSE Timing: About 97.06% done; ETC: 16:13 (0:00:07 remaining)
Socket troubles: Too many open files
nmap: nsock_core.c:1232: nsp_add_event: Assertion `nse->iod->sd >= 0' failed.
Аварийный останов (core dumped)

Can you tell what script was running when this happened?

The problem is always reproducable.  The (slightly obfuscated) log:

# ./nmap -sC --script 'not brute' 127.0.0.1 -vv -d 2>&1 | tee nmap.log

http://ompldr.org/vYjNpcw

The machine is a notebook, the only configured network is a WPA wi-fi
network.

$ uname -a
Linux albatros 2.6.38-12-generic #51~lucid1-Ubuntu SMP Thu Sep 29
19:51:55 UTC 2011 x86_64 GNU/Linux

$ ip ro s
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.21 metric 2 
169.254.0.0/16 dev wlan0  scope link  metric 1000 
default via 192.168.1.1 dev wlan0  proto static 

$ ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:13:77:6e:ed:7f brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:21:63:2b:bd:b6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.21/24 brd 192.168.1.255 scope global wlan0
    inet6 fe80::221:63ff:fe2b:bdb6/64 scope link 
       valid_lft forever preferred_lft forever
4: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether 32:b5:b6:a4:ec:0f brd ff:ff:ff:ff:ff:ff


Does this same thing happen using this branch?

svn checkout svn://svn.insecure.org/nmap-exp/henri/nmap-nsengines

This branch is not compilable:

nmap-nsengines$ make clean && ./configure && LANG=C make

...
Compiling libnetutil
cd libnetutil && make
make[2]: Entering directory `/home/vasya/dev/nmap-svn/nmap-nsengines/nmap-nsengines/libnetutil'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vasya/dev/nmap-svn/nmap-nsengines/nmap-nsengines/libnetutil'
make[2]: Entering directory `/home/vasya/dev/nmap-svn/nmap-nsengines/nmap-nsengines/nping'
Makefile:167: makefile.dep: No such file or directory
g++ -MM -I../libdnet-stripped/include  -I../nbase -I../nsock/include ArgParser.cc common.cc common_modified.cc nping.cc 
NpingOps.cc utils.cc utils_net.cc output.cc stats.cc NpingTargets.cc NpingTarget.cc EchoHeader.cc EchoServer.cc 
EchoClient.cc ProbeMode.cc NEPContext.cc Crypto.cc PacketDiff.cc  > makefile.dep
In file included from ArgParser.cc:94:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from common.cc:94:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from common_modified.cc:91:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from nping.cc:91:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from NpingOps.cc:91:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from utils.cc:91:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from utils_net.cc:90:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from NpingOps.h:141,
                 from output.cc:97:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from stats.cc:92:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from NpingTargets.cc:91:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from NpingTarget.h:96,
                 from NpingTarget.cc:98:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from EchoHeader.h:96,
                 from EchoHeader.cc:93:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from EchoServer.cc:90:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from EchoClient.cc:90:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from ProbeMode.cc:90:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from NEPContext.cc:90:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from Crypto.cc:91:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
In file included from PacketDiff.h:92,
                 from PacketDiff.cc:90:
nping.h:106:35: error: ../libnetutil/npacket.h: No such file or directory
make[2]: *** [makefile.dep] Error 1
make[2]: Leaving directory `/home/vasya/dev/nmap-svn/nmap-nsengines/nmap-nsengines/nping'
make[1]: *** [build-nping] Error 2
make[1]: Leaving directory `/home/vasya/dev/nmap-svn/nmap-nsengines/nmap-nsengines'
make: *** [all] Error 2


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

Current thread: