All of lore.kernel.org
 help / color / mirror / Atom feed
* [DPDK/core Bug 1294] recieve sig 11 when call rte_ip_frag_table_create on primary forked process
       [not found] <bug-1294-3@https.bugs.dpdk.org/>
@ 2026-11-20 18:17 ` bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2026-11-20 18:17 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-20 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-1294-3@https.bugs.dpdk.org/>
2026-11-20 18:17 ` [DPDK/core Bug 1294] recieve sig 11 when call rte_ip_frag_table_create on primary forked process bugzilla

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.