assert failed cond="m_dcBit == DATA_PDU", file=../src/lte/model/lte-pdcp-header.cc, line=114

124 views
Skip to first unread message

hongyu deng

unread,
Mar 20, 2017, 10:48:11 AM3/20/17
to ns-3-users
Hi all,

Does anybody know why this happen?
I modify the lte-rlc-um.cc tp sort m_txBuffer. And the assert failed jumo out when the script run.
I attach the file to analyze
Thanks for your help advance.

Best,
Hong.
lte-rlc-um.cc
lte-rlc-um.h

hongyu deng

unread,
Mar 21, 2017, 7:49:53 AM3/21/17
to ns-3-users
Hi

Anybody knows why this happen? Sorry for the spell wrong.
I add c++ STL sort() to sort the m_txBuffer in lte-rlc-um.cc, but there some problem cause by pdcp layer happen.
I don't know why this happen. 
I list the gdb backtrace, HOPE some help!
Thanks.

Best,
Hong.


assert failed. cond="m_dcBit == DATA_PDU", file=../src/lte/model/lte-pdcp-header.cc, line=114
terminate called without an active exception

Program received signal SIGABRT, Aborted.
0x00007fffeb7dd428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007fffeb7dd428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007fffeb7df02a in __GI_abort () at abort.c:89
#2  0x00007fffec33c84d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007fffec33a6b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007fffec33a701 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6f2f375 in ns3::LtePdcpHeader::Deserialize (this=0x7fffffff8a60, start=...) at ../src/lte/model/lte-pdcp-header.cc:114
#6  0x00007fffefbec2b8 in ns3::Packet::RemoveHeader (this=0x969990, header=...) at ../src/network/model/packet.cc:270
#7  0x00007ffff6ef5a04 in ns3::PacketSort (p1=..., p2=...) at ../src/lte/model/lte-rlc-um.cc:118
#8  0x00007ffff6f0a4ad in __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)>::operator()<__gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > >, __gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > > > (this=0x7fffffff8b50, __it1=..., 
    __it2=...) at /usr/include/c++/5/bits/predefined_ops.h:123
#9  0x00007ffff6f0a381 in std::__unguarded_partition<__gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)> > (
    __first=..., __last=..., __pivot=..., __comp=...) at /usr/include/c++/5/bits/stl_algo.h:1900
#10 0x00007ffff6f09891 in std::__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)> > (
    __first=..., __last=..., __comp=...) at /usr/include/c++/5/bits/stl_algo.h:1918
#11 0x00007ffff6f08bab in std::__introsort_loop<__gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)> > (
    __first=..., __last=..., __depth_limit=17, __comp=...) at /usr/include/c++/5/bits/stl_algo.h:1948
#12 0x00007ffff6f07550 in std::__sort<__gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)> > (__first=..., 
    __last=..., __comp=...) at /usr/include/c++/5/bits/stl_algo.h:1963
#13 0x00007ffff6f0686a in std::sort<__gnu_cxx::__normal_iterator<ns3::Ptr<ns3::Packet>*, std::vector<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > >, bool (*)(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)> (__first=..., __last=..., 
    __comp=0x7ffff6ef588c <ns3::PacketSort(ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet>)>) at /usr/include/c++/5/bits/stl_algo.h:4729
#14 0x00007ffff6ef6178 in ns3::LteRlcUm::DoTransmitPdcpPdu (this=0x898bc0, p=...) at ../src/lte/model/lte-rlc-um.cc:172
#15 0x00007ffff6eeac95 in ns3::LteRlcSpecificLteRlcSapProvider<ns3::LteRlc>::TransmitPdcpPdu (this=0x8c1e30, params=...)
    at ./ns3/lte-rlc-sap.h:109
#16 0x00007ffff6f2d732 in ns3::LtePdcp::DoTransmitPdcpSdu (this=0x899250, p=...) at ../src/lte/model/lte-pdcp.cc:208
#17 0x00007ffff6f2edbf in ns3::LtePdcpSpecificLtePdcpSapProvider<ns3::LtePdcp>::TransmitPdcpSdu (this=0x86f0a0, params=...)
    at ./ns3/lte-pdcp-sap.h:121
