From: Cliff Burdick <shaklee3@gmail.com>
To: Alex Kiselev <alex@therouter.net>
Cc: Stephen Hemminger <stephen@networkplumber.org>, users <users@dpdk.org>
Subject: Re: [dpdk-users] segmention fault while accessing mbuf
Date: Sat, 6 Jun 2020 19:41:35 -0700 [thread overview]
Message-ID: <CA+Gp1nb728xMORw0ZLwqyWqQSKLNhbfLEQUmmz8t9+1y9kyutg@mail.gmail.com> (raw)
In-Reply-To: <7DA537F2-9887-4B0A-9249-064736E8A9AD@therouter.net>
I can't tell from your code, but you assigned nb_rx to the number of
packets received, but then used vec_size, which might be larger. Does this
happen if you use nb_rx in your loops?
On Sat, Jun 6, 2020 at 5:59 AM Alex Kiselev <alex@therouter.net> wrote:
>
>
> > 1 июня 2020 г., в 19:17, Stephen Hemminger <stephen@networkplumber.org>
> написал(а):
> >
> > On Mon, 01 Jun 2020 15:24:25 +0200
> > Alex Kiselev <alex@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?
>
next prev parent reply other threads:[~2020-06-07 2:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 13:24 Alex Kiselev
2020-06-01 16:17 ` Stephen Hemminger
2020-06-02 18:46 ` Alex Kiselev
2020-06-06 12:59 ` Alex Kiselev
2020-06-07 2:41 ` Cliff Burdick [this message]
2020-06-07 9:59 ` Alex Kiselev
2020-06-07 13:16 ` Cliff Burdick
2020-06-07 13:36 ` Alex Kiselev
2020-06-07 15:21 ` Cliff Burdick
2020-06-07 17:11 ` Alex Kiselev
2020-06-07 18:11 ` Cliff Burdick
2020-06-07 22:56 ` Alex Kiselev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+Gp1nb728xMORw0ZLwqyWqQSKLNhbfLEQUmmz8t9+1y9kyutg@mail.gmail.com \
--to=shaklee3@gmail.com \
--cc=alex@therouter.net \
--cc=stephen@networkplumber.org \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).