* [dpdk-users] Memory check with DPDK
@ 2021-02-11 10:13 Dolev Elbaz
0 siblings, 0 replies; only message in thread
From: Dolev Elbaz @ 2021-02-11 10:13 UTC (permalink / raw)
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-11 23:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 10:13 [dpdk-users] Memory check with DPDK Dolev Elbaz
DPDK usage discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
Example config snippet for mirrors.
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git