Bugzilla – Bug 2951
crash after enable lte logging
Last modified: 2018-08-22 18:33:22 UTC
crash stack below: Process 15557 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00000001001dfcb1 libns3.28-aodv-test-debug.dylib`void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*) + 209 libns3.28-aodv-test-debug.dylib`std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>: -> 0x1001dfcb1 <+209>: cmpq (%rdx), %rcx 0x1001dfcb4 <+212>: jne 0x1001dfe78 ; <+664> 0x1001dfcba <+218>: movq -0xa0(%rbp), %rax 0x1001dfcc1 <+225>: movq %rax, -0x68(%rbp) Target 0: (ns3.28-test-runner-debug) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00000001001dfcb1 libns3.28-aodv-test-debug.dylib`void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*) + 209 frame #1: 0x00000001027d8232 libns3.28-lte-debug.dylib`std::__1::__tree<std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int>, std::__1::__map_value_compare<ns3::ImsiLcidPair_t, std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int>, std::__1::less<ns3::ImsiLcidPair_t>, true>, std::__1::allocator<std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int> > >::__insert_node_at(std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*, std::__1::__tree_node_base<void*>*&, std::__1::__tree_node_base<void*>*) + 194 frame #2: 0x00000001027d7137 libns3.28-lte-debug.dylib`std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int>, std::__1::__tree_node<std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int>, std::__1::__map_value_compare<ns3::ImsiLcidPair_t, std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int>, std::__1::less<ns3::ImsiLcidPair_t>, true>, std::__1::allocator<std::__1::__value_type<ns3::ImsiLcidPair_t, unsigned int> > >::__emplace_unique_key_args<ns3::ImsiLcidPair_t, std::__1::piecewise_construct_t const&, std::__1::tuple<ns3::ImsiLcidPair_t const&>, std::__1::tuple<> >(ns3::ImsiLcidPair_t const&, std::__1::piecewise_construct_t const&&&, std::__1::tuple<ns3::ImsiLcidPair_t const&>&&, std::__1::tuple<>&&) + 279 frame #3: 0x00000001027c03e6 libns3.28-lte-debug.dylib`std::__1::map<ns3::ImsiLcidPair_t, unsigned int, std::__1::less<ns3::ImsiLcidPair_t>, std::__1::allocator<std::__1::pair<ns3::ImsiLcidPair_t const, unsigned int> > >::operator[](ns3::ImsiLcidPair_t const&) + 278 frame #4: 0x00000001027c0970 libns3.28-lte-debug.dylib`ns3::RadioBearerStatsCalculator::DlTxPdu(unsigned short, unsigned long long, unsigned short, unsigned char, unsigned int) + 640 frame #5: 0x00000001027e2752 libns3.28-lte-debug.dylib`ns3::DlTxPduCallback(ns3::Ptr<ns3::BoundCallbackArgument>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int) + 706 frame #6: 0x00000001027f0705 libns3.28-lte-debug.dylib`ns3::BoundFunctorCallbackImpl<void (*)(ns3::Ptr<ns3::BoundCallbackArgument>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int), void, ns3::Ptr<ns3::BoundCallbackArgument>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int) + 117 frame #7: 0x00000001026a1a08 libns3.28-lte-debug.dylib`ns3::Callback<void, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int) const + 104 frame #8: 0x00000001026a1821 libns3.28-lte-debug.dylib`ns3::BoundFunctorCallbackImpl<ns3::Callback<void, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>, void, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(unsigned short, unsigned char, unsigned int) + 97 frame #9: 0x000000010054982e libns3.28-test-test-debug.dylib`ns3::Callback<void, unsigned short, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(unsigned short, unsigned char, unsigned int) const + 78 frame #10: 0x0000000100547037 libns3.28-test-test-debug.dylib`ns3::TracedCallback<unsigned short, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(unsigned short, unsigned char, unsigned int) const + 519 frame #11: 0x00000001027161ff libns3.28-lte-debug.dylib`ns3::LtePdcp::DoTransmitPdcpSdu(ns3::Ptr<ns3::Packet>) + 1775 frame #12: 0x0000000102717031 libns3.28-lte-debug.dylib`ns3::LtePdcpSpecificLtePdcpSapProvider<ns3::LtePdcp>::TransmitPdcpSdu(ns3::LtePdcpSapProvider::TransmitPdcpSduParameters) + 65 frame #13: 0x0000000102565be2 libns3.28-lte-debug.dylib`ns3::UeManager::SendData(unsigned char, ns3::Ptr<ns3::Packet>) + 2850 frame #14: 0x0000000102588a5d libns3.28-lte-debug.dylib`ns3::LteEnbRrc::SendData(ns3::Ptr<ns3::Packet>) + 1165 frame #15: 0x000000010272dfeb libns3.28-lte-debug.dylib`ns3::LteEnbNetDevice::Send(ns3::Ptr<ns3::Packet>, ns3::Address const&, unsigned short) + 1003 frame #16: 0x0000000106078695 libns3.28-network-debug.dylib`ns3::PacketSocket::SendTo(ns3::Ptr<ns3::Packet>, unsigned int, ns3::Address const&) + 3237 frame #17: 0x0000000106077290 libns3.28-network-debug.dylib`ns3::PacketSocket::Send(ns3::Ptr<ns3::Packet>, unsigned int) + 688 frame #18: 0x0000000105fb9a3f libns3.28-network-debug.dylib`ns3::Socket::Send(ns3::Ptr<ns3::Packet>) + 575 frame #19: 0x0000000102b8aec6 libns3.28-lte-debug.dylib`ns3::EpcEnbApplication::SendToLteSocket(ns3::Ptr<ns3::Packet>, unsigned short, unsigned char) + 918 frame #20: 0x0000000102b85533 libns3.28-lte-debug.dylib`ns3::EpcEnbApplication::RecvFromS1uSocket(ns3::Ptr<ns3::Socket>) + 2211 frame #21: 0x0000000102b9127a libns3.28-lte-debug.dylib`ns3::MemPtrCallbackImpl<ns3::EpcEnbApplication*, void (ns3::EpcEnbApplication::*)(ns3::Ptr<ns3::Socket>), void, ns3::Ptr<ns3::Socket>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::Socket>) + 154 frame #22: 0x0000000105fbafba libns3.28-network-debug.dylib`ns3::Callback<void, ns3::Ptr<ns3::Socket>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::Socket>) const + 74 frame #23: 0x0000000105fbc557 libns3.28-network-debug.dylib`ns3::Socket::NotifyDataRecv() + 471 frame #24: 0x000000010472d7d4 libns3.28-internet-debug.dylib`ns3::UdpSocketImpl::ForwardUp(ns3::Ptr<ns3::Packet>, ns3::Ipv4Header, unsigned short, ns3::Ptr<ns3::Ipv4Interface>) + 2228 frame #25: 0x0000000104741316 libns3.28-internet-debug.dylib`ns3::MemPtrCallbackImpl<ns3::Ptr<ns3::UdpSocketImpl>, void (ns3::UdpSocketImpl::*)(ns3::Ptr<ns3::Packet>, ns3::Ipv4Header, unsigned short, ns3::Ptr<ns3::Ipv4Interface>), void, ns3::Ptr<ns3::Packet>, ns3::Ipv4Header, unsigned short, ns3::Ptr<ns3::Ipv4Interface>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::Packet>, ns3::Ipv4Header, unsigned short, ns3::Ptr<ns3::Ipv4Interface>) + 326 frame #26: 0x00000001046d4807 libns3.28-internet-debug.dylib`ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Ipv4Header, unsigned short, ns3::Ptr<ns3::Ipv4Interface>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::Packet>, ns3::Ipv4Header, unsigned short, ns3::Ptr<ns3::Ipv4Interface>) const + 151 frame #27: 0x00000001046d46b8 libns3.28-internet-debug.dylib`ns3::Ipv4EndPoint::ForwardUp(ns3::Ptr<ns3::Packet>, ns3::Ipv4Header const&, unsigned short, ns3::Ptr<ns3::Ipv4Interface>) + 840 frame #28: 0x00000001046dc491 libns3.28-internet-debug.dylib`ns3::UdpL4Protocol::Receive(ns3::Ptr<ns3::Packet>, ns3::Ipv4Header const&, ns3::Ptr<ns3::Ipv4Interface>) + 6705 frame #29: 0x00000001046813ce libns3.28-internet-debug.dylib`ns3::Ipv4L3Protocol::LocalDeliver(ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int) + 3166 frame #30: 0x00000001046c81e5 libns3.28-internet-debug.dylib`ns3::MemPtrCallbackImpl<ns3::Ipv4L3Protocol*, void (ns3::Ipv4L3Protocol::*)(ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int), void, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int) + 165 frame #31: 0x00000001002a16eb libns3.28-aodv-debug.dylib`ns3::Callback<void, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int) const + 91 frame #32: 0x00000001049d2c39 libns3.28-internet-debug.dylib`ns3::Ipv4ListRouting::RouteInput(ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::Ptr<ns3::NetDevice const>, ns3::Callback<void, ns3::Ptr<ns3::Ipv4Route>, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>, ns3::Callback<void, ns3::Ptr<ns3::Ipv4MulticastRoute>, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>, ns3::Callback<void, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>, ns3::Callback<void, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>) + 3593 frame #33: 0x0000000104679816 libns3.28-internet-debug.dylib`ns3::Ipv4L3Protocol::Receive(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType) + 9142 frame #34: 0x00000001046bc42a libns3.28-internet-debug.dylib`ns3::MemPtrCallbackImpl<ns3::Ipv4L3Protocol*, void (ns3::Ipv4L3Protocol::*)(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType), void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType) + 218 frame #35: 0x00000001052b6e0a libns3.28-traffic-control-debug.dylib`ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType) const + 138 frame #36: 0x00000001052b692a libns3.28-traffic-control-debug.dylib`ns3::TrafficControlLayer::Receive(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType) + 2426 frame #37: 0x00000001046c05d9 libns3.28-internet-debug.dylib`ns3::MemPtrCallbackImpl<ns3::Ptr<ns3::TrafficControlLayer>, void (ns3::TrafficControlLayer::*)(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType), void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType) + 297 frame #38: 0x00000001052b6e0a libns3.28-traffic-control-debug.dylib`ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType) const + 138 frame #39: 0x0000000105f83e0d libns3.28-network-debug.dylib`ns3::Node::ReceiveFromDevice(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, bool) + 3085 frame #40: 0x0000000105f7e43e libns3.28-network-debug.dylib`ns3::Node::NonPromiscReceiveFromDevice(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&) + 894 frame #41: 0x0000000105f8a1c3 libns3.28-network-debug.dylib`ns3::MemPtrCallbackImpl<ns3::Node*, bool (ns3::Node::*)(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&), bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&) + 195 frame #42: 0x0000000100b7fc93 libns3.28-mesh-debug.dylib`ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&) const + 115 frame #43: 0x0000000104eed5fe libns3.28-point-to-point-debug.dylib`ns3::PointToPointNetDevice::Receive(ns3::Ptr<ns3::Packet>) + 2142 frame #44: 0x0000000104f132ad libns3.28-point-to-point-debug.dylib`ns3::EventImpl* ns3::MakeEvent<void (ns3::PointToPointNetDevice::*)(ns3::Ptr<ns3::Packet>), ns3::Ptr<ns3::PointToPointNetDevice>, ns3::Ptr<ns3::Packet> >(void (ns3::PointToPointNetDevice::*)(ns3::Ptr<ns3::Packet>), ns3::Ptr<ns3::PointToPointNetDevice>, ns3::Ptr<ns3::Packet>)::EventMemberImpl1::Notify() + 205 frame #45: 0x00000001069b4fdc libns3.28-core-debug.dylib`ns3::EventImpl::Invoke() + 412 frame #46: 0x00000001069bd105 libns3.28-core-debug.dylib`ns3::DefaultSimulatorImpl::ProcessOneEvent() + 853 frame #47: 0x00000001069bd553 libns3.28-core-debug.dylib`ns3::DefaultSimulatorImpl::Run() + 515 frame #48: 0x00000001069b6033 libns3.28-core-debug.dylib`ns3::Simulator::Run() + 339 frame #49: 0x000000010107bab0 libns3.28-ns3-rmcat-test-debug.dylib`RmcatLteTestCase::DoRun() + 880 frame #50: 0x0000000106a0f70c libns3.28-core-debug.dylib`ns3::TestCase::Run(ns3::TestRunnerImpl*) + 1180 frame #51: 0x0000000106a0f69b libns3.28-core-debug.dylib`ns3::TestCase::Run(ns3::TestRunnerImpl*) + 1067 frame #52: 0x0000000106a1db2a libns3.28-core-debug.dylib`ns3::TestRunnerImpl::Run(int, char**) + 11930 frame #53: 0x0000000106a1e0fb libns3.28-core-debug.dylib`ns3::TestRunner::Run(int, char**) + 411 frame #54: 0x0000000100002f82 ns3.28-test-runner-debug`main + 34 frame #55: 0x00007fff6a5db015 libdyld.dylib`start + 1 frame #56: 0x00007fff6a5db015 libdyld.dylib`start + 1 And the code to build the LTE topology void LteTop::Build(uint16_t numberOfUEs, double speedKmPerHour, uint32_t msDelay) { NS_LOG_INFO("LteTop::Build"); // setup core network // PointToPoint links for the connection between the eNBs and the SGW (S1-U interface) and among eNBs (X2-U and X2-C interfaces) Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisPropagationLossModel")); epcHelper = CreateObject<PointToPointEpcHelper> (); lteHelper->SetEpcHelper (epcHelper); // Create packet data network gateway Ptr<Node> pgw = epcHelper->GetPgwNode (); // Create a single RemoteHost on Internet m_remoteNode.Create (1); Ptr<Node> remoteHost = m_remoteNode.Get (0); InternetStackHelper internet; internet.Install (m_remoteNode); // Create p2p channel between pgw and remote host PointToPointHelper p2ph; p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s"))); p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500)); p2ph.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (msDelay))); NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost); Ipv4AddressHelper ipv4h; ipv4h.SetBase ("1.0.0.0", "255.0.0.0"); ipv4h.Assign (internetDevices); // routing setup SGW/PGW -> RemoteHost, by default UEs will be assigned with ip address in 7.0.0.0 network Ipv4StaticRoutingHelper ipv4RoutingHelper; Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ()); remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); // setup radio access network (E-UTRAN) m_enbNodes.Create(1); m_ueNodes.Create(numberOfUEs); // Install Mobility Model MobilityHelper mobility; ObjectFactory pos; pos.SetTypeId ("ns3::RandomRectanglePositionAllocator"); pos.Set ("X", StringValue ("ns3::UniformRandomVariable[Min=1000.0|Max=3000.0]")); pos.Set ("Y", StringValue ("ns3::UniformRandomVariable[Min=1000.0|Max=3000.0]")); Ptr<PositionAllocator> taPositionAlloc = pos.Create ()->GetObject<PositionAllocator> (); std::ostringstream speedVariableStream; speedVariableStream << "ns3::ConstantRandomVariable[Constant=" << speedKmPerHour * 1000.0 / 3600 << "]"; mobility.SetMobilityModel ("ns3::RandomWaypointMobilityModel", "Speed", StringValue (speedVariableStream.str ()), "PositionAllocator", PointerValue (taPositionAlloc)); mobility.Install(m_ueNodes); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (m_enbNodes); // Install LTE Devices to the nodes NetDeviceContainer m_enbDevices = lteHelper->InstallEnbDevice (m_enbNodes); NetDeviceContainer m_ueDevices = lteHelper->InstallUeDevice (m_ueNodes); // Install the IP stack on the UEs, assign ip and setup routing internet.Install (m_ueNodes); Ipv4InterfaceContainer ueIpIface; ueIpIface = epcHelper->AssignUeIpv4Address (m_ueDevices); for (uint32_t u = 0; u < m_ueNodes.GetN (); ++u) { Ptr<Node> ueNode = m_ueNodes.Get (u); // Set the default gateway for the UE Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ()); ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1); } // Attach UEs to eNodeB for (uint16_t i = 0; i < numberOfUEs; i++) { lteHelper->Attach (m_ueDevices.Get(i), m_enbDevices.Get(0)); } Config::SetDefault ("ns3::LteRlcUm::MaxTxBufferSize", UintegerValue (1024 * 1024)); Config::Connect ("/NodeList/*/$ns3::MobilityModel/CourseChange", MakeCallback (&CourseChange)); lteHelper->EnablePhyTraces (); lteHelper->EnableMacTraces (); lteHelper->EnableRlcTraces (); lteHelper->EnablePdcpTraces (); }
Please, could you send the simulation program to reproduce the problem?
thanks, upload to https://github.com/fuji246/ns3-rmcat/tree/lte. run "./test.py -s rmcat-lte -w rmcat.html -r"
Please, could you describe your full system? OS, compiler version, ns-3 version... This module does not compile in a Ubuntu 16.04 (64 bit) with g++-5.4.0.
Sorry, I'm using MAC. I have fixed the compile issue in ubuntu 16.04 gcc 5.4.0, you can pull the latest code https://github.com/fuji246/ns3-rmcat/tree/lte.
Please, review your code. The problem is in how you build the lte network. The LteHelper is a local variable in a method (LteTop::Build). So, when the method is finished, the helper is destroyed and some objects it creates too.
I've changed the code, still crashes.
The changes https://github.com/fuji246/ns3-rmcat/commit/e81c36959113cfd5a5e4a95e7f1e047adca789f0 And callstack: Process 32640 launched: '/Users/jeromy/work/cisco/ns-allinone-3.28/ns-3.28/build/utils/ns3.28-test-runner-debug' (x86_64) Process 32640 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x21) frame #0: 0x00000001027e2439 libns3.28-lte-debug.dylib`ns3::operator<(ns3::RadioBearerStatsConnector::CellIdRnti const&, ns3::RadioBearerStatsConnector::CellIdRnti const&) + 25 libns3.28-lte-debug.dylib`ns3::operator<: -> 0x1027e2439 <+25>: movzwl (%rsi), %edx 0x1027e243c <+28>: cmpl %edx, %ecx 0x1027e243e <+30>: movb %al, -0x11(%rbp) 0x1027e2441 <+33>: jl 0x1027e2484 ; <+100> Target 0: (ns3.28-test-runner-debug) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x21) * frame #0: 0x00000001027e2439 libns3.28-lte-debug.dylib`ns3::operator<(ns3::RadioBearerStatsConnector::CellIdRnti const&, ns3::RadioBearerStatsConnector::CellIdRnti const&) + 25 frame #1: 0x00000001027eea98 libns3.28-lte-debug.dylib`std::__1::__tree_node_base<void*>*& std::__1::__tree<std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::__map_value_compare<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::less<ns3::RadioBearerStatsConnector::CellIdRnti>, true>, std::__1::allocator<std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::__find_equal<ns3::RadioBearerStatsConnector::CellIdRnti>(std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*&, ns3::RadioBearerStatsConnector::CellIdRnti const&) + 280 frame #2: 0x00000001027ee3c5 libns3.28-lte-debug.dylib`std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::__tree_node<std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::__map_value_compare<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::less<ns3::RadioBearerStatsConnector::CellIdRnti>, true>, std::__1::allocator<std::__1::__value_type<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::__emplace_unique_key_args<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::piecewise_construct_t const&, std::__1::tuple<ns3::RadioBearerStatsConnector::CellIdRnti const&>, std::__1::tuple<> >(ns3::RadioBearerStatsConnector::CellIdRnti const&, std::__1::piecewise_construct_t const&&&, std::__1::tuple<ns3::RadioBearerStatsConnector::CellIdRnti const&>&&, std::__1::tuple<>&&) + 85 frame #3: 0x00000001027ec976 libns3.28-lte-debug.dylib`std::__1::map<ns3::RadioBearerStatsConnector::CellIdRnti, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<ns3::RadioBearerStatsConnector::CellIdRnti>, std::__1::allocator<std::__1::pair<ns3::RadioBearerStatsConnector::CellIdRnti const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::operator[](ns3::RadioBearerStatsConnector::CellIdRnti const&) + 278 frame #4: 0x00000001027e935b libns3.28-lte-debug.dylib`ns3::RadioBearerStatsConnector::StoreUeManagerPath(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short) + 3387 frame #5: 0x00000001027e3fe9 libns3.28-lte-debug.dylib`ns3::RadioBearerStatsConnector::NotifyNewUeContextEnb(ns3::RadioBearerStatsConnector*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short) + 73 frame #6: 0x00000001027ed417 libns3.28-lte-debug.dylib`ns3::BoundFunctorCallbackImpl<void (*)(ns3::RadioBearerStatsConnector*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short), void, ns3::RadioBearerStatsConnector*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short) + 87 frame #7: 0x0000000100602262 libns3.28-test-test-debug.dylib`ns3::Callback<void, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short) const + 98 frame #8: 0x000000010060207a libns3.28-test-test-debug.dylib`ns3::BoundFunctorCallbackImpl<ns3::Callback<void, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>, void, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned short, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(unsigned short, unsigned short) + 90 frame #9: 0x000000010053a3f2 libns3.28-test-test-debug.dylib`ns3::Callback<void, unsigned short, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(unsigned short, unsigned short) const + 66 frame #10: 0x0000000100538139 libns3.28-test-test-debug.dylib`ns3::TracedCallback<unsigned short, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()(unsigned short, unsigned short) const + 489 frame #11: 0x000000010258e5ab libns3.28-lte-debug.dylib`ns3::LteEnbRrc::AddUe(ns3::UeManager::State, unsigned char) + 3483 frame #12: 0x0000000102550c22 libns3.28-lte-debug.dylib`ns3::LteEnbRrc::DoAllocateTemporaryCellRnti(unsigned char) + 418 frame #13: 0x0000000102550a68 libns3.28-lte-debug.dylib`ns3::EnbRrcMemberLteEnbCmacSapUser::AllocateTemporaryCellRnti() + 40 frame #14: 0x0000000102897755 libns3.28-lte-debug.dylib`ns3::LteEnbMac::DoSubframeIndication(unsigned int, unsigned int) + 8037 frame #15: 0x00000001028957e5 libns3.28-lte-debug.dylib`ns3::EnbMacMemberLteEnbPhySapUser::SubframeIndication(unsigned int, unsigned int) + 37 frame #16: 0x00000001024cd94e libns3.28-lte-debug.dylib`ns3::LteEnbPhy::StartSubFrame() + 15550 frame #17: 0x00000001024f0866 libns3.28-lte-debug.dylib`ns3::EventImpl* ns3::MakeEvent<void (ns3::LteEnbPhy::*)(), ns3::LteEnbPhy*>(void (ns3::LteEnbPhy::*)(), ns3::LteEnbPhy*)::EventMemberImpl0::Notify() + 118 frame #18: 0x00000001069b4fdc libns3.28-core-debug.dylib`ns3::EventImpl::Invoke() + 412 frame #19: 0x00000001069bd105 libns3.28-core-debug.dylib`ns3::DefaultSimulatorImpl::ProcessOneEvent() + 853 frame #20: 0x00000001069bd553 libns3.28-core-debug.dylib`ns3::DefaultSimulatorImpl::Run() + 515 frame #21: 0x00000001069b6033 libns3.28-core-debug.dylib`ns3::Simulator::Run() + 339 frame #22: 0x000000010107bab0 libns3.28-ns3-rmcat-test-debug.dylib`RmcatLteTestCase::DoRun() + 880 frame #23: 0x0000000106a0f70c libns3.28-core-debug.dylib`ns3::TestCase::Run(ns3::TestRunnerImpl*) + 1180 frame #24: 0x0000000106a0f69b libns3.28-core-debug.dylib`ns3::TestCase::Run(ns3::TestRunnerImpl*) + 1067 frame #25: 0x0000000106a1db2a libns3.28-core-debug.dylib`ns3::TestRunnerImpl::Run(int, char**) + 11930 frame #26: 0x0000000106a1e0fb libns3.28-core-debug.dylib`ns3::TestRunner::Run(int, char**) + 411 frame #27: 0x0000000100002f82 ns3.28-test-runner-debug`main + 34 frame #28: 0x00007fff6a5db015 libdyld.dylib`start + 1 frame #29: 0x00007fff6a5db015 libdyld.dylib`start + 1
Remove the following lines works, but I need those for debugging. lteHelper->EnablePhyTraces (); lteHelper->EnableMacTraces (); lteHelper->EnableRlcTraces (); lteHelper->EnablePdcpTraces ();
(In reply to Jiantao Fu from comment #6) > I've changed the code, still crashes. I've check your code and you added the global variable for the lteHelper. But you kept the local variable with the same name. Please, review your code again. And review the concepts of global variable, local variable and scope of local and global variables when you define both with the same name.
Hi Jiantao, Do you have any update on this? If not, we should close the issue.
sorry, my bad, it's working now. Thanks so much!