[dpdk-users] segmention fault while accessing mbuf
Alex Kiselev
alex at therouter.net
Sat Jun 6 14:59:40 CEST 2020
> 1 июня 2020 г., в 19:17, Stephen Hemminger <stephen at networkplumber.org> написал(а):
>
> On Mon, 01 Jun 2020 15:24:25 +0200
> Alex Kiselev <alex at therouter.net> wrote:
>
>> Hello,
>>
>> I've got a segmentation fault error in my data plane path.
>> I am pretty sure the code where the segfault happened is ok,
>> so my guess is that I somehow received a corrupted mbuf.
>> How could I troubleshoot this? Is there any way?
>> Is it possible that other threads of the application
>> corrupted that mbuf?
>>
>> I would really appriciate any advice.
>> Thanks.
>>
>> DPDK 18.11.3
>> NIC: 82599ES
>>
>> Code:
>>
>> nb_rx = rte_eth_rx_burst(port_id, queue_id, pkts_burst,
>> MAX_PKT_BURST);
>>
>> ...
>>
>> for (i=0; i < vec_size; i++) {
>> rte_prefetch0(rte_pktmbuf_mtod(m_v[i], void *));
>>
>> for (i=0; i < vec_size; i++) {
>> m = m_v[i];
>> eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
>> eth_type = rte_be_to_cpu_16(eth_hdr->ether_type); <---
>> Segmentation fault
>> ...
>>
>> #0 rte_arch_bswap16 (_x=<error reading variable: Cannot access memory
>> at address 0x4d80000000053010>)
>
> Build with as many of the debug options turned on in the DPDK config,
> and build with EXTRA_CFLAGS of -g.
Could using an incorrect (a very big one) value of mbuf pkt_len and data_len while transmitting cause mbuf corruption and following segmentation fault on rx?
More information about the users
mailing list