Bugzilla – Bug 1534
DCCP example crashed
Last modified: 2013-03-28 02:39:38 EDT
On Fedora 14 64bits (Ubuntu 10.04 64 works fine) Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7d272e8 in ns3::PthreadFiberManager::Wakeup (this=0x63f170, fiber=0x0) at ../model/pthread-fiber-manager.cc:327 327 pthread_mutex_lock (&fiber->thread->mutex); (gdb) bt #0 0x00007ffff7d272e8 in ns3::PthreadFiberManager::Wakeup (this=0x63f170, fiber=0x0) at ../model/pthread-fiber-manager.cc:327 #1 0x00007ffff7d28015 in ns3::PthreadFiberManager::SwitchTo (this=0x63f170, fromFiber=0x641b70, toFiber=0x0) at ../model/pthread-fiber-manager.cc:495 #2 0x00007ffff7d2d354 in ns3::TaskManager::Schedule (this=0x63f0d0) at ../model/task-manager.cc:390 #3 0x00007ffff7d2df16 in ns3::EventMemberImpl0::Notify (this=0x63aaf0) at /home/furbani/dev/dce/dev/build/include/ns3-dev/ns3/make-event.h:94 #4 0x00007ffff768d0a8 in ns3::EventImpl::Invoke (this=0x63aaf0) at ../src/core/model/event-impl.cc:39 #5 0x00007ffff7691e48 in ns3::DefaultSimulatorImpl::ProcessOneEvent (this=0x63a5b0) at ../src/core/model/default-simulator-impl.cc:131 #6 0x00007ffff7692060 in ns3::DefaultSimulatorImpl::Run (this=0x63a5b0) at ../src/core/model/default-simulator-impl.cc:183 #7 0x00007ffff768da6d in ns3::Simulator::Run () at ../src/core/model/simulator.cc:156 #8 0x0000000000409aca in main (argc=1, argv=0x7fffffffdde8) at ../example/dce-dccp.cc:52
In ucontext fiber, there is no such a problem. a task (dccp client app) is scheduled after exit of the process, then wakeup function points freed area of the memory. wakeup is called from the kernel (i.e., scheduled_timeout), but no idea how to cancel it when exit (), and don't understand why ucontext is okay. I guess this is not DCCP-specific problem.