malloc.c:3996 3996 malloc.c: No such file or directory

2,873 views
Skip to first unread message

tina

unread,
Mar 31, 2017, 11:40:56 PM3/31/17
to ns-3-users
Hi all,

I installed ns3-dce and i tested iperf. It worked perfectly. I have an application program to transfer a file from sender to receiver that works without any error completely on my laptop. 
1) In order to add it to dce, I have a cpp program very similar to iperf. I added it to ns3-dce/example.
2) I added the executable of application program to build/bin-dce
3)I added the example file information to ns-3-dc3/wscript
4) ./waf build is ok
 but when i want to run the program with ./waf --run (examplefile) i receive the following error:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffed8b301f in _int_free (av=0x7fffedbf2760 <main_arena>, 
    p=<optimized out>, have_lock=0) at malloc.c:3996
3996 malloc.c: No such file or directory.
(gdb) bt
#0  0x00007fffed8b301f in _int_free (av=0x7fffedbf2760 <main_arena>, 
    p=<optimized out>, have_lock=0) at malloc.c:3996
#1  0x00007ffff7abe1bf in ns3::UcontextFiberManager::Delete (this=0x69d820, 
    fib=0x769210) at ../model/ucontext-fiber-manager.cc:255
#2  0x00007ffff7ac3cc7 in ns3::TaskManager::GarbageCollectDeadTasks (
    this=0x69d710) at ../model/task-manager.cc:177
#3  0x00007ffff7ac6911 in ns3::TaskManager::Schedule (this=0x69d710)
    at ../model/task-manager.cc:470
#4  0x00007ffff7ac8383 in ns3::EventImpl* ns3::MakeEvent<void (ns3::TaskManager::*)(), ns3::TaskManager*>(void (ns3::TaskManager::*)(), ns3::TaskManager*)::EventMemberImpl0::Notify() (this=0xa0b050)
    at /home/ns3/mptcp-0.89/mptcp/arch/sim/test/buildtop/build/include/ns3-dev/ns3/make-event.h:323
#5  0x00007ffff73564f7 in ns3::EventImpl::Invoke (this=0xa0b050)
    at ../src/core/model/event-impl.cc:51
#6  0x00007ffff735aebe in ns3::DefaultSimulatorImpl::ProcessOneEvent (
    this=0x6c3cb0) at ../src/core/model/default-simulator-impl.cc:149
#7  0x00007ffff735b238 in ns3::DefaultSimulatorImpl::Run (this=0x6c3cb0)
    at ../src/core/model/default-simulator-impl.cc:202
#8  0x00007ffff735722e in ns3::Simulator::Run ()
    at ../src/core/model/simulator.cc:205
#9  0x000000000040c56c in main (argc=2, argv=0x7fffffffd798)
    at ../example/dce-mmt.cc:187
(gdb) 


the most strange thing is that before (some months ago) it was running without any error perfectly. now I am trying again to run it but i can't. I am wondering if there is any other step that i have forgotten. Please guide me.


Tommaso Pecorella

unread,
Apr 1, 2017, 7:38:26 PM4/1/17
to ns-3-users
Hi,

it seems like a memory corruption error. It could have been there also months ago, and you might have not noticed.
Memory corruption problems are highly dependent on the compiler, and a new one can highlight them.
Malloc, of course, is not the problem. It's just where the debugger gives up in the trace.

Happy bug hunting,

T.

tina

unread,
Apr 3, 2017, 9:45:34 AM4/3/17
to ns-3-users

Hi Tommaso

Thanks for your reply. Now, What is your suggestion? Do i have to reinstall the older compiler that i was used before? Do i have to try to solve this in the code?


Tommaso Pecorella

unread,
Apr 5, 2017, 6:23:29 AM4/5/17
to ns-3-users
I'd solve it in the code. Use a debugger and valgrind, and find your memory leak.

Happy hunting,

T.

tina

unread,
Apr 5, 2017, 2:53:23 PM4/5/17
to ns-3-users

I couldn't find  memory leak. So i tried to make the same environment as i used before, the same compiler and libs and other dependency. so i installed a new OS (14.04) and DCE 1.8 that i used before (instead of the last version). now it is working. Thanks for your guides.

tina

unread,
Apr 8, 2017, 5:18:15 PM4/8/17
to ns-3-users
Hi ,

In order to use mptcp kernel, i did the instruction in "https://hub.docker.com/r/ns3dce/mptcp/~/dockerfile/". in part "make testbin" it will install bake.py configure -e dce-linux-inkernel". in order to avoid last upgrade, i changed it to "bake.py configure -e dce-linux-1.8 ". the installation is finished and the liblinux is made but the examples don't run currectly. for example, dce-iperf-mptcp works only with one path and for "  dce-mptcp-lte-wifi" i got the following error:
0x00007fffef2591fb in raise (sig=10)
    at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
37    ../nptl/sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.


could you please guide me
Reply all
Reply to author
Forward
0 new messages