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 5FD2243A3A; Thu, 1 Feb 2024 14:15:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EEE84113C; Thu, 1 Feb 2024 14:15:15 +0100 (CET) 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 97D9A40275 for ; Thu, 1 Feb 2024 14:15:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706793314; 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=UXb4nFD3FpFSAvYwoS0iB+IxjcYsibjcSqX9O9X1hvI=; b=b0OBWWb+RMZ1AdfRsu+mTbr+L4u1L2u4z0MHkZq7S5tljGNyEi/ADhAg4ErS6Dx3oTng0y DMh7rbdB6OFL6F0uvUJ90khWBnb9UmiFQCT/Z4u8cLn4igDDhh1OvTawYhJX4xV+Aeq4fw 0UTOlJgG+AEp9AS72r+xQ0c8Dx7coEc= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-QZTKoDRoM16W-PgIacaUhw-1; Thu, 01 Feb 2024 08:15:10 -0500 X-MC-Unique: QZTKoDRoM16W-PgIacaUhw-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-51023ab1bb4so745436e87.3 for ; Thu, 01 Feb 2024 05:15:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706793309; x=1707398109; 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=UXb4nFD3FpFSAvYwoS0iB+IxjcYsibjcSqX9O9X1hvI=; b=xUcX+j5pk2UrjhTw2CF/C5QCAwZ3169KaUp9vaQKY3JZ6eDaErHtEi5mzzxkhg1BJ7 Uqc1rSXVg/Kh4RRXTPgTcyTpKbO2ihsZNDWSYYgEdP1cZxUENivqiC7SRuo+oCdMAvEV OIC3VY4K+ri2154TK75Pkj8fdBVA9OwRPBVxW2lwKFC6Mf7R4wSuom4iJ00uS6pEvuSd Nbf2jOR2kqPth0yWQlnuiD+nBJKLM55DK6VvajWKz+iVQrBk81PTnuONCcxTFB6937aB 9e7JXYRL4yh0FrP6b9KuQWYbWFgS8/Hno5SSipG5PpI7va++0rYuLAveBY0g9AzK+zX0 dOnw== X-Gm-Message-State: AOJu0Yx6wfCdlcb2xUFUL2p7fJo+FbQMFd80G1LQh09AXdN8n6gy+jkM KFmWn8no3ycvUdMudoQ7pjmdgpzuxsaleiXcb06z1KBfpYEnRFLscywKkzLYre9BuNdTG/5MM+8 EX8EdgV38ZOQ5dO7C8bpEI9MeF1gStX7e2jNNLiPO0UqAGSPKSH38PqW2d7stBTcTBxagjdkgq8 06/HF4cp5tDIsaUqg= X-Received: by 2002:a05:6512:3482:b0:511:2e09:932a with SMTP id v2-20020a056512348200b005112e09932amr1216882lfr.41.1706793309455; Thu, 01 Feb 2024 05:15:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIehg8Lphj0q5stnNZyOIPz/T5CnEDWMIfr5XhG9cRu1u1gaWp9a6Gk7GRt9STboidcOAfN8dWB5qRkGa667A= X-Received: by 2002:a05:6512:3482:b0:511:2e09:932a with SMTP id v2-20020a056512348200b005112e09932amr1216869lfr.41.1706793309172; Thu, 01 Feb 2024 05:15:09 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Thu, 1 Feb 2024 14:14:57 +0100 Message-ID: Subject: Re: [PATCH] [v3]lib/telemetry:fix telemetry conns leak in case of socket write fail To: Shaowei Sun <1819846787@qq.com>, ciara.power@intel.com Cc: dev@dpdk.org, Bruce Richardson , Chengwen Feng 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 On Tue, Jan 30, 2024 at 2:57=E2=80=AFAM Shaowei Sun <1819846787@qq.com> wro= te: > > Telemetry can only create 10 conns by default, each of which is processed > by a thread. > > When a thread fails to write using socket, the thread will end directly > without reducing the total number of conns. > > This will result in the machine running for a long time, and if there are > 10 failures, the telemetry will be unavailable > > Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality") > > Signed-off-by: Shaowei Sun <1819846787@qq.com> > Acked-by: Bruce Richardson > Acked-by: Ciara Power > Acked-by: Chengwen Feng Thanks for the fix. As far as I can see, the limiting of the number of connections (which here results in a DoS on the telemetry socket) was added in commit 2a7d0b872f79 ("telemetry: add upper limit on connections"). If you confirm this is indeed this commit that introduced the issue, I will fix the Fixes: tag myself when applying. --=20 David Marchand