Error using NSC – waf ERROR Command [' .. '] terminated with signal SIGSEGV

363 views
Skip to first unread message

conej...@gmail.com

unread,
Aug 28, 2015, 5:46:09 AM8/28/15
to ns-3-users

Hi,


I have a problem running .cc in ns3 using nsc. 


>> ./waf –run scratch/myreno

→ Command ['/home/mir/ns-allinone-3.21/ns-3.21/build/scratch/myreno'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").


Waf works fine if the .cc doesn't need to use the nsc libraries. 


A year ago I had ns3 in other machine, and I used nsc without problems. I modified liblinux library and worked. But recently I installed ns3 in other computer, and I try to use my old libraries, and this error appear. 


>> ./waf –run scratch/myreno

→ Command ['/home/mir/ns-allinone-3.21/ns-3.21/build/scratch/myreno'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").


With a debugger, insight, I got this


>> ./waf --run mptcp --command-template="gdb-doc %s"

Waf: Entering directory `/home/mir/ns-allinone-3.21/ns-3.21/build'

Waf: Leaving directory `/home/mir/ns-allinone-3.21/ns-3.21/build'

'build' finished successfully (7.282s)

Traceback (most recent call last):

File "/home/mir/ns-allinone-3.21/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Scripting.py", line 97, in waf_entry_point

run_commands()

File "/home/mir/ns-allinone-3.21/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Scripting.py", line 155, in run_commands

run_command('shutdown')

File "/home/mir/ns-allinone-3.21/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Scripting.py", line 146, in run_command

ctx.execute()

File "/home/mir/ns-allinone-3.21/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Context.py", line 87, in execute

self.recurse([os.path.dirname(g_module.root_path)])

File "/home/mir/ns-allinone-3.21/ns-3.21/.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Context.py", line 128, in recurse

user_function(self)

File "/home/mir/ns-allinone-3.21/ns-3.21/wscript", line 936, in shutdown

visualize=Options.options.visualize)

File "/home/mir/ns-allinone-3.21/ns-3.21/wutils.py", line 215, in run_program

return run_argv(execvec, env, cwd=cwd)

File "/home/mir/ns-allinone-3.21/ns-3.21/wutils.py", line 132, in run_argv

retval = subprocess.Popen(argv, env=proc_env, cwd=cwd).wait()

File "/usr/lib/python2.7/subprocess.py", line 710, in __init__

errread, errwrite)

File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child

raise child_exception

OSError: [Errno 2] No such file or directory


And with valgrind

>> ./waf –command-template="valgrind %s" --run myreno

nd-template="valgrind %s" --run myreno

Waf: Entering directory `/home/mir/ns-allinone-3.21/ns-3.21/build'

Waf: Leaving directory `/home/mir/ns-allinone-3.21/ns-3.21/build'

'build' finished successfully (19.133s)

==6938== Memcheck, a memory error detector

==6938== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.

==6938== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info

==6938== Command: /home/mir/ns-allinone-3.21/ns-3.21/build/scratch/myreno

==6938==

==6938== Jump to the invalid address stated on the next line

==6938== at 0x0: ???

==6938== by 0x1607189F: ??? (in /home/mir/ns-allinone-3.21/nsc/liblinux2.6.26.so)

==6938== by 0x16080EC0: ??? (in /home/mir/ns-allinone-3.21/nsc/liblinux2.6.26.so)

==6938== by 0x92229CF: ns3::NscTcpL4Protocol::NotifyNewAggregate() (nsc-tcp-l4-protocol.cc:237)

==6938== by 0xCA3157A: ns3::Object::AggregateObject(ns3::Ptr<ns3::Object>) (object.cc:302)

==6938== by 0x91BF414: ns3::InternetStackHelper::Install(ns3::Ptr<ns3::Node>) const (internet-stack-helper.cc:480)

==6938== by 0x91BE8A3: ns3::InternetStackHelper::Install(ns3::NodeContainer) const (internet-stack-helper.cc:403)

==6938== by 0x41526C: main (mptcp.cc:152)

==6938== Address 0x0 is not stack'd, malloc'd or (recently) free'd

==6938==

==6938==

==6938== Process terminating with default action of signal 11 (SIGSEGV)

==6938== Bad permissions for mapped region at address 0x0

==6938== at 0x0: ???

==6938== by 0x1607189F: ??? (in /home/mir/ns-allinone-3.21/nsc/liblinux2.6.26.so)

==6938== by 0x16080EC0: ??? (in /home/mir/ns-allinone-3.21/nsc/liblinux2.6.26.so)

==6938== by 0x92229CF: ns3::NscTcpL4Protocol::NotifyNewAggregate() (nsc-tcp-l4-protocol.cc:237)

==6938== by 0xCA3157A: ns3::Object::AggregateObject(ns3::Ptr<ns3::Object>) (object.cc:302)

==6938== by 0x91BF414: ns3::InternetStackHelper::Install(ns3::Ptr<ns3::Node>) const (internet-stack-helper.cc:480)

==6938== by 0x91BE8A3: ns3::InternetStackHelper::Install(ns3::NodeContainer) const (internet-stack-helper.cc:403)

==6938== by 0x41526C: main (myreno.cc:152)

==6938==

==6938== HEAP SUMMARY:

==6938== in use at exit: 797,523 bytes in 12,516 blocks

==6938== total heap usage: 15,736 allocs, 3,220 frees, 1,197,958 bytes allocated

==6938==

==6938== LEAK SUMMARY:

==6938== definitely lost: 0 bytes in 0 blocks

==6938== indirectly lost: 0 bytes in 0 blocks

==6938== possibly lost: 266,429 bytes in 5,184 blocks

==6938== still reachable: 531,094 bytes in 7,332 blocks

==6938== suppressed: 0 bytes in 0 blocks

==6938== Rerun with --leak-check=full to see details of leaked memory

==6938==

==6938== For counts of detected and suppressed errors, rerun with: -v

==6938== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)


I don't know how to solve the problem. Can anyone help me? Thank you very much.


PD: I had to make a minor change in my old .cc due to some changes in ns3 with times, and it works well without using the library from nsc.  

Matt Anonyme

unread,
Aug 28, 2015, 8:49:39 AM8/28/15
to ns-3-users
I think the answer lies in the "OSError: [Errno 2] No such file or directory".
Reply all
Reply to author
Forward
0 new messages