#18 0x00007ffff6e45399 in ns3::UeManager::SendData (this=0x8c39d0, bid=1 '\001', p=...) at ../src/lte/model/lte-enb-rrc.cc:675
#19 0x00007ffff6e53323 in ns3::LteEnbRrc::SendData (this=0x6d3340, packet=...) at ../src/lte/model/lte-enb-rrc.cc:1807
#20 0x00007ffff6f3d6cc in ns3::LteEnbNetDevice::Send (this=0x6d3910, packet=..., dest=..., protocolNumber=2048)
    at ../src/lte/model/lte-enb-net-device.cc:348
#21 0x00007fffefc78a64 in ns3::PacketSocket::SendTo (this=0x6d9e50, p=..., flags=0, address=...) at ../src/network/utils/packet-socket.cc:349
#22 0x00007fffefc77b77 in ns3::PacketSocket::Send (this=0x6d9e50, p=..., flags=0) at ../src/network/utils/packet-socket.cc:269
#23 0x00007fffefc01b19 in ns3::Socket::Send (this=0x6d9e50, p=...) at ../src/network/model/socket.cc:138
#24 0x00007ffff714da19 in ns3::EpcEnbApplication::SendToLteSocket (this=0x6da200, packet=..., rnti=14, bid=1 '\001')
    at ../src/lte/model/epc-enb-application.cc:287

Manuel Requena

unread,
Mar 21, 2017, 8:14:44 AM3/21/17
to ns-3-...@googlegroups.com
Hello,

m_txBuffer contains the RLC SDUs received from the upper layer (i.e. PDCP). Each RLC SDU contains one PDCP PDU. But depending on the previous NotifyTxOpportunity received from the MAC layer, the first packet of this buffer may be not a full RLC SDU but just a part of it (pending to be sent). Some flags of the RLC header indicates if the RLC PDU contains full SDUs or not.

If you sort this buffer, you are mixing full with partial SDUs. The fragmentation and reassembling procedure will be fooled. So, in reception the PDCP layer may find partial PDCP PDUs when there should be full PDCP PDUs, so the PDCP header will be missed.

More info about RLC in: https://www.nsnam.org/docs/models/html/lte-design.html#rlc

Best regards,
Manuel

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

hongyu deng

unread,
Mar 21, 2017, 8:35:01 AM3/21/17
to ns-3-users
Hi Manuel,

Thanks you quick reply and it is right and helpful!
I want to manage the packet receive from remotehost in Enb, and i know the RLC layer is in charge of the queue, Am i right?
I read the document from LENA and know the relevant buffer.
If  i want to sort the txBuffer (but it seems unable). Could you give some advice? where should i manage the packet?

Thanks,
Hong.

Manuel Requena

unread,
Mar 21, 2017, 12:00:11 PM3/21/17
to ns-3-...@googlegroups.com
Hi Hong,

I don't really know why you want to sort the txBuffer in the RLC-UM but if you really want to sort this buffer you could do it for all the Packets except for the first one (if it has started to be sent, i.e. it does not contains a full SDU). To simplify, you sort all the buffer except for the first Packet.

On the other hand, if you want to implement some kind of packet/SDU/PDU/frame priorization, maybe this should be implemented in a new/modified MAC scheduler. But all depends on what you want to do?

Best regards,
Manuel

Note. Packet = ns-3 Packet. In RLC-UM, one ns-3 Packet contains one RLC SDU and RLC SDU = PDCP PDU.


--

hongyu deng

unread,
Mar 22, 2017, 4:26:20 AM3/22/17
to ns-3-users
Hi Manuel,

Thanks you very much, i sort txBuffer except the first Packet like this std::sort(m_txBuffer.begin() +1,m_txBuffer.end(),PacketSortBaseSize);
and the code works good know.
in my scenario , a UE WORKs as a gateway, so i need to sort the packet in txbuffer.
Thanks you!

Best regards,
Hong.

Reply all
Reply to author
Forward
0 new messages