Segmentation fault (core dumped)
Tue, 21 Sep 1999 22:18:51 +0200
I need a quick solution to the following problem in ns.
I have a simple topology with CBQ to implement class/priority based queueing. I have TCP agents with traffic generators...
Everything worked fine but yesterday I found out that it's not enough to have one TCPSink on every target node because every TCP agent needs an own TCPSink.
My TCp agents are generated in a procedure (which is called randomly to simulate random requests...). With that problem I wanted to generate the TCP Sinks in the same procedure as it is needed. The problem is that I always get the error message in the subject. If I create on every node 60000 TCPSinks before the proc (after creating the topology) and in the procedure I just connect the sinks to the appropriate TCP agent then everything works fine. Of course to generate that much sink is too much time - but they are needed as it is possible (due to random generation of requests) that all these 60000 sinks are needed and not a single one gets freed up - although it hasn't got a great chance but still...
The procedure seems to be all right, the sinks would be created, attached just like the TCP agents.
I have lines like this in my proc:
set tcp($source,$sourceagentnumber) [new Agent/TCP]
$ns attach-agent $n(0) $tcp...
set tcpsink($destination,$destinationagentnumber) [new Agent/TCP]
$ns attach-agent ...
$ns connect $tcp... $tcpsink
the script runs fine and seems to be working: the first packet gets to the target but when it's there I get that error message after the last receive line in the trace file for the packet.
If I attach the sinks before the before the procedure and in the procedure I just connect them then everything works correctly.
Has anyone an idea what's wrong? The TCL script is all right: ns compiles it and as I mentioned the first packet is received.
I'm trying to subscribe to the list but it seems to be rather slow, and if you have an idea please write me to the firstname.lastname@example.org address.