From: Alan Beadle <ab.beadle@gmail.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: users@dpdk.org
Subject: Re: Multiprocess App Problems with tx_burst
Date: Mon, 6 Jan 2025 11:05:37 -0500 [thread overview]
Message-ID: <CANTAOdxkC3KPYKz4XJ+Y4ggr-wUGe0q+bCUWrpwd8o2tmrD=xg@mail.gmail.com> (raw)
In-Reply-To: <CANTAOdwoqhLmbkWc6LTEzgP59J09tf1L5LLMFW9k4nCXqZatbA@mail.gmail.com>
> Note that I am also seeing another error. Sometimes, rather than tx
> failing, my app detects incorrect/corrupted mbuf contents and exits
> immediately. It appears that mbufs are being re-allocated when they
> should not be. I thought I had finally solved this (see my earlier
> threads) but with multi-core concurrency this problem has returned. It
> is very possible that this error is somewhere in my own library code,
> as it looks like the accompanying non-DPDK structures are also being
> corrupted (probably first).
>
> For background, I maintain a hash table of header structs to track
> individual mbufs. The sequence numbers in the headers should match
> those contained in the mbuf's payload. This check is failing after a
> few hundred successful data messages have been exchanged between the
> hosts. The sequence number in the mbuf shows that it is in the wrong
> hash bucket, and the sequence number in the header is a large
> corrupted value which is out of range for my sequence numbers (and
> also not matching the bucket).
>
There is definitely something going wrong with the mbuf allocator.
Each run results in such different errors that it is difficult to add
instrumentation for a specific one, but one frequent error is that a
newly allocated mbuf already has a refcnt of 2, and contains data that
I am still using elsewhere. At each call to rte_pktmbuf_alloc() (with
locks around it) I immediately do a rte_mbuf_refcnt_read() and ensure
that it is 1. Sometimes it is 2. This should never occur and I believe
it proves that DPDK is not working as expected here for some reason.
-Alan
next prev parent reply other threads:[~2025-01-06 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-31 17:49 Alan Beadle
2025-01-04 16:22 ` Alan Beadle
2025-01-04 18:40 ` Dmitry Kozlyuk
2025-01-04 19:16 ` Alan Beadle
2025-01-04 22:01 ` Dmitry Kozlyuk
2025-01-05 16:01 ` Alan Beadle
2025-01-06 16:05 ` Alan Beadle [this message]
2025-01-06 20:10 ` Dmitry Kozlyuk
2025-01-06 20:34 ` Alan Beadle
2025-01-07 16:09 ` Alan Beadle
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='CANTAOdxkC3KPYKz4XJ+Y4ggr-wUGe0q+bCUWrpwd8o2tmrD=xg@mail.gmail.com' \
--to=ab.beadle@gmail.com \
--cc=dmitry.kozliuk@gmail.com \
--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).