From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CADEEA034F; Fri, 7 May 2021 10:13:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CB014068A; Fri, 7 May 2021 10:13:33 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 656764013F for ; Fri, 7 May 2021 10:13:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620375210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6juJXSeiKl20Zn8SnsTOED8udMN6HoiHUm/mZJZoLqU=; b=iUiz0dcmabmin31KCVUOegP48IMI+x3R5o9nUQeKBhdsF6Rnd7MuGA3Z+qhNbY2B53pZ1d COOfxBfg2hIvtdTQOFk//4ECseFt6Q8Wq09prdeHZp6pGYRBA7YiUtFMFl8rQQK74mdox9 elephtkTwNQU20NA0ncPkKeqZuCj0Bc= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-312-iOKfbT6dOiasymjiFuwgXA-1; Fri, 07 May 2021 04:13:29 -0400 X-MC-Unique: iOKfbT6dOiasymjiFuwgXA-1 Received: by mail-vs1-f70.google.com with SMTP id l6-20020a67d5060000b0290228235bc72dso4023581vsj.13 for ; Fri, 07 May 2021 01:13:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6juJXSeiKl20Zn8SnsTOED8udMN6HoiHUm/mZJZoLqU=; b=jTp7BtA7y1BXUfwvELKbN5sbfPo3JL4vLEcXi5sRGP2/RRKXWSS1gFwFOLokb0F2mK 8I2divRAjyGqQNEIiF4N58KXQm6djNf9FGAdANv756uOY31MS9iVdXuqXq3rGL8QNkOc SIRfm4qgISDViJgd2sUAraCaRFoI8q2va1D3u4rKFE+H8jUFwVXrhqzx3mF6Ls5MU/ps jkPcw3ddnAPKpj5vjujANsV3T5uYc8SiwovjZ7pWaqtA/n6ykcodtG7f+NOy+WUtGIHz OufL5/tY3AaN1q9LTPaVe5ssU4kFIBCRJRzxE+fusSoWDOKMzI6htgY0yOXSikAh61uR HMDw== X-Gm-Message-State: AOAM533oWe7NPSK0UaUtEQvIgB09TjFGZaIdCofVrdHJq+qTvOsJrC7/ oq+ZY4nYOw2BnVxZq1YJCtQ/gM6LxdMsLBhdJ4xbWT1ZBpoVPFy1TiKfWJbYvS5nQex/p9zdUVz KWR7/ruaiAZnXwhLq52s= X-Received: by 2002:a1f:5682:: with SMTP id k124mr6150805vkb.20.1620375208340; Fri, 07 May 2021 01:13:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+3y532PenxtbntAZCeyEvC/i3IVqbJPz4PfV8hAl/VALadfkO0uUVh4pLxp2z2jCsJ0ZaQAfa5O2TW8TpyTA= X-Received: by 2002:a1f:5682:: with SMTP id k124mr6150791vkb.20.1620375208116; Fri, 07 May 2021 01:13:28 -0700 (PDT) MIME-Version: 1.0 References: <20210506094452.1689-1-david.marchand@redhat.com> <20210506094452.1689-3-david.marchand@redhat.com> In-Reply-To: <20210506094452.1689-3-david.marchand@redhat.com> From: David Marchand Date: Fri, 7 May 2021 10:13:16 +0200 Message-ID: To: Dmitry Kozlyuk , "Dmitry Malloy (MESHCHANINOV)" , Narcisa Ana Maria Vasile , Pallavi Kadam Cc: dev , dpdk stable , Qiming Yang , Qi Zhang , Haiyue Wang , Thomas Monjalon Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] net/ice: fix leak on thread termination X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 6, 2021 at 11:45 AM David Marchand wrote: > > A terminated pthread should be joined or detached so that its associated > resources are released. > > The "ice-reset-" 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