From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/core Bug 1708] rte_malloc_socket failed to allocate with large alignment and ASan
Date: Wed, 21 May 2025 09:32:37 +0000 [thread overview]
Message-ID: <bug-1708-3@http.bugs.dpdk.org/> (raw)
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1708
Bug ID: 1708
Summary: rte_malloc_socket failed to allocate with large
alignment and ASan
Product: DPDK
Version: 21.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: dev@dpdk.org
Reporter: plestringant@kalrayinc.com
Target Milestone: ---
After commit f92b9ebed03dbd140a5a7b921cb898e661a59068, I am unable to allocate
1MiB aligned 1MiB with rte_malloc_socket when DPDK is built with ASan.
Enter try_expand_heap_primary with pg_sz=0x200000, elt_size=0x100000,
align=0x100000
alloc_sz is set to 0x200000
Enter alloc_pages_on_heap
Enter find_suitable_element
Enter elem_start_pt with elem of size 0x200000
MALLOC_ELEM_TRAILER_LEN is non zero because of ASan
new_data_start is equal to elem because of alignment
There is no room for the header and it fails.
If my analysis is correct the formula used in try_expand_heap_primary to
compute alloc_sz is off. I suggest something like:
alloc_sz = RTE_ALIGN_CEIL(RTE_ALIGN_CEIL(elt_size + MALLOC_ELEM_TRAILER_LEN,
align) + MALLOC_ELEM_HEADER_LEN, pg_sz);
I am working with branch 21.11, but I think this issue affects all the branches
which contain commit f92b9ebed03dbd140a5a7b921cb898e661a59068
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 3383 bytes --]
reply other threads:[~2025-05-21 9:32 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=bug-1708-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.