[dpdk-dev] [dpdk-stable] [PATCH 2/2] net/ice: fix leak on thread termination

David Marchand david.marchand at redhat.com
Fri May 7 10:13:16 CEST 2021


On Thu, May 6, 2021 at 11:45 AM David Marchand
<david.marchand at redhat.com> wrote:
>
> A terminated pthread should be joined or detached so that its associated
> resources are released.
>
> The "ice-reset-<vf_id>" threads are used to service some reset task in the
> background, but they are never joined by the thread that created them.
> The easiest solution is to detach new threads.

Not so "easy" for Windows.

I think I'll simply #ifndef WINDOWS my addition.
Maybe the leak does not exist on Windows? but if it does, the
situation won't change by doing nothing on Windows.

If there is strong objection, I'll need some help to add a
pthread_detach() wrapper in windows EAL.
>From my quick read at the API, I'd say I need to find the current
thread handle (via OpenThread) then CloseHandle it.
But does it work from "pthread_self()" ?


Since a new API thread is in preparation, the "thread detaching" from
the pthread API is something to consider.
I could not find it in Narcissa series.


-- 
David Marchand



More information about the dev mailing list