From: Dolev Elbaz <dolevelbaz@microsoft.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users] Memory check with DPDK
Date: Thu, 11 Feb 2021 10:13:44 +0000 [thread overview]
Message-ID: <VI1PR83MB03354669D378DBFBC3C07FDAC58C9@VI1PR83MB0335.EURPRD83.prod.outlook.com> (raw)
Hi,
My team is working with DPDK and I'm trying to add a memory check to our app, using AddressSanitizer (ASan) or Valgrind. We're using gcc 7.5 on Linux (Ubuntu 18.04) and DPDK 20.11.
What I've tried so far:
* Added -fsanitize=address to compilation and link flags. It works for regular allocations (malloc/free) but since DPDK uses a custom allocator, ASan doesn't track any memory issues generated from rte_malloc or mempool_lib. Thus, not useful for most cases.
* Tried to manually poison memory using ASan interface: https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning. Requires manual un-poisoning for each allocation, so it's not feasible for an app of our scale.
* Noted valgring-dpdk (https://github.com/bluca/valgrind-dpdk/). It seems to be tested for DPDK 17.11 and have some issues on DPDK 18+ so it's not relevant (https://github.com/bluca/valgrind-dpdk/issues/4). Didn't find an official support in Valgrind for huge pages, except for this old repo: https://github.com/bisdn/valgrind-hugepages.
* Found debug flags in DPDK sources: RTE_MALLOC_DEBUG and RTE_LIBRTE_MEMPOOL_DEBUG but couldn't find a way to make them work with ASan.
Does anyone know how to add a memory check to DPDK-based apps?
Thanks,
Dolev
reply other threads:[~2021-02-11 23:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=VI1PR83MB03354669D378DBFBC3C07FDAC58C9@VI1PR83MB0335.EURPRD83.prod.outlook.com \
--to=dolevelbaz@microsoft.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).