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: Tue, 7 Jan 2025 11:09:54 -0500 [thread overview]
Message-ID: <CANTAOdwraBhC_saMY+4mLkWhNab3=BZpzjGtfwgx_Y4-8mCi-g@mail.gmail.com> (raw)
In-Reply-To: <CANTAOdwcNNUjtvdR2P_7tfJn++LhmCpiF-yAUJHadKM4=LBwhQ@mail.gmail.com>
> I think I might have found an error in my library's heap allocator
> which can result in duplicate references to copies of the same data
> header, which are supposed to be different headers. This could explain
> some of my problems if the above usage is correct. I will continue
> investigating this possibility. One thing gives me doubt. My code
> includes frequent checks of all refcounts, so if it was accessing
> something with a refcount of 0 then it should detect that, and so far
> it has not.
I have confirmed that this was the cause. Somehow the zero refcount
was not detected in my periodic checks. Everything seems to work ok
now.
In summary, here is what was happening. The heap allocator I was using
inside of my library had a concurrency bug where in rare cases it
would allocate the same buffer to multiple concurrent threads. This
led to two indirect references to the same mbuf, and the false
appearance that the same mbuf had been returned twice by the DPDK
allocator while still in use. Concurrency is hard. Thank you for your
patient help Dmitry.
-Alan
prev parent reply other threads:[~2025-01-07 16:10 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
2025-01-06 20:10 ` Dmitry Kozlyuk
2025-01-06 20:34 ` Alan Beadle
2025-01-07 16:09 ` Alan Beadle [this message]
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='CANTAOdwraBhC_saMY+4mLkWhNab3=BZpzjGtfwgx_Y4-8mCi-g@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).