PointToPointEpcHelper problem in my code

79 views
Skip to first unread message

Ozan Cakmak

unread,
Mar 16, 2015, 12:15:44 AM3/16/15
to ns-3-...@googlegroups.com
Hi all

I tried to integrate lena-simple-epc codes in my project. (NS3-19 version)

  1. Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();  --> This works ok.
  2. Ptr<PointToPointEpcHelper>  epcHelper = CreateObject<PointToPointEpcHelper> ();  --> I got an error. 

When I comment second statement, there is no error in my result file. However, I got an error (below) when I comment out second statement.

Command ['/home/ozan/Desktop/ns-allinone-3.19-obf-20/ns-3.19/build/scratch/Single-Gateway-Obfuscation', '-size=25', '-start=0.1', '-time=200', '-packet-interval=0.5', '-lead-packet-size=65', '-meter-packet-size=12', '-interfaces=1', '-channels=true', '-pcap=false', '-stack=ns3::Dot11sStack', '-root=00:00:00:00:00:01', '-txrate=150kbps', '-node=0', '-ac=6', '-conn=0', '-shuffle=2', '-init-GatewaytoSMs=50', '-init-SMstoGateway=60', '-sink=0', '-sink-ip=10.1.1.1', '-step=100.0', '-xSize=8.0', '-ySize=8.0', '-security=false', '-UdpTcp=tcp', '-topology=randomTopology_25_45.scn', '-arp-op=1', '-wait-arp=4', '-random-start=false', '-random-topology=true', '-type-op=1', '-topoID=7', '-dataFreq=10'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

How can I solve this problem?

---- This below code is my script to implement the project------------
m_randomStart=0.1

m_totalTime=200

m_packetInterval=0.5
meter_packetSize=12
lead_packetSize=65
m_nIfaces=1
m_chan=true
m_pcap=false
m_stack=ns3::Dot11sStack

#m_root=00:00:00:00:00:3E

m_root=00:00:00:00:00:01

m_txrate=150kbps
m_node_num=0
m_ac=6
m_conn=0
m_shuffle=2
m_initstartGatewayToSMs=50
m_initstartSMsToGateway=60

#m_sink=61

#m_sinkIpAddress=10.1.1.61

m_sinkIpAddress=10.1.1.1

m_step=100.0

m_xSize=8.0
m_ySize=8.0

m_dataFreq=10

m_ActivateSecurityModule=false
m_UdpTcpMode=tcp
m_input=randomTopology_25_45.scn
m_arpOp=1
m_arpwait=4
m_randomAppStart=false

m_randomTopology=true

m_typeOfOperation=1
m_sink=0
counter=0

for m_size in 25
do
    for m_topoID in 7
    do
        ./waf --run "Single-Gateway-Obfuscation -size=$m_size -start=$m_randomStart -time=$m_totalTime -packet-interval=$m_packetInterval -lead-packet-size=$lead_packetSize -meter-packet-size=$meter_packetSize -interfaces=$m_nIfaces -channels=$m_chan -pcap=$m_pcap -stack=$m_stack -root=$m_root -txrate=$m_txrate -node=$m_node_num -ac=$m_ac -conn=$m_conn -shuffle=$m_shuffle -init-GatewaytoSMs=$m_initstartGatewayToSMs -init-SMstoGateway=$m_initstartSMsToGateway -sink=$m_sink -sink-ip=$m_sinkIpAddress -step=$m_step -xSize=$m_xSize -ySize=$m_ySize -security=$m_ActivateSecurityModule -UdpTcp=$m_UdpTcpMode -topology=$m_input -arp-op=$m_arpOp -wait-arp=$m_arpwait -random-start=$m_randomAppStart -random-topology=$m_randomTopology -type-op=$m_typeOfOperation -topoID=$m_topoID -dataFreq=$m_dataFreq" > random-$m_size-$lead_packetSize-$m_sink-$m_topoID-$counter.tcp 2>&1
        #echo "Single-Gateway-Obfuscation -size=$m_size -start=$m_randomStart -time=$m_totalTime -packet-interval=$m_packetInterval -lead-packet-size=$lead_packetSize -meter-packet-size=$meter_packetSize -interfaces=$m_nIfaces -channels=$m_chan -pcap=$m_pcap -stack=$m_stack -root=$m_root$mac -txrate=$m_txrate -node=$m_node_num -ac=$m_ac -conn=$m_conn -shuffle=$m_shuffle -init-GatewaytoSMs=$m_initstartGatewayToSMs -init-SMstoGateway=$m_initstartSMsToGateway -sink=$m_sink -sink-ip=$m_sinkIpAddress$m_sink -step=$m_step -xSize=$m_xSize -ySize=$m_ySize -security=$m_ActivateSecurityModule -UdpTcp=$m_UdpTcpMode -topology=$m_input -arp-op=$m_arpOp -wait-arp=$m_arpwait -random-start=$m_randomAppStart -random-topology=$m_randomTopology -type-op=$m_typeOfOperation"
        counter=$((counter+1))
    done
done


Nat P

unread,
Mar 16, 2015, 5:02:10 AM3/16/15
to ns-3-...@googlegroups.com


Il giorno lunedì 16 marzo 2015 05:15:44 UTC+1, Ozan Cakmak ha scritto:
Hi all

I tried to integrate lena-simple-epc codes in my project. (NS3-19 version)

  1. Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();  --> This works ok.
  2. Ptr<PointToPointEpcHelper>  epcHelper = CreateObject<PointToPointEpcHelper> ();  --> I got an error. 

When I comment second statement, there is no error in my result file. However, I got an error (below) when I comment out second statement.

Command ['/home/ozan/Desktop/ns-allinone-3.19-obf-20/ns-3.19/build/scratch/Single-Gateway-Obfuscation', '-size=25', '-start=0.1', '-time=200', '-packet-interval=0.5', '-lead-packet-size=65', '-meter-packet-size=12', '-interfaces=1', '-channels=true', '-pcap=false', '-stack=ns3::Dot11sStack', '-root=00:00:00:00:00:01', '-txrate=150kbps', '-node=0', '-ac=6', '-conn=0', '-shuffle=2', '-init-GatewaytoSMs=50', '-init-SMstoGateway=60', '-sink=0', '-sink-ip=10.1.1.1', '-step=100.0', '-xSize=8.0', '-ySize=8.0', '-security=false', '-UdpTcp=tcp', '-topology=randomTopology_25_45.scn', '-arp-op=1', '-wait-arp=4', '-random-start=false', '-random-topology=true', '-type-op=1', '-topoID=7', '-dataFreq=10'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

How can I solve this problem?


Maybe it is related, maybe not (to be sure, you need to run the program under gdb and see what line is failing - that is exactly what the software suggest). Keep in mind that, once created, these two object cannot be deleted (e.g. don't let the Ptr<> go out of scope). It's a feature/bug not documented, that I discovered some time ago.

Before that, use gdb and see what is failing.

Nat
 

Konstantinos

unread,
Mar 16, 2015, 5:20:25 AM3/16/15
to ns-3-...@googlegroups.com
Try upgrading to ns-3.22
Some other comments inline. 

On Monday, March 16, 2015 at 4:15:44 AM UTC, Ozan Cakmak wrote:
Hi all

I tried to integrate lena-simple-epc codes in my project. (NS3-19 version)

  1. Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();  --> This works ok.
  2. Ptr<PointToPointEpcHelper>  epcHelper = CreateObject<PointToPointEpcHelper> ();  --> I got an error. 

What type of error? Please provide more information.
 

When I comment second statement, there is no error in my result file. However, I got an error (below) when I comment out second statement.

Command ['/home/ozan/Desktop/ns-allinone-3.19-obf-20/ns-3.19/build/scratch/Single-Gateway-Obfuscation', '-size=25', '-start=0.1', '-time=200', '-packet-interval=0.5', '-lead-packet-size=65', '-meter-packet-size=12', '-interfaces=1', '-channels=true', '-pcap=false', '-stack=ns3::Dot11sStack', '-root=00:00:00:00:00:01', '-txrate=150kbps', '-node=0', '-ac=6', '-conn=0', '-shuffle=2', '-init-GatewaytoSMs=50', '-init-SMstoGateway=60', '-sink=0', '-sink-ip=10.1.1.1', '-step=100.0', '-xSize=8.0', '-ySize=8.0', '-security=false', '-UdpTcp=tcp', '-topology=randomTopology_25_45.scn', '-arp-op=1', '-wait-arp=4', '-random-start=false', '-random-topology=true', '-type-op=1', '-topoID=7', '-dataFreq=10'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

How can I solve this problem?

---- This below code is my script to implement the project------------

THIS IS NOT YOUR SCENARIO!!. This is just a shell (?) script to run the "Single-Gateway-Obfuscation".
Please attach that in order to see if possible errors.

Also, when you pass command line parameters to WAF, you usually need double dash '--' before the name. In your code I see a single. Could be just that your mail client or google-groups merged them.

Fu Jiantao

unread,
Oct 16, 2017, 11:28:18 AM10/16/17
to ns-3-users

I'm having the same problem, the following code will crash, i would say this is a bug, no other helper function behave like this

int main (int argc, char *argv[])
{
    {
       Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
    }

    std::cout << "Run Simulation..." << std::endl;
    Simulator::Stop (Seconds (T_END_SIM));
    Simulator::Run ();
    Simulator::Destroy ();
    std::cout << "Done" << std::endl;
}

在 2015年3月16日星期一 UTC+8下午5:02:10,Nat P写道:

Manuel Requena

unread,
Oct 16, 2017, 12:28:56 PM10/16/17
to ns-3-...@googlegroups.com

Please, follow the posting guidelines. Don't reply to a two-years-old thread.

What is your simulation program? You only put inline a non-working snippet. PointToPointEpcHelper is not intended to work alone.

Please, read the LTE documentation to see how to use the PointToPointHelper
https://www.nsnam.org/docs/models/html/lte-user.html#evolved-packet-core-epc

In src/lte/examples/lena-simple-epc.cc, you can find an example of how to use it.

Best regards,
Manuel


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.

For more options, visit https://groups.google.com/d/optout.

Fu Jiantao

unread,
Oct 16, 2017, 10:39:22 PM10/16/17
to ns-3-...@googlegroups.com
ok, the problem still exist for ns 3.26.

I just provide a simplified program to demonstrate it will crash, which is not expected, pls run the code. I'm not saying it's not working functionally, it's crash.





You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/y70NSUWYmMo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Fu Jiantao

unread,
Oct 16, 2017, 10:51:21 PM10/16/17
to ns-3-...@googlegroups.com
That is a simplified program to show the code snippet having the crash problem. In my simulation code, the topology is created in a function and use PointToPointEpcHelper only scoped in that function. and the simulation run in the main.

in the simulation code:

void createTopology()
 {
       ...
       Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
       ...
 }

int main (int argc, char *argv[])
{
    createTopology();

    std::cout << "Run Simulation..." << std::endl;
    Simulator::Stop (Seconds (T_END_SIM));
    Simulator::Run ();
    Simulator::Destroy ();
    std::cout << "Done" << std::endl;
}

Thanks for the reply!
Reply all
Reply to author
Forward
0 new messages