DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: <dev@dpdk.org>
Subject: Error with --no-huge when compiled with -fsanitize=address from gcc 15
Date: Thu, 15 May 2025 12:32:01 +0200	[thread overview]
Message-ID: <D9WNYZDZHISG.3091PEP8Y34QL@redhat.com> (raw)

Hi folks,

I recently updated to Fedora 42 that comes with GCC 15.

When building with -fsanitize=address (libasan.so.8), it seems that
the --no-huge mode (along with --no-shconf) fails at initialization for
some obscure reason.

"couldn't allocate memory due to IOVA exceeding limits of current DMA mask."

I have looked around everywhere and I don't see how to get around this
issue.

It is working fine with GCC 14. Maybe some changes were made to libasan
related to the address ranges exposed to the mocked allocation
functions.

Is this something that needs to be fixed in DPDK?

Here is a reproducer:

$ meson setup build -Dtests=false -Denable_docs=false -Ddeveloper_mode=disabled \
	-Denable_drivers=net/tap -Denable_libs=gso -Denable_apps=test-pmd \
	-Db_sanitize=address
The Meson build system
Version: 1.7.0
Source dir: /home/rjarry/upstream/dpdk
Build dir: /home/rjarry/upstream/dpdk/build
Build type: native build
Project name: DPDK
Project version: 25.03.0
C compiler for the host machine: ccache cc (gcc 15.1.1 "cc (GCC) 15.1.1 20250425 (Red Hat 15.1.1-1)")
C linker for the host machine: cc ld.bfd 2.44-3
Host machine cpu family: x86_64
Host machine cpu: x86_64
...
Library asan found: YES
...
$ ninja -C build
ninja: Entering directory `build'
[259/259] Linking target app/dpdk-testpmd

$ ldd build/app/dpdk-testpmd | grep asan
	libasan.so.8 => /lib64/libasan.so.8 (0x00007fac50e00000)

$ rpm -qa *asan*
libasan-15.1.1-1.fc42.x86_64

$ build/app/dpdk-testpmd -l 0 --no-shconf --no-huge -m 2048 --log-level=lib.eal:debug
...
EAL: Buses did not request a specific IOVA mode.
EAL: Physical addresses are unavailable, selecting IOVA as VA mode.
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: Module /sys/module/vfio not found! error 2 (No such file or directory)
EAL: VFIO modules not loaded, skipping VFIO support...
EAL: Ask a virtual area of 0x2e000 bytes
EAL: WARNING! Base virtual address hint (0x100005000 != 0x7f9bc4cc1000) not respected!
EAL:    This may cause issues with mapping memory into secondary processes
EAL: Virtual area found at 0x7f9bc4cc1000 (size = 0x2e000)
EAL: Setting up physically contiguous memory...
EAL: Setting maximum number of open files to 524288
EAL: Ask a virtual area of 0x1811000 bytes
EAL: WARNING! Base virtual address hint (0x10000b000 != 0x7b9bbeae5000) not respected!
EAL:    This may cause issues with mapping memory into secondary processes
EAL: Virtual area found at 0x7b9bbeae5000 (size = 0x1811000)
EAL: Memseg list allocated at socket 0, page size 0x4kB
EAL: Using memfd for anonymous memory
EAL: Ask a virtual area of 0x80000000 bytes
EAL: WARNING! Base virtual address hint (0x100011000 != 0x7b9b3eae5000) not respected!
EAL:    This may cause issues with mapping memory into secondary processes
EAL: Virtual area found at 0x7b9b3eae5000 (size = 0x80000000)
EAL: VA reserved for memseg list at 0x7b9b3eae5000, size 80000000
EAL: memseg iova 7b9b3eae5000, len 1000, out of range
EAL: 	using dma mask fffffc0000000000
EAL: eal_legacy_hugepage_init(): couldn't allocate memory due to IOVA exceeding limits of current DMA mask.
EAL: Cannot init memory
EAL: Error - exiting with code: 1
Cannot init EAL: Cannot allocate memory

Does that ring a bell to anyone?

-- 
Robin

> Does not include installation.


                 reply	other threads:[~2025-05-15 10: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=D9WNYZDZHISG.3091PEP8Y34QL@redhat.com \
    --to=rjarry@redhat.com \
    --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 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).