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 1E332A034F for ; 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 DF35A40040; Fri, 7 May 2021 10:13:32 +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 23BE240040 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-518-yg7QN7f6OuKX7SP6puCsFg-1; Fri, 07 May 2021 04:13:28 -0400 X-MC-Unique: yg7QN7f6OuKX7SP6puCsFg-1 Received: by mail-vs1-f70.google.com with SMTP id b24-20020a67d3980000b029022a610fc6f2so1354831vsj.22 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=Wn1lJ4E+YkOfBBwpEd9XmWHZaM5rgFoep4nZ09AyAknCw9ShqyLAm7eHsOfIUYMBUG 9V3mgJLto9smKqi9cO6uqeqShbIv8zHFulSqmr1SPU6gcvDlUURvwrvDs8x0R71lYVnK Ca/z/ej93duGfLCWQ2pw8Uy3DiQs8ySxTpvYB4r9sil+0dlyfW92hmxguVndFu9W5DLI HzJQe3ftNuK0fYVIubTk88rmUQF9On/2JHb6GQPG3DQS/LVIgsW0pF1Nnr8eEHaXVANI gvaGa83R5yp9prlQfUpijkSzUgjzN5SLvspEG88JEz8R/3mIOm2wGQ2yC5DmbWKl2zgZ UNQw== X-Gm-Message-State: AOAM533EEOO1e6MPx8QwYHWCTOU9oxBIGun04EhCpM88eEQOUNuQSpXt LD2MV4WO5I9V1WRw9UMyw76zaZBNZjk6LTfh1xwTMDCsSY9YNHHQIytPB2vJuh66bJh6/WtNGTa yVnlF2JEyagO4jJstnfJKghs= X-Received: by 2002:a1f:5682:: with SMTP id k124mr6150807vkb.20.1620375208341; 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-stable] [PATCH 2/2] net/ice: fix leak on thread termination X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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