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 EA3C0426B7 for ; Wed, 4 Oct 2023 16:14:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3C00402A9; Wed, 4 Oct 2023 16:14:35 +0200 (CEST) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by mails.dpdk.org (Postfix) with ESMTP id 921274003C for ; Mon, 2 Oct 2023 16:34:59 +0200 (CEST) Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3af603da0f0so3619959b6e.3 for ; Mon, 02 Oct 2023 07:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=threatblockr-com.20230601.gappssmtp.com; s=20230601; t=1696257298; x=1696862098; darn=dpdk.org; h=in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Hw0T+7SOOU5QPceN7kEelGVru549m+C45/DOc2fHYoE=; b=KmzZenTRrKgbf0SgT8eEkjsbu/Yl9EMYZ4Wf6RJ/R9jbnNm+EiTfv8pzYTyh5ZC2aB x4G9StDjE2s4Q8DNoHuF9X6ZP2bd0nbwDXtjlUp57LX0Dr7andipjn23fYcHUg1d8QEP hJk9G/VGZvyET/c293U0LSODAeScUnaQFRAgQlC93tCttXg7tUxmHfuTT3kNWGgEfq1R y4gMCsL4rSt64N42UE15NI23FbGx7pRyU3xdrk+OJM1itLmBF7mKuvM9ZHmvedOj5KbN Uiq9RHxWX6lgurd7M8Z8Ykdjn37GZffPyukOeGFYdOkNDfVpFW39SCHR/JgyYWj9B2wK HXZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696257298; x=1696862098; h=in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Hw0T+7SOOU5QPceN7kEelGVru549m+C45/DOc2fHYoE=; b=VNNrYF5lGLVtMP7SODcY3XAu3qHCOXU9ndFHaTY0CTuvA7TSX3/RdCuvuJ224VDOAd LkaYDOAjSIl1ZPYD/2ZDlattusWQtBJexjmyuso50S2NPfNreGoOcrbJCLwe8bdpgkpJ 6XSiROBDTzygxyDE7+TzdjSgp/+3NriUK1n5GSCeLTe09W/6Lb5fxJsfqgN5H0HEi4bh 7U7k5ShbXmn8bQGoisZlNp5LXouKs0FWUx77fSYaJnG5jZBfUUbtPQtUUJViIoEbij+P HgNkfj+dhw8AXHK8pNTe0bkZnyPxeKubGz5IJALbHhaVDBA18GJKrsOyRFyPut/tSjBE QO6g== X-Gm-Message-State: AOJu0Yw/bieTm3NogeeJ5MZscZNRLIqYyrK3RHueREJlcJUcmZGQcDx5 H9SFqIYUAHJ9TZtQ2kKHSx7EWA== X-Google-Smtp-Source: AGHT+IGM7I+lJsXWZg6jIyIF86n9Tkg6MATogAQ3ZpMJEuaSV/5/x7URPgmTaDriU7XpIm0deOxhoA== X-Received: by 2002:a05:6808:1407:b0:3ae:251f:923f with SMTP id w7-20020a056808140700b003ae251f923fmr16474851oiv.28.1696257296865; Mon, 02 Oct 2023 07:34:56 -0700 (PDT) Received: from [192.168.0.8] (dyn-170-246-97.myactv.net. [24.170.246.97]) by smtp.gmail.com with ESMTPSA id d9-20020a0ce449000000b006577e289d37sm3766155qvm.2.2023.10.02.07.34.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 07:34:56 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------FPMVVay1kIH05G8VytOp8eHS" Message-ID: Date: Mon, 2 Oct 2023 10:34:55 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] eal/linux: prevent deadlocks on rte init and cleanup To: David Marchand Cc: Thomas Monjalon , Anatoly Burakov , dev@dpdk.org, stable@dpdk.org, Artemy Kovalyov References: <20230718010047.456679-1-jonathan.erb@threatblockr.com> Content-Language: en-US From: Jonathan Erb Organization: ThreatBlockr In-Reply-To: X-Mailman-Approved-At: Wed, 04 Oct 2023 16:14:35 +0200 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 This is a multi-part message in MIME format. --------------FPMVVay1kIH05G8VytOp8eHS Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit David, Thanks for the follow-up. The proposed patch below from Artemy will work for me. Jonathan On 9/29/23 10:32, David Marchand wrote: > Hello Jonathan, > > On Thu, Jul 20, 2023 at 7:19 AM 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=29463&state=%2A&archive=both > > > Thanks, > -- Jonathan Erb Software Engineer *Phone:* 1.855.765.4925 jonathan.erb@threatblockr.com threatblockr.com Threat Blockr Logo --------------FPMVVay1kIH05G8VytOp8eHS Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

David,

Thanks for the follow-up. The proposed patch below from Artemy will work for me.

Jonathan


On 9/29/23 10:32, David Marchand wrote:
Hello Jonathan,

On Thu, Jul 20, 2023 at 7:19 AM Jonathan Erb
<jonathan.erb@threatblockr.com> 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 <jonathan.erb@threatblockr.com>
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=29463&state=%2A&archive=both


Thanks,

--
Jonathan Erb
Software Engineer
Phone: 1.855.765.4925
jonathan.erb@threatblockr.com
threatblockr.com
Threat Blockr Logo
--------------FPMVVay1kIH05G8VytOp8eHS--