[PATCH] [PATCH v5] app/testpmd: fix segfault in secondary process by monitoring primary
Stephen Hemminger
stephen at networkplumber.org
Tue Jul 29 16:48:04 CEST 2025
On Tue, 29 Jul 2025 02:39:19 -0400
Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk> wrote:
> In secondary processes, directly accessing 'dev->data->dev_private' can
> cause a segmentation fault if the primary process has exited or if the
> shared memory is no longer accessible. If a secondary process attempts
> to query device information (e.g., via testpmd), a NULL dereference
> may occur due to missing shared data.
>
> The secondary process not only crashes on device close but also segfaults
> when executing commands like "show device info all" after the primary has
> exited.
>
> This patch adds a mechanism in testpmd to monitor the primary process from the
> secondary using `rte_eal_primary_proc_alive()`, and exits secondary process
> when primary has exited.
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable at dpdk.org
>
> Signed-off-by: Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk>
> ---
When is testpmd doing a query after it detects primary exit?
That is the problem still.
More information about the stable
mailing list