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 C238E42672; Fri, 29 Sep 2023 16:33:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74D75402AD; Fri, 29 Sep 2023 16:33:07 +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 262E8402AA for ; Fri, 29 Sep 2023 16:33:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695997984; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HKSOWITMrOD/4CCcuMPG9SoL1k11U3pA104wkrR3big=; b=LqutvnJcMFAL0kiDJwu2Yxabc4DunrgoBPZLjFeWWQ1WjITz9nUKwnlJKFQkPulh/vTueF o0mV4pyn6JK0lt8aUbilLprETrO7/xTsgPVhnMgjz+1IWGRRpuU8r/qcIk0TphsB9XiMwL uu6lTKsvi5ZANsuJUquQKLNibhy71eY= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-680-Zw5U5aZrMCaoOt5KPGprHQ-1; Fri, 29 Sep 2023 10:33:02 -0400 X-MC-Unique: Zw5U5aZrMCaoOt5KPGprHQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bfb2c81664so201546211fa.3 for ; Fri, 29 Sep 2023 07:33:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695997981; x=1696602781; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HKSOWITMrOD/4CCcuMPG9SoL1k11U3pA104wkrR3big=; b=vqqlT4UlVGCVEuNS1aWGz00TzI/kFF2psKliHWYQ5z3yIPTALMcVBH/iKGmtDwWWKz 6RSXJNBENJIYgfQDkDVTrUhLqT+6kfv1lP//WRg3XlxvEZjiezNIrHoTb4A0DldaP/Cc xlQrD4x7TB/xQEQaQW33DjEtMkFpmimXoiGiRajyW3RLW1G7EcVlG/fS7zy0kffPK50b coLBHSrE1+Lf7VGW1r6QHCE85Qw/z2xuvQoTd2Pl0Wfk2iC1o6BYLBEPoI6cZoPlQoSf JNfFWA3maiyRp0iCRN9aQIvhlcuDnbxX1vT6ZgYShg2F2ebrqlCe4JAM4dlRp+bh1SWC 5swA== X-Gm-Message-State: AOJu0Yx5nh08lw87fLcSFsGZm577J58US/nQq9q3sBZFWwufoZjy9UQm CNMfECnJEePlKl0XQTucYWUwgmKsGaQD6QMW10oe/qCNEjvcHO5LePhL0kaGEi6aWsxr4Hw77tx nTMxOklCSKrPeQVUBO00= X-Received: by 2002:a2e:9dd2:0:b0:2b4:5cad:f246 with SMTP id x18-20020a2e9dd2000000b002b45cadf246mr3844058ljj.7.1695997981226; Fri, 29 Sep 2023 07:33:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnk5IUDhv05zskj2B3tkGnhzIUK3yQQZzfCwDkjWb83ZJ52TsvLtuNpWfm68ehuZWcyT/xv+RWrCve/lbJ4Xg= X-Received: by 2002:a2e:9dd2:0:b0:2b4:5cad:f246 with SMTP id x18-20020a2e9dd2000000b002b45cadf246mr3844038ljj.7.1695997980905; Fri, 29 Sep 2023 07:33:00 -0700 (PDT) MIME-Version: 1.0 References: <20230718010047.456679-1-jonathan.erb@threatblockr.com> In-Reply-To: <20230718010047.456679-1-jonathan.erb@threatblockr.com> From: David Marchand Date: Fri, 29 Sep 2023 16:32:49 +0200 Message-ID: Subject: Re: [PATCH] eal/linux: prevent deadlocks on rte init and cleanup To: Jonathan Erb Cc: Thomas Monjalon , Anatoly Burakov , dev@dpdk.org, stable@dpdk.org, Artemy Kovalyov X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello Jonathan, On Thu, Jul 20, 2023 at 7:19=E2=80=AFAM Jonathan Erb wrote: > > Resolves a deadlock that can occur when multiple secondary > processes are starting and stopping. A deadlock can occur because > eal_memalloc_init() is taking a second unnecessary read lock. > If another DPDK process that is terminating enters rte_eal_memory_detach(= ) > and acquires a write lock wait state before the starting process can > acquire it's second read lock then no process will be able to proceed. > > Cc: stable@dpdk.org > > Signed-off-by: Jonathan Erb Thanks for the report and fix and sorry for the late reply. Artemy came with a similar report and a more complete fix. Could you confirm it works for you? https://patchwork.dpdk.org/project/dpdk/list/?series=3D29463&state=3D%2A&ar= chive=3Dboth Thanks, --=20 David Marchand