* 【rte_malloc & free】the issue of crashing at malloc_elem_free
@ 2022-06-09 9:17 halsey.pian
2022-06-09 15:24 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: halsey.pian @ 2022-06-09 9:17 UTC (permalink / raw)
To: dev; +Cc: halsey.pian
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
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.
OS: Fedora 32
DPDK Version: 21.05.0
Could you please provide some information or advices? Thanks a lot.
Best Regards
Halsey Pian
[-- Attachment #2: 1654765663(1).png --]
[-- Type: image/png, Size: 215388 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 【rte_malloc & free】the issue of crashing at malloc_elem_free
2022-06-09 9:17 【rte_malloc & free】the issue of crashing at malloc_elem_free halsey.pian
@ 2022-06-09 15:24 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2022-06-09 15:24 UTC (permalink / raw)
To: halsey.pian; +Cc: dev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-09 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 9:17 【rte_malloc & free】the issue of crashing at malloc_elem_free halsey.pian
2022-06-09 15:24 ` Stephen Hemminger
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).