All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/core Bug 1294] recieve sig 11 when call rte_ip_frag_table_create on primary forked process
Date: Fri, 20 Nov 2026 18:17:18 +0000	[thread overview]
Message-ID: <bug-1294-3-1sEvXA3xcH@https.bugs.dpdk.org/> (raw)
In-Reply-To: <bug-1294-3@https.bugs.dpdk.org/>

https://bugs.dpdk.org/show_bug.cgi?id=1294

Stephen Hemminger (stephen@networkplumber.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |stephen@networkplumber.org
         Resolution|---                         |WONTFIX

--- Comment #1 from Stephen Hemminger (stephen@networkplumber.org) ---
The DPDK does not support forking of the primary process after rte_eal_init is
called.
There are many internal parts of DPDK that depend on this.


More detailed AI explanation:
DPDK does not support fork() after rte_eal_init(). The child is
neither a valid primary nor a secondary process.

What breaks:

 - Hugepage memory and the heap/memseg metadata in mem_config are
   MAP_SHARED, so parent and child share the same malloc heap.
   Page mappings, however, are per process.

 - When the child needs more memory it calls alloc_more_mem_on_socket()
   as if it were the primary. It maps new hugepages into its own
   address space only and links the new elements into the shared heap
   free list. The parent and any other child never mapped those pages.
   In normal multi-process this is kept in sync over the mp IPC channel,
   which the forked child does not take part in.

 - The second child inherits a heap whose free list points into pages
   that only the first child had mapped. The first heap walk in
   malloc_elem_insert() dereferences one of them, giving SIGSEGV. That
   matches your backtrace and why the first fork appears to work.

 - Only the calling thread survives fork(). The interrupt thread, mp
   handler thread and lcore workers do not exist in the child, and any
   spinlock in shared memory that was held at fork time stays held.
   Device fds (VFIO, uio, memfd) are also shared with the parent.

Options:

 - Run the business logic as a DPDK secondary process
   (--proc-type=secondary, started with fork+exec or separately).
   You can restart it as often as you like without disturbing the
   primary.
 - Run it in threads inside the primary.
 - fork() before calling rte_eal_init(), and keep DPDK only in the
   process that initializes EAL.

Closing as not a bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

           reply	other threads:[~2026-11-20 18:17 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <bug-1294-3@https.bugs.dpdk.org/>]

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-1294-3-1sEvXA3xcH@https.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.