From: Stephen Hemminger <stephen@networkplumber.org>
To: "halsey.pian@longsys.com" <halsey.pian@longsys.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: 【rte_malloc & free】the issue of crashing at malloc_elem_free
Date: Thu, 9 Jun 2022 08:24:32 -0700 [thread overview]
Message-ID: <20220609082432.40f631d3@hermes.local> (raw)
In-Reply-To: <95F5C09B652250489A8640C2D0DF5BD0BF991F7A@lsex.goodwill-ic.com>
On Thu, 9 Jun 2022 09:17:33 +0000
"halsey.pian@longsys.com" <halsey.pian@longsys.com> wrote:
> Dear All,
>
> I am suffering an crash issue recently. My app based on SPDK/DPDK uses rte_malloc_socket and rte_free to use hugepage feature in multi-threads and async programming environment.
>
> Unfortunately, It would crashed sometimes, and I found that it usually crashed caused by the element's size = 0 in function malloc_elem_free at line 570 in file malloc_elem.c during calling rte_free, the call stack is as the attachment.
>
> I am not sure if I miss some information related async and multi-thread programing using DPDK rte_malloc module.
>
> BTW, it works fine when I switch to kernel's malloc/free.
Does it work if you enable address sanitizer and use regular glibc malloc/free?
What about with valgrind?
You can also build DPDK with RTE_MALLOC_DEBUG which adds more checks for clobbering.
I suspect your code is writing outside the allocated space or has a use after free.
prev parent reply other threads:[~2022-06-09 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 9:17 halsey.pian
2022-06-09 15:24 ` Stephen Hemminger [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=20220609082432.40f631d3@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=halsey.pian@longsys.com \
/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).