[PATCH] [PATCH v5] app/testpmd: fix segfault in secondary process by monitoring primary
Stephen Hemminger
stephen at networkplumber.org
Fri Aug 8 18:17:35 CEST 2025
On Fri, 8 Aug 2025 03:44:40 +0000
"Varghese, Vipin" <Vipin.Varghese at amd.com> wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> Hi Khadem,
>
> Snipped
>
> >
> >
> > Hi Stephen,
> >
> > Many thanks for the fix and for the suggestion that the secondary should exit
> > immediately without attempting any cleanups once it detects the primary has exited.
>
> Can you please explain why cleanup of secondary resources are not to be done, If there is specific memory like external hugepage backed mempool none of the callback will be called. Also releasing internal stack memory and heap of secondary is not cleaned.
>
> Is there specific reason why you do not want to clean? If yes, can you please point to the right direction what is breaking?
What happens is that both primary and secondary process have a list head
that lists devices (like ethdev). The ethdev's shared part lives in huge pages.
When primary exits, it calls the cleanup which frees the list (local part) and
the shared part. When secondary calls cleanup, its local part now points to
freed data in shared huge pages. That leads to all sorts of issues.
There is no need for secondary to do any cleanup, all the local memory disappears when
process exits.
Also, there is no locking between primary and secondary process.
More information about the stable
mailing list