Bug 1534

Summary: DCCP example crashed
Product: dce Reporter: Hajime Tazaki <tazaki>
Component: otherAssignee: Hajime Tazaki <tazaki>
Status: CONFIRMED ---    
Severity: major CC: ns-bugs
Priority: P5    
Version: unspecified   
Hardware: PC   
OS: Linux   

Description Hajime Tazaki 2012-11-19 20:09:42 EST
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 
#2  0x00007ffff7d2d354 in ns3::TaskManager::Schedule (this=0x63f0d0) at 
#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 
#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 
#8  0x0000000000409aca in main (argc=1, argv=0x7fffffffdde8) at 
Comment 1 Hajime Tazaki 2012-11-19 20:10:27 EST
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.